public void Build(ResultsExtractor.MyForm form1)
        {
            this.form1 = form1;

            //this.MakeCurrent();

            ReserveTextureID();

            this.Paint  += GLControl_Paint;
            this.Resize += GLControl_Resize;

            GL.ClearColor(BackGroundColor);
        }
コード例 #2
0
ファイル: SolverFunctions.cs プロジェクト: rstamatov/CellTool
                public FunctionLibrary(ResultsExtractor.MyForm form1)
                {
                    this.form1            = form1;
                    this.Dock             = DockStyle.Left;
                    this.Width            = 150;
                    this.ShowNodeToolTips = false;
                    this.BorderStyle      = BorderStyle.None;
                    this.BackColor        = ResultsExtractor.Parametars.BackGround2Color;
                    this.ForeColor        = ResultsExtractor.Parametars.ShriftColor;
                    this.CheckBoxes       = false;
                    this.ShowRootLines    = false;
                    this.ShowPlusMinus    = false;

                    LoadFunctions();
                }
コード例 #3
0
ファイル: SolverFunctions.cs プロジェクト: rstamatov/CellTool
 public SolverFunctions(ResultsExtractor.MyForm form1)
 {
     this.form1 = form1;
     dialog     = new SolverDialog(form1);
 }
コード例 #4
0
ファイル: SolverFunctions.cs プロジェクト: rstamatov/CellTool
            public SolverDialog(ResultsExtractor.MyForm form1)
            {
                this.form1 = form1;
                this.SuspendLayout();

                //settings
                this.StartPosition   = FormStartPosition.CenterScreen;
                this.WindowState     = FormWindowState.Normal;
                this.Icon            = Properties.Resources.CT_done;
                this.FormBorderStyle = FormBorderStyle.Sizable;
                this.MinimizeBox     = false;
                this.MaximizeBox     = false;
                this.BackColor       = ResultsExtractor.Parametars.BackGroundColor;
                this.ForeColor       = ResultsExtractor.Parametars.ShriftColor;
                this.Width           = 450;
                this.Height          = 300;
                this.MinimumSize     = new Size(300, 300);
                this.Text            = "Solver Functions";
                //controls
                tw = new FunctionLibrary(form1);
                this.Controls.Add(tw);
                //Menu Panel
                Panel MenuPanel = new Panel();

                MenuPanel.Height = 30;
                MenuPanel.Dock   = DockStyle.Top;
                this.Controls.Add(MenuPanel);

                MenuStrip Menu = new MenuStrip();

                Menu.BackColor = ResultsExtractor.Parametars.BackGroundColor;
                Menu.ForeColor = ResultsExtractor.Parametars.ShriftColor;
                MenuPanel.Controls.Add(Menu);

                //Open Btn
                ToolStripMenuItem OpenBtn = new ToolStripMenuItem();

                OpenBtn.Text      = "Load";
                OpenBtn.BackColor = ResultsExtractor.Parametars.BackGroundColor;
                OpenBtn.ForeColor = ResultsExtractor.Parametars.ShriftColor;
                OpenBtn.Click    += Load_Click;
                Menu.Items.Add(OpenBtn);

                ToolStripMenuItem ExportBtn = new ToolStripMenuItem();

                ExportBtn.Text      = "Export";
                ExportBtn.BackColor = ResultsExtractor.Parametars.BackGroundColor;
                ExportBtn.ForeColor = ResultsExtractor.Parametars.ShriftColor;
                ExportBtn.Click    += Export_Click;
                Menu.Items.Add(ExportBtn);

                //Settings panel
                Panel setP = new Panel();

                setP.Width = 280;
                setP.Dock  = DockStyle.Fill;
                this.Controls.Add(setP);
                setP.BringToFront();

                setP.SuspendLayout();

                int h = 5;

                nameTB  = new TextBox();
                ifTB    = new TextBox();
                form1TB = new TextBox();
                form2Tb = new TextBox();
                parTB   = new TextBox();

                TextBox tb = nameTB;

                {
                    //label
                    Label lab = new Label();
                    lab.Text     = "Name:";
                    lab.Width    = 60;
                    lab.Location = new Point(5, h + 3);
                    setP.Controls.Add(lab);
                    //text box
                    tb.Width    = 180;
                    tb.Location = new Point(70, h);
                    setP.Controls.Add(tb);
                    h        += 30;
                    tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                }

                tb = ifTB;
                {
                    //label
                    Label lab = new Label();
                    lab.Text     = "IF:";
                    lab.Width    = 60;
                    lab.Location = new Point(5, h + 3);
                    setP.Controls.Add(lab);
                    //text box
                    tb.Width    = 180;
                    tb.Location = new Point(70, h);
                    setP.Controls.Add(tb);
                    h        += 30;
                    tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                }

                tb = form1TB;
                {
                    //label
                    Label lab = new Label();
                    lab.Text     = "F1():";
                    lab.Width    = 60;
                    lab.Location = new Point(5, h + 3);
                    setP.Controls.Add(lab);
                    //text box
                    tb.Width    = 180;
                    tb.Location = new Point(70, h);
                    setP.Controls.Add(tb);
                    h        += 30;
                    tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                }

                tb = form2Tb;
                {
                    //label
                    Label lab = new Label();
                    lab.Text     = "F2():";
                    lab.Width    = 60;
                    lab.Location = new Point(5, h + 3);
                    setP.Controls.Add(lab);
                    //text box
                    tb.Width    = 180;
                    tb.Location = new Point(70, h);
                    setP.Controls.Add(tb);
                    h        += 30;
                    tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                }

                tb = parTB;
                {
                    //label
                    Label lab = new Label();
                    lab.Text     = "Variables:";
                    lab.Width    = 60;
                    lab.Location = new Point(5, h + 3);
                    setP.Controls.Add(lab);
                    //text box
                    tb.Width    = 180;
                    tb.Location = new Point(70, h);
                    setP.Controls.Add(tb);
                    h        += 30;
                    tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                }

                int w = 5;

                h += 30;

                Button btn = new Button();

                {
                    btn.Width     = 80;
                    btn.ForeColor = Color.Black;
                    btn.Text      = "Save";
                    btn.BackColor = SystemColors.ButtonFace;
                    btn.Location  = new Point(w, h);
                    setP.Controls.Add(btn);
                    w         += 85;
                    btn.Click += Save_Click;
                }

                btn = new Button();
                {
                    btn.Width     = 80;
                    btn.ForeColor = Color.Black;
                    btn.Text      = "Save As New";
                    btn.BackColor = SystemColors.ButtonFace;
                    btn.Location  = new Point(w, h);
                    setP.Controls.Add(btn);
                    w         += 85;
                    btn.Click += SaveAs_Click;
                }

                btn = new Button();
                {
                    btn.Width     = 80;
                    btn.ForeColor = Color.Black;
                    btn.Text      = "Delete";
                    btn.BackColor = SystemColors.ButtonFace;
                    btn.Location  = new Point(w, h);
                    setP.Controls.Add(btn);
                    w         += 85;
                    btn.Click += Delete_Click;
                }

                setP.ResumeLayout();
                //events
                this.FormClosing += Form_Closing;
                tw.AfterSelect   += tw_NodeClick;
                tw_Refresh();

                this.ResumeLayout();
            }