Ejemplo n.º 1
0
 private void OnCheckingForUpdatesClick(object sender, EventArgs e)
 {
     m_options.checkingForUpdates = m_help_checkingForUpdatesMenuItem.Checked;
     if (m_options.checkingForUpdates)
     {
         m_newVersionMenuItem = new NewVersionMenuItem(m_options);
     }
 }
Ejemplo n.º 2
0
        private void InitializeComponents()
        {
            RenderMode       = ToolStripRenderMode.System;
            BackColor        = SystemColors.Control;
            ShowItemToolTips = true;

            m_file_exitMenuItem          = InitFactory.MenuItem.Create(null, null, ExitAction);
            m_file_profileOpenMenuItem   = InitFactory.MenuItem.Create("ProfileOpenMenu", null, ProfileOpenAction);
            m_file_profileSaveAsMenuItem = InitFactory.MenuItem.Create("ProfileSaveAsMenu", null, ProfileSaveAsAction);
            m_file_loadProfileOnLoading  = InitFactory.MenuItem.Create(null, null, LoadProfileOnLoadingAction, m_options.loadProfileOnLoading);
            m_file_saveProfileOnClosing  = InitFactory.MenuItem.Create(null, null, SaveProfileOnClosingAction, m_options.saveProfileOnClosing);

            m_fileMenuItem = new ToolStripMenuItem();
            m_fileMenuItem.DropDownItems.Add(m_file_profileOpenMenuItem);
            m_fileMenuItem.DropDownItems.Add(m_file_profileSaveAsMenuItem);
            m_fileMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_fileMenuItem.DropDownItems.Add(m_file_loadProfileOnLoading);
            m_fileMenuItem.DropDownItems.Add(m_file_saveProfileOnClosing);
            m_fileMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_fileMenuItem.DropDownItems.Add(m_file_exitMenuItem);

            m_edit_undoMenuItem      = InitFactory.MenuItem.Create("UndoMenu", null, UndoAction);
            m_edit_redoMenuItem      = InitFactory.MenuItem.Create("RedoMenu", null, RedoAction);
            m_edit_selectAllMenuItem = InitFactory.MenuItem.Create(null, null, SelectAllAction);

            m_editMenuItem = new ToolStripMenuItem();
            m_editMenuItem.DropDownItems.Add(m_edit_undoMenuItem);
            m_editMenuItem.DropDownItems.Add(m_edit_redoMenuItem);
            m_editMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_editMenuItem.DropDownItems.Add(m_edit_selectAllMenuItem);

            m_view_toolMenuItem                  = InitFactory.MenuItem.Create(null, null, ViewItemCheckChangeAction, m_options.mainFormOptions.toolStripView);
            m_view_statusMenuItem                = InitFactory.MenuItem.Create(null, null, ViewItemCheckChangeAction, m_options.mainFormOptions.statusStripView);
            m_view_languageMenuItem              = new LanguageMenuItem(m_options);
            m_view_modeMenuItem                  = new ViewModeMenuItem(m_options);
            m_view_selectColumnsMenuItem         = InitFactory.MenuItem.Create(null, null, OnSelectColumnsClick);
            m_view_hotKeysMenuItem               = InitFactory.MenuItem.Create(null, null, OnHotKeysClick);
            m_view_stretchSmallImageMenuItem     = InitFactory.MenuItem.Create(null, null, ViewItemCheckChangeAction, m_options.resultsOptions.StretchSmallImages);
            m_view_proportionalImageViewMenuItem = InitFactory.MenuItem.Create(null, null, ViewItemCheckChangeAction, m_options.resultsOptions.ProportionalImageSize);
            m_view_showNeighbourImageMenuItem    = InitFactory.MenuItem.Create(null, null, ViewItemCheckChangeAction, m_options.resultsOptions.ShowNeighboursImages);

            m_viewMenuItem = new ToolStripMenuItem();
            m_viewMenuItem.DropDownItems.Add(m_view_toolMenuItem);
            m_viewMenuItem.DropDownItems.Add(m_view_statusMenuItem);
            m_viewMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_viewMenuItem.DropDownItems.Add(m_view_languageMenuItem);
            m_viewMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_viewMenuItem.DropDownItems.Add(m_view_modeMenuItem);
            m_viewMenuItem.DropDownItems.Add(m_view_selectColumnsMenuItem);
            m_viewMenuItem.DropDownItems.Add(m_view_hotKeysMenuItem);
            m_viewMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_viewMenuItem.DropDownItems.Add(m_view_stretchSmallImageMenuItem);
            m_viewMenuItem.DropDownItems.Add(m_view_proportionalImageViewMenuItem);
            m_viewMenuItem.DropDownItems.Add(m_view_showNeighbourImageMenuItem);

            m_search_startMenuItem                  = InitFactory.MenuItem.Create("StartMenu", null, StartSearchAction);
            m_search_refreshResultsMenuItem         = InitFactory.MenuItem.Create("RefreshMenu", null, RefreshResultsAction);
            m_search_refreshImagesMenuItem          = InitFactory.MenuItem.Create(null, null, RefreshImagesAction);
            m_search_pathsMenuItem                  = InitFactory.MenuItem.Create("PathsMenu", null, PathsAction);
            m_search_optionsMenuItem                = InitFactory.MenuItem.Create("OptionsMenu", null, OptionsAction);
            m_search_onePathMenuItem                = InitFactory.MenuItem.Create(null, null, UseOnePathAction, m_options.onePath);
            m_search_useImageDataBaseMenuItem       = InitFactory.MenuItem.Create(null, null, UseImageDataBaseAction, m_options.useImageDataBase);
            m_search_checkResultsAtLoadingMenuItem  = InitFactory.MenuItem.Create(null, null, CheckResultsAtLoadingAction, m_options.checkResultsAtLoading);
            m_search_checkMistakesAtLoadingMenuItem = InitFactory.MenuItem.Create(null, null, CheckMistakesAtLoadingAction, m_options.checkMistakesAtLoading);

            m_searchMenuItem = new ToolStripMenuItem();
            m_searchMenuItem.DropDownItems.Add(m_search_startMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_refreshResultsMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_refreshImagesMenuItem);
            m_searchMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_searchMenuItem.DropDownItems.Add(m_search_pathsMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_optionsMenuItem);
            m_searchMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_searchMenuItem.DropDownItems.Add(m_search_onePathMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_useImageDataBaseMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_checkResultsAtLoadingMenuItem);
            m_searchMenuItem.DropDownItems.Add(m_search_checkMistakesAtLoadingMenuItem);

            m_help_helpMenuItem               = InitFactory.MenuItem.Create("HelpMenu", null, HelpAction);
            m_help_aboutProgramMenuItem       = InitFactory.MenuItem.Create(null, null, AboutProgramAction);
            m_help_checkingForUpdatesMenuItem = InitFactory.MenuItem.Create(null, null, OnCheckingForUpdatesClick, m_options.checkingForUpdates);

            m_helpMenuItem = new ToolStripMenuItem();
            m_helpMenuItem.DropDownItems.Add(m_help_helpMenuItem);
            m_helpMenuItem.DropDownItems.Add(m_help_aboutProgramMenuItem);
            m_helpMenuItem.DropDownItems.Add(new ToolStripSeparator());
            m_helpMenuItem.DropDownItems.Add(m_help_checkingForUpdatesMenuItem);

            m_newVersionMenuItem = new NewVersionMenuItem(m_options);

            Items.Add(m_fileMenuItem);
            Items.Add(m_editMenuItem);
            Items.Add(m_viewMenuItem);
            Items.Add(m_searchMenuItem);
            Items.Add(m_helpMenuItem);
            Items.Add(m_newVersionMenuItem);
        }