예제 #1
0
파일: Form1.cs 프로젝트: jrendean/Wanderer
        private TreeNode GenerateTreeNode(Robot.Wanderer.Bot bot)
        {
            TreeNode tn = new TreeNode(bot.EPROM.ID.ToString());

            tn.Nodes.Add(new TreeNode("ID: " + bot.EPROM.ID.ToString()));
            tn.Nodes.Add(new TreeNode("Communication Type: " + bot.EPROM.CommunicationType));
            tn.Nodes.Add(new TreeNode("Bump Sensors: " + bot.EPROM.BumpSensors));
            if (bot.EPROM.History == null)
            {
                tn.Nodes.Add(new TreeNode("Movement Count: N/A"));
                tn.Nodes.Add(new TreeNode("Transmission Count: N/A"));
                tn.Nodes.Add(new TreeNode("Reception Count: N/A"));
            }
            else
            {
                tn.Nodes.Add(new TreeNode("Movement Count: " + bot.EPROM.History.MovementCount));
                tn.Nodes.Add(new TreeNode("Transmission Count: " + bot.EPROM.History.TransmissionCount));
                tn.Nodes.Add(new TreeNode("Reception Count: " + bot.EPROM.History.ReceptionCount));
            }

            tn.Nodes.Add(new TreeNode("OS Type: " + bot.OS.Type));
            tn.Nodes.Add(new TreeNode("OS Generation: " + bot.OS.Generation));
            tn.Nodes.Add(new TreeNode("OS Process Running: " + bot.OS.Process.Running.ToString()));
            tn.Nodes.Add(new TreeNode("OS Process Fault: " + bot.OS.Process.Fault.ToString()));

            //PopulateExisting();

            return(tn);
        }
예제 #2
0
파일: Form1.cs 프로젝트: jrendean/Wanderer
        private void MoveBot(Robot.Wanderer.Enums.MovementDirection direction)
        {
            if (treeViewRobotList.SelectedNode == null)
            {
                return;
            }

            Robot.Wanderer.Bot bot = bots[new Guid(treeViewRobotList.SelectedNode.Text)];

            bot.DriveTrain.Move(direction);
        }
예제 #3
0
파일: Form1.cs 프로젝트: jrendean/Wanderer
 private void buttonCreateGenZero_Click(object sender, EventArgs e)
 {
     if (comboBoxGenZeroCommTypes.Text == String.Empty)
     {
         MessageBox.Show("You must select an entry");
     }
     else
     {
         Robot.Wanderer.Enums.CommunicationTypes commType = (Robot.Wanderer.Enums.CommunicationTypes)Enum.Parse(typeof(Robot.Wanderer.Enums.CommunicationTypes), comboBoxGenZeroCommTypes.Text);
         Robot.Wanderer.Bot bot = Robot.Wanderer.Bot.CreateGenZero(commType);
         AddBot(bot);
     }
 }
예제 #4
0
파일: Form1.cs 프로젝트: jrendean/Wanderer
 private void buttonCreateExisting_Click(object sender, EventArgs e)
 {
     if (listBoxExisting.SelectedIndex == -1)
     {
         MessageBox.Show("You must select an entry");
     }
     else
     {
         if (bots.ContainsKey(new Guid(listBoxExisting.SelectedItem.ToString())))
         {
             MessageBox.Show("Bot already created");
         }
         else
         {
             Robot.Wanderer.Bot bot = Robot.Wanderer.Bot.CreateExisting(new Guid(listBoxExisting.SelectedItem.ToString()));
             AddBot(bot);
         }
     }
 }
예제 #5
0
파일: Form1.cs 프로젝트: jrendean/Wanderer
 private void buttonCreateRandomListener_Click(object sender, EventArgs e)
 {
     Robot.Wanderer.Bot bot = Robot.Wanderer.Bot.CreateRandomListener();
     AddBot(bot);
 }