public void FixtureTearDown() { settings = null; doc = null; mainForm.Dispose(); mainForm = null; }
/// <summary> /// Run FlashDevelop and catch any unhandled exceptions. /// </summary> static void RunFlashDevelopWithErrorHandling(String[] arguments, Boolean isFirst) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm.IsFirst = isFirst; MainForm.Arguments = arguments; MainForm mainForm = new MainForm(); SingleInstanceApp.NewInstanceMessage += delegate(Object sender, Object message) { MainForm.Arguments = message as String[]; mainForm.ProcessParameters(message as String[]); }; try { SingleInstanceApp.Initialize(); Application.Run(mainForm); } catch (Exception ex) { MessageBox.Show("There was an unexpected problem while running FlashDevelop: " + ex.Message, "Error"); } finally { SingleInstanceApp.Close(); } }
public TabbedDocument(MainForm mainForm, ScintillaControl sciControl) { string file = sciControl.Tag.ToString(); if (!file.StartsWith("Untitled")) { this.fileInfo = new FileInfo(file); } this.mainForm = mainForm; this.BackColor = Color.White; this.Text = Path.GetFileName(file); this.DockPanel = this.mainForm.DockPanel; this.DockableAreas = DockAreas.Document; this.Controls.Add(sciControl); this.Show(); }
public void FixtureSetUp() { mainForm = new MainForm(); settings = Substitute.For<ISettings>(); settings.UseTabs = true; settings.IndentSize = 4; settings.SmartIndentType = SmartIndent.CPP; settings.TabIndents = true; settings.TabWidth = 4; doc = Substitute.For<ITabbedDocument>(); mainForm.Settings = settings; mainForm.CurrentDocument = doc; mainForm.StandaloneMode = false; PluginBase.Initialize(mainForm); FlashDevelop.Managers.ScintillaManager.LoadConfiguration(); }
static void Main(String[] arguments) { if (Win32.ShouldUseWin32()) { if (SingleInstanceApp.AlreadyExists) { Boolean reUse = Array.IndexOf(arguments, "-reuse") > -1; if (!MultiInstanceMode || reUse) SingleInstanceApp.NotifyExistingInstance(arguments); else RunFlashDevelopWithErrorHandling(arguments, false); } else RunFlashDevelopWithErrorHandling(arguments, true); } else // For other platforms { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm.IsFirst = true; MainForm.Arguments = arguments; MainForm mainForm = new MainForm(); Application.Run(mainForm); } }
public MainForm() { MainForm.Instance = this; PluginBase.Initialize(this); this.InitializeErrorLog(); this.InitializeSettings(); this.InitializeLocalization(); if (this.InitializeFirstRun() != DialogResult.Abort) { this.InitializeRendering(); this.InitializeProperties(); this.InitializeComponents(); this.InitializeProcessRunner(); this.InitializeSmartDialogs(); this.InitializeMainForm(); this.InitializeGraphics(); Application.AddMessageFilter(this); } else this.Load += new EventHandler(this.MainFormLoaded); }
/** * Activates the access to the MainForm */ public void Initialize(MainForm mainForm) { this.mainForm = mainForm; }
public DockableWindow(MainForm mainForm, Control ctrl, string guid) { ctrl.Dock = DockStyle.Fill; this.Text = ctrl.Text; this.pluginGuid = guid; this.mainForm = mainForm; this.HideOnClose = true; this.TabText = ctrl.Tag.ToString(); this.DockPanel = this.mainForm.DockPanel; this.DockableAreas = DockAreas.DockBottom|DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.Float; this.Controls.Add(ctrl); this.Show(); }
public FDImage IGet(string data) { if (mainForm == null) mainForm = (MainForm)Globals.MainForm; Image image = (mainForm != null) ? mainForm.FindImage(data) : new Bitmap(16, 16); return new FDImage(image); }