//PdfOverlay pdfOverlay1; public Form1() { //make sure that double to string is converted with decimal point (not comma!) System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); (GlobalUI.UI as GlobalUIWinForms).MainForm = this; TheVM = new MainWindowVM <TextEditorDocumentWrapper>(TheCompiler.Instance); InitializeComponent(); if (DesignMode) { return; } TextEditorDocumentWrapper.TheOneAndOnly = txtCode; // The order should be exactly the same as that in the OverlayToolType enum!!! ToolButtons = new List <ToolStripButton> { cmdMove, cmdNode, cmdEdge, cmdPath, cmdSmoothCurve, cmdBezier, cmdRectangle, cmdEllipse, cmdGrid, cmdArc, cmdArcEdit }; ToolPaneButtons = new List <ToolStripButton> { cmdSnippets, cmdFiles, cmdDynPreamble }; SetupComponents(); SetupBindings(); GlobalUI.UI.OnRecentFileEvent += (s, e) => { if (e.IsInsert) { MyMRU.Insert(e.FileName); } else { MyMRU.Remove(e.FileName); } }; MyMRU.OnFileOpen += (s, e) => TheVM.Open(e.FileName, ModifierKeys.HasFlag(Keys.Control)); TheVM.CreateNewFile(false); }
private void fileToolStripMenuItem_DropDownOpening(object sender, EventArgs e) { MyMRU.UpdateMenu(fileToolStripMenuItem, toolStripSeparatorMRU); }