Exemple #1
0
        private void gridbutton_Click(object sender, EventArgs e)
        {
            OverviewlistBox.Items.Clear();
            object obj = gridcomboBox.SelectedItem;
            string name = tbname.Text;
            DateTime time = dateTimePicker1.Value;

            if (obj != null && name != "")
            {
                string grid = gridcomboBox.SelectedItem.ToString();
                WorkspaceDesign D = new WorkspaceDesign(grid, name, time);
                this.controller = Controller.getController();
                this.controller.setSettings(this.workpanel.Width, this.workpanel.Height, D);

                if (D.Grid == "Small")
                {
                    //4*4
                    this.controller.lines = 4;
                }
                else if (D.Grid == "Medium")
                {
                    //3*3
                    this.controller.lines = 3;
                }
                else if (D.Grid == "Large")
                {
                    //2*2
                    this.controller.lines = 2;
                }
                selectedimage = null;
                selectedCrossinginpanel = null;
                showgrid = true;
                this.workpanel.Invalidate();
                StatuslistBox.Items.Clear();

                PBtype1.Enabled = true;
                PBtype2.Enabled = true;
                cursorbutton.Enabled = true;
                buttonremove.Enabled = true;
                buttonclear.Enabled = true;
                setbutton.Enabled = true;

                IsSet = false;
            }
            else
            {
                string s = "😜";
                StatuslistBox.Items.Add("First:Choose the Grid & Name & Time. " + s);
            }
        }
Exemple #2
0
 public void setSettings(float pw, float ph, WorkspaceDesign d)
 {
     this.Design = d;
     this.panelw = pw;
     this.panelh = ph;
 }