public StartMenuSettings() { this.commands = new ArrayListDataSet(this); //save command Command saveCmd = new Command(); saveCmd.Description = "New Shortcut"; saveCmd.Invoked += new EventHandler(newCmd_Invoked); this.commands.Add(saveCmd); //cancel command Command cancelCmd = new Command(); cancelCmd.Description = "Done"; cancelCmd.Invoked += new EventHandler(cancelCmd_Invoked); this.commands.Add(cancelCmd); //this.SetupStartMenu(); string addinId = OMLApplication.AssemblyName; this.helper = new StartMenuHelper(addinId); this.helper.Changed += new ChangedEventHandler(helper_Changed); this.LoadArray(); }
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 FirstRunConfigureStartMenu(FirstRun firstRun) { this.PageInstructions = "How would you like to access Open Media Library?"; this.PageTitle = "Start Menu"; this.owner = firstRun; this.owner.NextCommandEnabled.Value = true; string addinId = OMLApplication.AssemblyName; this.helper = new StartMenuHelper(addinId); this.selectedViewOptions = new Choice(this.owner); List <string> selectedViewList = new List <string>(); if (this.helper.StartMenuItems.Count > 0) { selectedViewList.Add(strKeepExisting); } selectedViewList.Add(strCreateStrip); selectedViewList.Add(strProgramLibrary); this.selectedViewOptions.Options = selectedViewList; this.selectedViewOptions.ChosenIndex = 0; this.selectedViewOptions.ChosenChanged += new EventHandler(selectedViewOptions_ChosenChanged); this.FocusContent = true; }
public StartMenuItemSettings(StartMenuItem SelectedItem, StartMenuHelper Helper) { this.helper = Helper; this.selectedItem = SelectedItem; this.commands = new ArrayListDataSet(this); //save command Command saveCmd = new Command(); saveCmd.Description = "Save"; saveCmd.Invoked += new EventHandler(saveCmd_Invoked); this.commands.Add(saveCmd); //cancel command Command cancelCmd = new Command(); cancelCmd.Description = "Cancel"; cancelCmd.Invoked += new EventHandler(cancelCmd_Invoked); this.commands.Add(cancelCmd); this.SetupStartMenu(); }