Example #1
0
 private void OpenRecentFile(MruMenuManager manager, string fileSystemPath)
 {
     try
     {
         OpenFile(fileSystemPath);
     }
     catch (Exception ex)
     {
         MessageEngine.ShowError(ex);
     }
 }
Example #2
0
 private void OpenRecentSolution(MruMenuManager manager, string fileSystemPath)
 {
     try
     {
         Cursor = Cursors.WaitCursor;
         if (!File.Exists(fileSystemPath))
         {
             return;
         }
         OpenSolution(fileSystemPath);
     }
     catch (Exception ex)
     {
         MessageEngine.ShowError(ex);
     }
     finally
     {
         Cursor = Cursors.Default;
     }
 }
Example #3
0
        public MainForm(string fileSystemPath)
        {
            _fileSystemPath = fileSystemPath;
            InitializeComponent();
            MessageEngine.AttachConsumer(outputWindow);
            _recentFiles     = new MruMenuManager("RecentFiles", 10, menuMainFile, menuMainFileRecentFiles, OpenRecentFile);
            _recentSolutions = new MruMenuManager("RecentSolutions", 10, menuMainFile, menuMainFileRecentSolutions,
                                                  OpenRecentSolution);
            panelLeft.MinimumSize   = new Size(PanelMinWidth, PanelMinHeight);
            panelMain.MinimumSize   = new Size(PanelMinWidth, PanelMinHeight);
            panelRight.MinimumSize  = new Size(PanelMinWidth, PanelMinHeight);
            panelBottom.MinimumSize = new Size(PanelMinWidth, PanelMinHeight);
            _settings = CrcsSettings.LoadSettingsFile <MainFormSettings>() ?? new MainFormSettings(Bounds);
            SetTitle();

            if (Program.PlatformIsUnix)
            {
                menuMainHelpFileAssociation.Visible = false;
                menuMainHelpBar1.Visible            = false;
            }
        }