示例#1
0
        public MainWindow()
        {
            InitializeComponent();
            Root_Ship_List();
            SetParameters.Instance = new SetParameters(ref SetParameters_Parameters_Panel);     //  Set up the Parameter-value fields list
            ParameterCollection.Add_Parameter_List("Balance_Parameters", new SetParameters(ref SetParameters_Parameters_Panel));
            ParameterCollection.Add_Parameter_List("Balanced_Fleet", new SetParameters(ref BalancedFleet_ShipAmount_Panel));
            ParameterCollection.Add_Parameter_List("Fleet_Parameters", new SetParameters(ref SetFleet_Parameters_Panel));


            SetParameters_Panel.Hide();
        }
示例#2
0
        /// <summary>
        /// Switch from Balance parameter panel to Fleet parameter panel
        /// </summary>
        /// <param name="_sender"></param>
        /// <param name="_e"></param>
        public void Switch_Parameter_Screen(object _sender, EventArgs _e)
        {
            ShowFleetTab = !ShowFleetTab;

            Button switchButton = (Button)_sender;

            switchButton.Text = (ShowFleetTab ? ("Show Balance Tab") : ("Show Fleet Tab"));

            if (ShowFleetTab)
            {
                SetFleet_Panel.Show();
                SetParameters_Panel.Hide();
            }
            else if (!ShowFleetTab)
            {
                SetParameters_Panel.Show();
                SetFleet_Panel.Hide();
            }
        }