Exemple #1
0
 private void BitgraphGUI_ClientSizeChanged(object sender, EventArgs e)
 {
     if (Maximised != (WindowState == FormWindowState.Maximized))
     {
         GraphMan.ForceResize();
         Maximised = !Maximised;
     }
 }
Exemple #2
0
 private void BitgraphGUI_ResizeEnd(object sender, EventArgs e)
 {
     GraphMan.ForceResize();
 }
Exemple #3
0
        private void BitgraphGUI_Load(object sender, EventArgs e)
        {
            Maximised = WindowState == FormWindowState.Maximized;

            SplitVert.SplitterDistance = Convert.ToInt32(Math.Round(Width - 320f, 0));
            SplitHori.SplitterDistance = Convert.ToInt32(Math.Round(Height * 0.5f, 0));

            TabCtrl.TabPages.Add(PageOptions);
            TabCtrl.TabPages.Add(PageSchema);
            TabCtrl.TabPages.Add(PageHelp);
            TabCtrl.TabPages.Add(PageAbout);

            GraphMan.LblXAxis.Text = ValueTable.ColumnNames[0];
            GraphMan.LblYAxis.Text =
                ValueTable.ColumnNames[1] + ",  Farbe Rot\n" +
                ValueTable.ColumnNames[2] + ",  Farbe Blau\n" +
                ValueTable.ColumnNames[3] + ",  Farbe Grün";

            GraphMan.SetParent(SplitVert.Panel1);
            ValueTbl.SetParent(SplitHori.Panel2);

            OptionValues = GraphMan.GetOptionsList();
            int top   = 10;
            int left  = 5;
            int width = PageOptions.Width - 10;

            foreach (CheckBox cbx in OptionValues)
            {
                cbx.Parent = PageOptions;
                cbx.Top    = top;
                cbx.Left   = left;
                cbx.Width  = width;
                top       += 30;
            }

            ActionButtons = GraphMan.GetActionsList(ValueTbl);
            foreach (Button btn in ActionButtons)
            {
                btn.Parent = PageOptions;
                btn.Top    = top;
                btn.Left   = left;
                btn.Width  = width;
                top       += 30;
            }

            top        += 20;
            GraphScales = GraphMan.GetScales();
            // Half is the break between X and Y relevant values
            int element = 1;

            width = (width / (GraphScales.Count / 2)) - 20;
            foreach (NumericUpDown numUpDown in GraphScales)
            {
                numUpDown.Parent = PageOptions;
                numUpDown.Top    = top;
                numUpDown.Left   = left + (width + 20) * (2 - (element % (GraphScales.Count / 2)));
                numUpDown.Width  = width;
                Label lbl = new Label {
                    Parent = PageOptions, BackColor = Color.Transparent, Text = numUpDown.Name, Top = numUpDown.Top - 20, Left = numUpDown.Left, Width = numUpDown.Width
                };
                GraphScalesText.Add(lbl);
                if (element % (GraphScales.Count / 2) == 0)
                {
                    top += 45;
                }
                element += 1;
            }
        }