コード例 #1
0
 /// <summary>
 /// Applies the menu settings.
 /// </summary>
 /// <param name="sender"> Sender object.</param>
 /// <param name="e"> ApplyMenuSettingsEventArgs arguments.</param>
 public void inspector_ApplyMenuSettingsEvent(object sender, ApplyMenuSettingsEventArgs e)
 {
     this.ApplySettingsMenuItems(e.RootShortcut, e.MenuItems);
 }
コード例 #2
0
        /// <summary>
        /// Toggles the ReportDialogTest menu.
        /// </summary>
        /// <param name="enabled"></param>
        public void UpdateReportDialogTestMenu(bool enabled)
        {
            // new Arguments
            ApplyMenuSettingsEventArgs newArgs = new ApplyMenuSettingsEventArgs();

            // identify the shortcut
            newArgs.RootShortcut = Shortcut.CtrlShiftI;

            // get menu item by index
            Ecyware.GreenBlue.Controls.MenuItem reportDialogMenu = this.PluginMenus.GetByIndex(5);

            reportDialogMenu.Enabled = enabled;
            newArgs.MenuItems.Add(reportDialogMenu.Name,reportDialogMenu);

            ToolbarItem reportButton = (ToolbarItem)this.PluginMenus.GetByIndex(7);
            reportButton.Enabled = enabled;

            ApplyToolbarSettingsEventArgs args = new ApplyToolbarSettingsEventArgs(reportButton);

            // update toolbar
            this.ApplyToolbarSettingsEvent(this, args);

            // update menu
            this.ApplyMenuSettingsEvent(this, newArgs);
        }
コード例 #3
0
        /// <summary>
        /// Toggles the save and print report menu.
        /// </summary>
        /// <param name="enabled"></param>
        public void UpdateSavePrintReportMenu(bool enabled)
        {
            // new Arguments
            ApplyMenuSettingsEventArgs newArgs = new ApplyMenuSettingsEventArgs();

            // identify the shortcut
            newArgs.RootShortcut = Shortcut.CtrlShiftI;

            // get menu item by index
            Ecyware.GreenBlue.Controls.MenuItem saveReport = this.PluginMenus.GetByIndex(1);
            Ecyware.GreenBlue.Controls.MenuItem printReport = this.PluginMenus.GetByIndex(2);

            saveReport.Enabled = enabled;
            printReport.Enabled = enabled;
            // printPreviewReport.Enabled = enabled;

            newArgs.MenuItems.Add(saveReport.Name, saveReport);
            newArgs.MenuItems.Add(printReport.Name, printReport);
            // newArgs.MenuItems.Add(printPreviewReport.Name, printPreviewReport);

            // update menu
            this.ApplyMenuSettingsEvent(this, newArgs);
        }
コード例 #4
0
        /// <summary>
        /// Updates any menu
        /// </summary>
        /// <param name="parentLink"> The shortcut to root menu.</param>
        /// <param name="menu"> The menu item.</param>
        /// <param name="enabled"> Sets the enabled state.</param>
        public void UpdateMenu(Shortcut parentLink, Ecyware.GreenBlue.Controls.MenuItem menu,bool enabled)
        {
            // new Arguments
            ApplyMenuSettingsEventArgs newArgs = new ApplyMenuSettingsEventArgs();

            // identify the shortcut
            newArgs.RootShortcut = parentLink;

            menu.Enabled = enabled;
            newArgs.MenuItems.Add(menu.Name, menu);

            // update menu
            this.ApplyMenuSettingsEvent(this, newArgs);
        }
コード例 #5
0
 /// <summary>
 /// Applies menu settings for SessionDesigner.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void SessionDesigner_ApplyMenuSettingsEvent(object sender, ApplyMenuSettingsEventArgs e)
 {
     this.ApplyMenuSettingsEvent(this,e);
 }
コード例 #6
0
 /// <summary>
 /// Applies menu settings for report preview.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void Report_ApplyMenuSettingsEvent(object sender, ApplyMenuSettingsEventArgs e)
 {
     this.ApplyMenuSettingsEvent(this,e);
 }
コード例 #7
0
 /// <summary>
 /// Applies menu settings for FormEditor.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void formeditor_ApplyMenuSettingsEvent(object sender, ApplyMenuSettingsEventArgs e)
 {
     this.ApplyMenuSettingsEvent(this,e);
 }
コード例 #8
0
        /// <summary>
        /// Toggles the SaveWebSession Menu.
        /// </summary>
        /// <param name="enabled"></param>
        public void UpdateSaveWebSessionMenu(bool enabled)
        {
            // new Arguments
            ApplyMenuSettingsEventArgs newArgs = new ApplyMenuSettingsEventArgs();

            // identify the shortcut
            newArgs.RootShortcut = Shortcut.CtrlShiftF;

            // get menu item by index
            Ecyware.GreenBlue.Controls.MenuItem saveMenu = this.PluginMenus.GetByIndex(1);

            saveMenu.Enabled = enabled;
            newArgs.MenuItems.Add(saveMenu.Name,saveMenu);

            // update menu
            this.ApplyMenuSettingsEvent(this,newArgs);
        }