Example #1
0
        internal draw()
        {
            draw_form = new WindowsFormsApplication1.Form1();
            draw_form.ShowDialog();

            Console.WriteLine("\n\nEXIT\n");
        }
        private void btnMove_Click(object sender, EventArgs e)
        {
            WindowsFormsApplication1.Form1 myform = Application.OpenForms.Cast <WindowsFormsApplication1.Form1>().First();
            myform.MoveOnKanban();

            this.Close();
        }
Example #3
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     usuario.username = "";
     usuario.Rol      = "";
     WindowsFormsApplication1.Form1 f1 = new WindowsFormsApplication1.Form1();
     this.Close();
     f1.Show();
 }
        public PartsList(DataGridViewRowCollection rows, string inputSR, string inputSN, string inputModel)
        {
            InitializeComponent();

            this.SR    = inputSR;
            this.SN    = inputSN;
            this.model = inputModel;

            foreach (DataGridViewRow r in rows)
            {
                this.partsused.Add(r);
            }

            var partsreader = new StreamReader(@"T:\Databases\Parts_List.csv");

            while (!partsreader.EndOfStream)
            {
                partslist.Add(partsreader.ReadLine());
            }
            partsreader.Close();

            foreach (DataGridViewRow dgvr in rows)
            {
                int quantity = 1;

                if (((string)dgvr.Cells[1].Value).Contains(" x "))
                {
                    var values = ((string)dgvr.Cells[1].Value).Split(' ');
                    quantity = Int32.Parse(values[values.Length - 1]);
                }

                string destination = "";
                string pn          = (string)dgvr.Cells[0].Value;

                foreach (string s in partslist)
                {
                    if (s.Contains(pn))
                    {
                        var values = s.Split(',');
                        if (values[8] == "N" && (string)dgvr.Cells[2].Value == "")
                        {
                            destination = "SCRAP BIN";
                        }
                        break;
                    }
                }

                string[] t_row = { ((string)dgvr.Cells[0].Value).ToString(), quantity.ToString(), ((string)dgvr.Cells[4].Value).ToString(), ((string)dgvr.Cells[1].Value).ToString(), destination, ((string)dgvr.Cells[2].Value).ToString(), ((string)dgvr.Cells[3].Value).ToString() };

                dgvPartsList.Rows.Add(t_row);
            }

            WindowsFormsApplication1.Form1 myform = Application.OpenForms.Cast <WindowsFormsApplication1.Form1>().First();
            myform.Enabled = false;
        }
Example #5
0
        public Form1()
        {
            InitializeComponent();

            btnCalc.Click += ((s, e) => {
                var calc = new WindowsFormsApplication1.Form1();
                calc.TopLevel = false;
                //this.Controls.Add(calc);
                this.pnlMain.Controls.Add(calc);
                calc.Show();
                calc.BringToFront();
            });
        }
Example #6
0
        private void button8_Click(object sender, EventArgs e)
        {
            Button temp = sender as Button;

            podkl.Open();
            komand = new OleDbCommand("Select [Код заказа] FROM [Заказы] WHERE [Когда закрыт] Is NULL AND [Номер стола]=999999", podkl);
            post   = komand.ExecuteReader();
            post.Read();
            Form1 frm = new WindowsFormsApplication1.Form1(Owner, name, dolznost, post.GetValue(0).ToString());

            frm.Owner = this;
            frm.Show();
            podkl.Close();
            this.Hide();
        }
Example #7
0
        /// <summary>
        ///get executing time for a path
        ///</summary>
        public void visualizeFloorPlan(FloorPlan floorPlan, int StartX, int StartY, int TargetX, int TargetY)
        {
            floorPlan.setStartTile(StartX, StartY);
            floorPlan.setTargetTile(TargetX, TargetY);
            QGPathFinder     target = new QGPathFinder(floorPlan);
            List <FloorTile> actual;

            actual = target.getPath();

            Form f = new WindowsFormsApplication1.Form1(floorPlan, actual);

            Application.Run(f);

            //f.Invoke();
            //f.Draw(floorPlan, actual);
        }
Example #8
0
        /// <summary>
        ///get executing time for a path
        ///</summary>
        public void visualizeFloorPlan(FloorPlan floorPlan, int StartX, int StartY, int TargetX, int TargetY)
        {
            floorPlan.setStartTile(StartX, StartY);
            floorPlan.setTargetTile(TargetX, TargetY);
            QGPathFinder target = new QGPathFinder(floorPlan);
            List<FloorTile> actual;

            actual = target.getPath();

            Form f = new WindowsFormsApplication1.Form1(floorPlan, actual);
            Application.Run(f);

            //f.Invoke();
            //f.Draw(floorPlan, actual);
        }
Example #9
0
 public Form2()
 {
     InitializeComponent();
     WindowsFormsApplication1.Form1 f1 = new WindowsFormsApplication1.Form1();
 }
Example #10
0
 static void Main(string[] args)
 {
     frm = new WindowsFormsApplication1.Form1();
     frm.textBox1.TextChanged += textBox1_TextChanged;
     System.Windows.Forms.Application.Run(frm);
 }
 private void PartsList_FormClosed(object sender, FormClosedEventArgs e)
 {
     WindowsFormsApplication1.Form1 myform = Application.OpenForms.Cast <WindowsFormsApplication1.Form1>().First();
     myform.Enabled = true;
 }