コード例 #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            bool checking = true;
            int  xp       = m[0].X;

            foreach (MobileRobot r in m)
            {
                if (xp != r.X)
                {
                    checking = false;
                    break;
                }
            }

            if (checking)
            {
                //MessageBox.Show("We Have formed a line");
                //MessageBox.Show(noOfcycles());
                //drawmap();
                drawplot();
                System.Windows.Forms.Application.Exit();
            }

            else
            {
                //MessageBox.Show("Sorry! Still on the way.");
                string        title      = "Status of the robots : ";
                string        message    = "Sorry! Still on the way.";
                NewMessageBox msgResized = new NewMessageBox(title, message);
                msgResized.StartPosition = FormStartPosition.CenterScreen;
                msgResized.Show();
            }
        }
コード例 #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            string        title      = "Total No of cycles(LCM) by Swarms : ";
            string        message    = " " + noOfcycles();
            NewMessageBox msgResized = new NewMessageBox(title, message);

            msgResized.StartPosition = FormStartPosition.CenterScreen;
            msgResized.Show();
        }