/** * The main GUI window */ public SwarmAgentWindow() { InitializeComponent(); this.BarToolTip = new System.Windows.Forms.ToolTip(); this.BarToolTip.AutoPopDelay = 60000; this.BarToolTip.InitialDelay = 500; this.BarToolTip.ReshowDelay = 0; this.BarToolTip.ShowAlways = true; // Force the ToolTip text to be displayed whether or not the form is active. AgentApplication.Options = ReadOptions <SettableOptions>("SwarmAgent.Options.xml"); AgentApplication.Options.PostLoad(); AgentApplication.DeveloperOptions = ReadOptions <SettableDeveloperOptions>("SwarmAgent.DeveloperOptions.xml"); AgentApplication.DeveloperOptions.PostLoad(); CreateBarColours(this); LogOutputWindowView.Document = MainLogDoc; SettingsPropertyGrid.SelectedObject = AgentApplication.Options; DeveloperSettingsPropertyGrid.SelectedObject = AgentApplication.DeveloperOptions; UpdateWindowState(); // Set the title bar to include the name of the machine and the group TopLevelControl.Text = "Swarm Agent running on " + Environment.MachineName; LogOutputWindowView.Refresh(); }
private void UpdateFonts() { // Set the requested font LogOutputWindowView.Font = new Font(AgentApplication.Options.TextFont.ToString(), 9F); VisualiserGridView.Font = LogOutputWindowView.Font; SettingsPropertyGrid.Font = LogOutputWindowView.Font; LogOutputWindowView.Refresh(); }