Example #1
0
        public override bool Loaded()
        {
            Host2 = Host;

            but = new ToolStripMenuItem("Survey (Grid)");
            but.Click += but_Click;

            bool hit = false;
            ToolStripItemCollection col = Host.FPMenuMap.Items;
            int index = col.Count;
            foreach (ToolStripItem item in col)
            {
                if (item.Text.Equals("Auto WP"))
                {
                    index = col.IndexOf(item);
                    ((ToolStripMenuItem)item).DropDownItems.Add(but);
                    hit = true;
                    break;
                }
            }

            if (hit == false)
                col.Add(but);

            return true;
        }
        public override bool Loaded()
        {
            Host2 = Host;

            but        = new ToolStripMenuItem("SimpleGrid");
            but.Click += but_Click;

            bool hit = false;
            ToolStripItemCollection col = Host.FPMenuMap.Items;
            int index = col.Count;

            foreach (ToolStripItem item in col)
            {
                if (item.Text.Equals(Strings.AutoWP))
                {
                    index = col.IndexOf(item);
                    ((ToolStripMenuItem)item).DropDownItems.Add(but);
                    hit = true;
                    break;
                }
            }

            if (hit == false)
            {
                col.Add(but);
            }

            return(true);
        }
        public override bool Loaded()
        {
            Host2 = Host;

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GridUI));
            var temp = (string)(resources.GetObject("$this.Text"));

            but = new ToolStripMenuItem(temp);
            but.Click += but_Click;

            bool hit = false;
            ToolStripItemCollection col = Host.FPMenuMap.Items;
            int index = col.Count;
            foreach (ToolStripItem item in col)
            {
                if (item.Text.Equals("Auto WP"))
                {
                    index = col.IndexOf(item);
                    ((ToolStripMenuItem)item).DropDownItems.Add(but);
                    hit = true;
                    break;
                }
            }

            if (hit == false)
                col.Add(but);

            return true;
        }
Example #4
0
        public override bool Loaded()
        {
            Host2 = Host;

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GridUI));
            var temp = (string)(resources.GetObject("$this.Text"));

            but        = new ToolStripMenuItem(temp);
            but.Click += but_Click;

            bool hit = false;
            ToolStripItemCollection col = Host.FPMenuMap.Items;
            int index = col.Count;

            foreach (ToolStripItem item in col)
            {
                if (item.Text.Equals("Auto WP"))
                {
                    index = col.IndexOf(item);
                    ((ToolStripMenuItem)item).DropDownItems.Add(but);
                    hit = true;
                    break;
                }
            }

            if (hit == false)
            {
                col.Add(but);
            }

            return(true);
        }
        public override bool Loaded()
        {
            Host2 = Host;

            but        = new ToolStripMenuItem("SprayPlanner");
            but.Click += but_Click;

            bool hit = false;
            ToolStripItemCollection col = Host.FPMenuMap.Items;

            col.Insert(0, but);

            this.mapOverlayFD = new GMapOverlay("return_point");
            this.mapOverlayFP = new GMapOverlay("return_point");

            Host.FDGMapControl.Overlays.Add(this.mapOverlayFD);
            Host.FPGMapControl.Overlays.Add(this.mapOverlayFP);


            if (Host.config.ContainsKey("sprayplan_pump_pwm"))
            {
                pump_pwm = double.Parse(Host.config["sprayplan_pump_pwm"].ToString());
            }
            if (Host.config.ContainsKey("sprayplan_pump_servo"))
            {
                pump_servo = double.Parse(Host.config["sprayplan_pump_servo"].ToString());
            }
            if (Host.config.ContainsKey("sprayplan_spinner_pwm"))
            {
                spinner_pwm = double.Parse(Host.config["sprayplan_spinner_pwm"].ToString());
            }
            if (Host.config.ContainsKey("sprayplan_spinner_servo"))
            {
                spinner_servo = double.Parse(Host.config["sprayplan_spinner_servo"].ToString());
            }
            if (Host.config.ContainsKey("sprayplan_tank_low"))
            {
                tank_low = int.Parse(Host.config["sprayplan_tank_low"].ToString());
            }
            if (Host.config.ContainsKey("sprayplan_spray_delay"))
            {
                spray_delay = int.Parse(Host.config["sprayplan_spray_delay"].ToString());
            }


            return(true);
        }
Example #6
0
        public override bool Loaded()
        {
            Host2 = Host;

            ToolStripMenuItem but = new ToolStripMenuItem("Survey (Grid)");

            but.Click += but_Click;

            ToolStripItemCollection col = Host.FPMenuMap.Items;
            int index = col.Count;

            foreach (ToolStripItem item in col)
            {
                if (item.Text.Equals("Auto WP"))
                {
                    index = col.IndexOf(item);
                    ((ToolStripMenuItem)item).DropDownItems.Add(but);
                    break;
                }
            }

            return(true);
        }