public GUI() { InitializeComponent(); synth = new Synthesis(pGraphArea); helper = new helpTextController(); Control.CheckForIllegalCrossThreadCalls = false; buttons[0] = new Button(); buttons[0].Location = new Point(0, 0); buttons[0].Text = "Graf 1 [X]"; buttons[0].Click += chooseGraph; this.pTabs.Controls.Add(buttons[0]); buttons[7] = new Button(); buttons[7].Location = new Point(75, 0); buttons[7].Text = "Tilføj graf"; buttons[7].Click += addGraph_Click; this.pTabs.Controls.Add(buttons[7]); buttons[8] = new Button(); buttons[8].Location = new Point(875, 15); buttons[8].Text = "Videre"; buttons[8].Click += cycleHelp_Click; this.pInfoBox.Controls.Add(buttons[8]); buttons[8].BackColor = (Color.White); pInfoBox.Controls.Add(new Label()); String[] helpText = helper.Next(); updateHelpText(helpText[0], helpText[1]); }
/// <summary> /// Initializes a new instance of the <see cref="P2.CalcForm"/> class. /// </summary> /// <param name="synth">Synth.</param> public CalcForm(Synthesis synth) { this._synth = synth; InitializeComponent(); UpdateData(); setupContextMenu(); this.idealGasTitle.ContextMenu = cm; }
double tempDouble; // for temporary storage of floating point numbers /// <summary> /// Initializes a new instance of the <see cref="P2.GUI"/> class. /// </summary> public GUI() { InitializeComponent(); synth = new Synthesis(pGraphArea); synth.Updated += SynthUpdate; helper = new helpTextController(); Control.CheckForIllegalCrossThreadCalls = false; startUpInfo(); correctTextSize(); this.pTabs.Controls.Add(this.page1); this.pTabs.Deselecting += DeactivatePage; this.pTabs.Selecting += ActivatePage; page1.gh = synth.graphHandlers[0]; page1.gh.isActive = true; }
public GUI() { InitializeComponent(); synth = new Synthesis(pGraphArea); helper = new helpTextController(); Control.CheckForIllegalCrossThreadCalls = false; buttons[0] = new Button(); buttons[0].Location = new Point(0, 0); buttons[0].Text = "Graf 1 [X]"; buttons[0].Click += chooseGraph; this.pTabs.Controls.Add(buttons[0]); buttons[7] = new Button(); buttons[7].Location = new Point(75, 0); buttons[7].Text = "Tilføj graf"; buttons[7].Click += addGraph_Click; this.pTabs.Controls.Add(buttons[7]); pInfoBox.Controls.Add(new Label()); String[] helpText = helper.Next(); updateHelpText(helpText[0], helpText[1]); foreach (Control formItem in this.Controls) { if (formItem.GetType() == typeof(Panel)) { foreach (Control item in formItem.Controls) { autoScaleText(item); } } else if (formItem.GetType() == typeof(Label) || formItem.GetType() == typeof(CheckBox)) { autoScaleText(formItem); } } //Eventhandling til pGraphArea this.pGraphArea.Paint += pGraphArea.OnInvalidateEvent; this.pGraphArea.Invalidate(); }
public LoadMenu(Synthesis synth) { InitializeComponent(); _synth = synth; }