Exemple #1
0
 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]);
 }
        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();
        }
Exemple #3
0
 private void FurtherInfoBox_Click(object sender, EventArgs e)
 {
     String[] helpText = helper.Next();
     updateHelpText(helpText[0], helpText[1]);
 }
Exemple #4
0
 /// <summary>
 /// Creates the initial text for the infobox
 /// </summary>
 private void startUpInfo()
 {
     pInfoBox.Controls.Add(new Label());
     String[] helpText = helper.Next();
     updateHelpText(helpText[0], helpText[1]);
 }
Exemple #5
0
 private void cycleHelp_Click(object sender, EventArgs e)
 {
     String[] helpText = helper.Next();
     updateHelpText(helpText[0], helpText[1]);
 }