示例#1
0
        private void makeNewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            platform p = new platform("choose name");

            _list_platform.Add(p);
            list_platform_refresh();
            toolStripComboBox_selected_platform.SelectedItem = p;
        }
示例#2
0
        private void dbghideToolStripMenuItem_Click(object sender, EventArgs e)
        {
            platform p = (platform)toolStripComboBox_selected_platform.SelectedItem;

            foreach (platform_control pc in p._list_platform_control)
            {
                pictureBox_platform.Controls.Remove(pc._PictureBox);
            }
        }
示例#3
0
        private void delete_all_controlls()
        {
            platform p = (platform)toolStripComboBox_selected_platform.SelectedItem;

            foreach (platform_control pc in p._list_platform_control)
            {
                pictureBox_platform.Controls.Remove(pc._PictureBox);
            }
            p._list_platform_control.Clear();
        }
示例#4
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_list_platform.Count > 0)
     {
         delete_all_controlls();
         platform p = (platform)toolStripComboBox_selected_platform.SelectedItem;
         _list_platform.Remove(p);
         p = null;
         platform_selected = (platform)toolStripComboBox_selected_platform.Items[0];
         list_platform_refresh();
     }
     else
     {
         MessageBox.Show("no platform exists", "Error");
     }
 }
示例#5
0
        private void toolStripComboBox_selected_platform_SelectedIndexChanged(object sender, EventArgs e)
        {
            button_new_platform_name_save.Visible = false;
            platform_selected = (platform)toolStripComboBox_selected_platform.SelectedItem;

            paint_platform();

            if (platform_selected._floor_plan != null)
            {
                for (int i = 0; i < comboBox_floor_plan.Items.Count; i++)
                {
                    if (((floor_plan)comboBox_floor_plan.Items[i]).ToString() == platform_selected._floor_plan.ToString())
                    {
                        comboBox_floor_plan.SelectedIndex = i;
                    }
                }
            }
        }