Ejemplo n.º 1
0
            public SquadronUI(int baseAirCorpsID, int squadronID, DialogBaseAirCorpsSimulation parent)
            {
                BaseAirCorpsID = baseAirCorpsID;
                SquadronID     = squadronID;

                AircraftCategory               = new ComboBox();
                AircraftCategory.Size          = new Size(160, AircraftCategory.Height);
                AircraftCategory.Anchor        = AnchorStyles.None;
                AircraftCategory.Margin        = new Padding(2, 0, 2, 0);
                AircraftCategory.DropDownStyle = ComboBoxStyle.DropDownList;
                AircraftCategory.Items.AddRange(ComboBoxCategory.GetAllCategories().ToArray());
                AircraftCategory.SelectedValueChanged += AircraftCategory_SelectedValueChanged;

                Aircraft                       = new ComboBox();
                Aircraft.Size                  = new Size(240, Aircraft.Height);
                Aircraft.Anchor                = AnchorStyles.None;
                Aircraft.Margin                = new Padding(2, 0, 2, 0);
                Aircraft.DropDownStyle         = ComboBoxStyle.DropDownList;
                Aircraft.SelectedValueChanged += Aircraft_SelectedValueChanged;

                AircraftCount               = new NumericUpDown();
                AircraftCount.Size          = new Size(60, AircraftCount.Height);
                AircraftCount.Anchor        = AnchorStyles.None;
                AircraftCount.Maximum       = AircraftCount.Minimum = 0;
                AircraftCount.TextAlign     = HorizontalAlignment.Right;
                AircraftCount.Margin        = new Padding(2, 0, 2, 0);
                AircraftCount.ValueChanged += AircraftCount_ValueChanged;

                AirSuperioritySortie     = NewLabel();
                AirSuperiorityAirDefense = NewLabel();
                Distance         = NewLabel();
                Bomber           = NewLabel();
                Torpedo          = NewLabel();
                OrganizationCost = NewLabel();

                Parent          = parent;
                ToolTipInternal = parent.ToolTipInfo;

                Update();
            }
Ejemplo n.º 2
0
            public BaseAirCorpsUI(int baseAirCorpsID, DialogBaseAirCorpsSimulation parent)
            {
                BaseAirCorpsID = baseAirCorpsID;

                TitleAircraftCategory         = NewTitleLabel();
                TitleAircraft                 = NewTitleLabel();
                TitleAircraftCount            = NewTitleLabel();
                TitleAirSuperioritySortie     = NewTitleLabel();
                TitleAirSuperiorityAirDefense = NewTitleLabel();
                TitleDistance                 = NewTitleLabel();
                TitleBomber             = NewTitleLabel();
                TitleTorpedo            = NewTitleLabel();
                TitleOrganizationCost   = NewTitleLabel();
                TitleAutoAirSuperiority = NewTitleLabel();
                TitleAutoDistance       = NewTitleLabel();

                TitleAircraftCategory.Text         = "カテゴリ";
                TitleAircraft.Text                 = "配備機";
                TitleAircraftCount.Text            = "機数";
                TitleAirSuperioritySortie.Text     = "出撃制空";
                TitleAirSuperiorityAirDefense.Text = "防空制空";
                TitleDistance.Text                 = "半径";
                TitleBomber.Text             = "爆装";
                TitleTorpedo.Text            = "雷装";
                TitleOrganizationCost.Text   = "配備コスト";
                TitleAutoAirSuperiority.Text = "目標制空";
                TitleAutoDistance.Text       = "目標半径";

                AutoAirSuperiority           = new NumericUpDown();
                AutoAirSuperiority.Size      = new Size(60, AutoAirSuperiority.Height);
                AutoAirSuperiority.Anchor    = AnchorStyles.None;
                AutoAirSuperiority.Maximum   = 9999;
                AutoAirSuperiority.TextAlign = HorizontalAlignment.Right;
                AutoAirSuperiority.Margin    = new Padding(2, 0, 2, 0);

                AutoDistance           = new NumericUpDown();
                AutoDistance.Size      = new Size(60, AutoDistance.Height);
                AutoDistance.Anchor    = AnchorStyles.None;
                AutoDistance.Maximum   = 20;
                AutoDistance.TextAlign = HorizontalAlignment.Right;
                AutoDistance.Margin    = new Padding(2, 0, 2, 0);

                AutoAirSuperiorityMode               = new ComboBox();
                AutoAirSuperiorityMode.Size          = new Size(160, AutoAirSuperiorityMode.Height);
                AutoAirSuperiorityMode.Anchor        = AnchorStyles.None;
                AutoAirSuperiorityMode.Margin        = new Padding(2, 0, 2, 0);
                AutoAirSuperiorityMode.DropDownStyle = ComboBoxStyle.DropDownList;
                AutoAirSuperiorityMode.Items.Add(-1);
                AutoAirSuperiorityMode.Items.Add(1);
                AutoAirSuperiorityMode.Items.Add(2);
                AutoAirSuperiorityMode.Items.Add(0);
                AutoAirSuperiorityMode.Items.Add(3);
                AutoAirSuperiorityMode.Items.Add(4);
                AutoAirSuperiorityMode.FormattingEnabled = true;
                AutoAirSuperiorityMode.Format           += AutoAirSuperiorityMode_Format;
                AutoAirSuperiorityMode.SelectedIndex     = 0;

                AutoOrganizeSortie        = new Button();
                AutoOrganizeSortie.Size   = new Size(60, AutoOrganizeSortie.Height);
                AutoOrganizeSortie.Anchor = AnchorStyles.Left | AnchorStyles.Right;
                AutoOrganizeSortie.Margin = new Padding(2, 0, 2, 0);
                AutoOrganizeSortie.Text   = "出撃編成";
                AutoOrganizeSortie.Click += AutoOrganize_Click;

                AutoOrganizeAirDefense = new Button
                {
                    Size   = new Size(60, AutoOrganizeSortie.Height),
                    Anchor = AnchorStyles.Left | AnchorStyles.Right,
                    Margin = new Padding(2, 0, 2, 0),
                    Text   = "防空編成"
                };
                AutoOrganizeAirDefense.Click += AutoOrganize_Click;

                Squadrons = new SquadronUI[4];
                for (int i = 0; i < Squadrons.Length; i++)
                {
                    Squadrons[i]          = new SquadronUI(baseAirCorpsID, i + 1, parent);
                    Squadrons[i].Updated += BaseAirCorpsUI_Updated;
                }

                TitleTotal                    = NewTitleLabel();
                DuplicateCheck                = NewTitleLabel();
                TotalAirSuperioritySortie     = NewTotalLabel();
                TotalAirSuperiorityAirDefense = NewTotalLabel();
                TotalDistance                 = NewTotalLabel();
                TotalOrganizationCost         = NewTotalLabel();

                TitleTotal.Text          = "合計";
                DuplicateCheck.TextAlign = ContentAlignment.MiddleLeft;
                DuplicateCheck.ForeColor = Color.Red;

                Parent          = parent;
                ToolTipInternal = parent.ToolTipInfo;
                Parent.TopMenu_Settings_HighAltitude.CheckedChanged += BaseAirCorpsUI_Updated;

                BaseAirCorpsUI_Updated(null, new EventArgs());
            }