Exemple #1
0
        private void LispIDEForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Debug.WriteLineIf(IsFirstInstance, "First Instance Form Closing", "Debug");
            Debug.WriteLineIf(!IsFirstInstance, "Second Instance Form Closing", "Debug");

            ConfigurationManager.SaveWindowState(this);
            SaveOpenDocuments();
            ConfigurationManager.Save();
        }
Exemple #2
0
        private void LispIDEForm_Load(object sender, EventArgs e)
        {
            Debug.WriteLineIf(IsFirstInstance, "First Instance Form Loading", "Debug");
            Debug.WriteLineIf(!IsFirstInstance, "Second Instance Form Loading", "Debug");

            SetTitle();
            this.aboutToolStripMenuItem.Text = String.Format(CultureInfo.CurrentCulture, "&About {0}...", Program.Title);

            SetToolstripItemsEnabled(false);

            this.scintillaConfig = new ScintillaConfigurationManager();

            //For some reason, enter is not available in the form designer
            this.sendToLispToolStripMenuItem.ShortcutKeys  = Keys.Control | Keys.Enter;
            this.macroexpandToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.Shift | Keys.Enter;

            ConfigurationManager.RecentFiles.RecentFileChanged += recentFiles_RecentFileChanged;
            ConfigurationManager.RecentFiles.RecentFileClicked += recentFiles_RecentFileClicked;
            ConfigurationManager.RecentFiles.GenerateRecentFiles(recentFilesToolStripMenuItem);

            bool showRecentFiles = (ConfigurationManager.RecentFiles.FileList.Count > 0);

            recentFilesToolStripMenuItem.Visible  = showRecentFiles;
            recentFilesToolstripSeperator.Visible = showRecentFiles;

            LoadConfiguration();

            LoadOpenDocuments();

            string[] args = Environment.GetCommandLineArgs();

            LoadDocumentsFromArgs(args);

            ConfigurationManager.LoadWindowState(this);

            BeginWaitForConnection();
        }