So I didn't get the getNextPanel() function to work, but I do have a solution for R.A.D.
First, create a dictionary object in your class:
Code:
private StreetDeck.StreetDeckApp sa;
private StreetDeck.ScriptModule sm;
private Dictionary<String, StreetDeck.Panel> pnlDict = new Dictionary<string,StreetDeck.Panel>();
Next, add this function to your class:
Code:
public void CreatePanel(StreetDeck.enumCreatePanelType type, string caption, string name)
{
pnlDict.Add(name, (StreetDeck.Panel)sm.CreatePanel(type, "", name, 50, 50, 50, 50));
pnlDict[name].Enabled = true;
pnlDict[name].Caption = caption;
}
Next, create your buttons/panels etc like this:
Code:
sa = (StreetDeck.StreetDeckApp)Application;
sm = sa.CreateModule("digimodName");
this.CreatePanel(StreetDeck.enumCreatePanelType.eCPTButton, "", "btnNightMinUp");
this.CreatePanel(StreetDeck.enumCreatePanelType.eCPTButton, "", "btnNightMinDn");
this.CreatePanel(StreetDeck.enumCreatePanelType.eCPTDynamicLabel, cvtTime(times[ETIMES.STARTHOUR], times[ETIMES.STARTMINUTES]), "stHour");
Then you can access these items like this:
Code:
pnlDict["stHour"].Caption = cvtTime(times[ETIMES.STARTHOUR], times[ETIMES.STARTMINUTES]);
pnlDict["endHour"].Caption = cvtTime(times[ETIMES.ENDHOUR], times[ETIMES.ENDMINUTES]);
where the key to this is 'pnlDict["somename"]'
As far as the skinning is concerned, everything will be stacked on top of itself, so this is where you go into the IDE and move/rearrange/set classes of all the items.
I believe this is probably the best practice (or at least the best I could come up with) for rapidly developing SD digimods.
Bookmarks