Example #1
0
        void but_Click(object sender, EventArgs e)
        {
            using (var gridui = new GridUI(this))
            {
                MissionPlanner.Utilities.ThemeManager.ApplyThemeTo(gridui);

                if (Host.FPDrawnPolygon != null && Host.FPDrawnPolygon.Points.Count > 2)
                {
                    gridui.ShowDialog();
                }
                else
                {
                    if (
                        CustomMessageBox.Show("No polygon defined. Load a file?", "Load File", MessageBoxButtons.YesNo) ==
                        DialogResult.Yes)
                    {
                        gridui.LoadGrid();
                        gridui.ShowDialog();
                    }
                    else
                    {
                        CustomMessageBox.Show("Please define a polygon.", "Error");
                    }
                }
            }
        }
Example #2
0
 void but_Click(object sender, EventArgs e)
 {
     if (Host.FPDrawnPolygon != null && Host.FPDrawnPolygon.Points.Count > 0)
     {
         Form gridui = new GridUI(this);
         gridui.Show();
     }
     else
     {
         CustomMessageBox.Show("Please define a polygon.", "Error");
     }
 }
Example #3
0
 void but_Click(object sender, EventArgs e)
 {
     if (Host.FPDrawnPolygon != null && Host.FPDrawnPolygon.Points.Count > 2)
     {
         Form gridui = new GridUI(this);
         MissionPlanner.Utilities.ThemeManager.ApplyThemeTo(gridui);
         gridui.ShowDialog();
     }
     else
     {
         CustomMessageBox.Show("Please define a polygon.", "Error");
     }
 }
        void but_Click(object sender, EventArgs e)
        {                                       //line below is passing in itself as its own plugin
            var gridui = new GridUI(this);      //calls the GridUI.cs program file and created a new List and Dictionary
            MissionPlanner.Utilities.ThemeManager.ApplyThemeTo(gridui);

            if (Host.FPDrawnPolygon != null && Host.FPDrawnPolygon.Points.Count > 2)    //needs more than 3 WP to create a grid
            {                                     //because obviouslly you can't create a grid with just a line that is defined
                gridui.ShowDialog();              //this is where the separate window opens with the yellow flight path shown
            }
            else
            {
                if (CustomMessageBox.Show("No polygon defined. Load a file?", "Load File", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {                        //this asks the user a yes or no question to load a file
                    gridui.LoadGrid();   //if yes, they get the loaded file and produce a result and load the grid
                    gridui.ShowDialog(); //I think that this is the function that adds the grid to the map (addtomap replacement)
                }
                else                 //if no, tells the user to define a polygon (becasue you can't create a grid with no polygon)
                {
                    CustomMessageBox.Show("Please define a polygon.", "Error");
                }
            }
        }
Example #5
0
        void but_Click(object sender, EventArgs e)
        {
            var gridui = new GridUI(this);

            MissionPlanner.Utilities.ThemeManager.ApplyThemeTo(gridui);

            if (Host.FPDrawnPolygon != null && Host.FPDrawnPolygon.Points.Count > 2)
            {
                gridui.ShowDialog();
            }
            else
            {
                if (CustomMessageBox.Show("No polygon defined. Load a file?", "Load File", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    gridui.LoadGrid();
                    gridui.ShowDialog();
                }
                else
                {
                    CustomMessageBox.Show("Please define a polygon.", "Error");
                }
            }
        }
Example #6
0
File: GCS.cs Project: kkouer/PcGcs
        private void button15_Click(object sender, EventArgs e)
        {
            if (drawnpolygon.Points != null && drawnpolygon.Points.Count > 2)
            {

                //生成之前清除所有航点
                quickadd = true;
                // mono fix
                Commands.CurrentCell = null;
                Commands.Rows.Clear();
                selectedrow = 0;
                quickadd = false;
                writeKML();
                ///清除完成
                
                GridUI gui = new GridUI(drawnpolygon.Points, this);
                gui.ShowDialog();
            }
            else
            {
                CustomMessageBox.Show("请先添加航线范围.");
            }
        }