public StartMenuCommand(IModelItem Owner, StartMenuHelper helper, StartMenuItem Item) : base(Owner) { this.entryPoint = Item; this.edit = new Command(this); //this.edit.Invoked += new EventHandler(edit_Invoked); this.edit.Invoked += delegate(object Sender, EventArgs Args) { //navigate to edit page Dictionary<string, object> properties = new Dictionary<string, object>(); Library.Code.V3.StartMenuItemSettings page = new Library.Code.V3.StartMenuItemSettings(entryPoint, helper); properties["Page"] = page; properties["Application"] = OMLApplication.Current; OMLApplication.Current.Session.GoToPage("resx://Library/Library.Resources/V3_StartMenuItemSettings", properties); }; this.moveUp = new Command(this); this.moveUp.Invoked += delegate(object Sender, EventArgs Args) { helper.MoveItemUp(this.entryPoint); }; this.moveDown = new Command(this); this.moveDown.Invoked += delegate(object Sender, EventArgs Args) { helper.MoveItemDown(this.entryPoint); }; }
public StartMenuCommand(IModelItem Owner, StartMenuHelper helper, StartMenuItem Item) : base(Owner) { this.entryPoint = Item; this.edit = new Command(this); //this.edit.Invoked += new EventHandler(edit_Invoked); this.edit.Invoked += delegate(object Sender, EventArgs Args) { //navigate to edit page Dictionary <string, object> properties = new Dictionary <string, object>(); Library.Code.V3.StartMenuItemSettings page = new Library.Code.V3.StartMenuItemSettings(entryPoint, helper); properties["Page"] = page; properties["Application"] = OMLApplication.Current; OMLApplication.Current.Session.GoToPage("resx://Library/Library.Resources/V3_StartMenuItemSettings", properties); }; this.moveUp = new Command(this); this.moveUp.Invoked += delegate(object Sender, EventArgs Args) { helper.MoveItemUp(this.entryPoint); }; this.moveDown = new Command(this); this.moveDown.Invoked += delegate(object Sender, EventArgs Args) { helper.MoveItemDown(this.entryPoint); }; }
void newCmd_Invoked(object sender, EventArgs e) { if (this.helper.StartMenuItems.Count < 5) { StartMenuItem newEntryPoint = new StartMenuItem(); newEntryPoint.Context = Context.Home; //navigate to edit page Dictionary <string, object> properties = new Dictionary <string, object>(); Library.Code.V3.StartMenuItemSettings page = new Library.Code.V3.StartMenuItemSettings(newEntryPoint, helper); properties["Page"] = page; properties["Application"] = OMLApplication.Current; OMLApplication.Current.Session.GoToPage("resx://Library/Library.Resources/V3_StartMenuItemSettings", properties); } else { DialogResult res = OMLApplication.Current.MediaCenterEnvironment.Dialog("You can have only five entries on the start menu?", "START MENU FULL", DialogButtons.Ok, -1, true); } }
void newCmd_Invoked(object sender, EventArgs e) { if (this.helper.StartMenuItems.Count < 5) { StartMenuItem newEntryPoint = new StartMenuItem(); newEntryPoint.Context = Context.Home; //navigate to edit page Dictionary<string, object> properties = new Dictionary<string, object>(); Library.Code.V3.StartMenuItemSettings page = new Library.Code.V3.StartMenuItemSettings(newEntryPoint, helper); properties["Page"] = page; properties["Application"] = OMLApplication.Current; OMLApplication.Current.Session.GoToPage("resx://Library/Library.Resources/V3_StartMenuItemSettings", properties); } else { DialogResult res = OMLApplication.Current.MediaCenterEnvironment.Dialog("You can have only five entries on the start menu?", "START MENU FULL", DialogButtons.Ok, -1, true); } }