private void ButtonRun_Click(object sender, EventArgs e)
        {
            if (Searcher.IsBusy)
            {
                if (MessageBox.Show(EncycloRes.InterruptSearch, EncycloRes.Searching, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.Yes)
                {
                    Searcher.CancelAsync();
                }
                return;
            }

            RecordView.Rows.Clear();

            var row = new DataGridViewRow();

            row.CreateCells(RecordView);


            var args = new SearchArgument
            {
                EquipmentCategory = (int)EquipmentCategory.SelectedValue,
                EquipmentName     = (string)EquipmentName.SelectedItem,
                SecretaryCategory = (int)SecretaryCategory.SelectedValue,
                SecretaryName     = (string)SecretaryName.SelectedItem,
                DateBegin         = DateBegin.Value,
                DateEnd           = DateEnd.Value,
                Recipe            = (string)Recipe.SelectedItem,
                MergeRows         = MergeRows.Checked,
                BaseRow           = row
            };

            RecordView.Tag = args;


            if (!MergeRows.Checked)
            {
                RecordView_Header.Width         = 50;
                RecordView_Header.HeaderText    = "";
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.Fill;
                RecordView_Name.HeaderText      = "Equipment";
                RecordView_Date.Width           = 140;
                RecordView_Date.Visible         = true;
                RecordView_Recipe.Width         = 95;
                RecordView_Recipe.Visible       = true;
                RecordView_FlagshipType.Width   = 40;
                RecordView_FlagshipType.Visible = true;
                RecordView_Flagship.Width       = 105;
                RecordView_Flagship.Visible     = true;
                RecordView_Detail.Visible       = false;
            }
            else
            {
                RecordView_Header.Width         = 150;
                RecordView_Header.HeaderText    = EncycloRes.Tries;
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.NotSet;
                RecordView_Name.Width           = 160;
                RecordView_Name.HeaderText      = ((EquipmentName.Text != NameAny && EquipmentName.Text != NameExist) || (int)EquipmentCategory.SelectedValue != -1) ? "Recipe" : "Equipment";
                RecordView_Date.Visible         = false;
                RecordView_Recipe.Visible       = false;
                RecordView_FlagshipType.Visible = false;
                RecordView_Flagship.Visible     = false;
                RecordView_Detail.HeaderText    = (SecretaryName.Text != NameAny || (int)SecretaryCategory.SelectedValue != -1) ? "Recipe Tries" : "Ship Type";
                RecordView_Detail.Visible       = true;
            }
            RecordView.ColumnHeadersVisible = true;

            StatusInfo.Text = EncycloRes.Searching + "...";
            StatusInfo.Tag  = DateTime.Now;

            Searcher.RunWorkerAsync(args);
        }
Esempio n. 2
0
        private void ButtonRun_Click(object sender, EventArgs e)
        {
            if (Searcher.IsBusy)
            {
                if (MessageBox.Show("検索を中止しますか?", "検索中です", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.Yes)
                {
                    Searcher.CancelAsync();
                }
                return;
            }

            RecordView.Rows.Clear();

            var row = new DataGridViewRow();

            row.CreateCells(RecordView);

            var args = new SearchArgument();

            args.ShipName      = (string)ShipName.SelectedItem;
            args.ItemName      = (string)ItemName.SelectedItem;
            args.EquipmentName = (string)EquipmentName.SelectedItem;
            args.DateBegin     = DateBegin.Value;
            args.DateEnd       = DateEnd.Value;
            args.MapAreaID     = (int)MapAreaID.SelectedValue;
            args.MapInfoID     = (int)MapInfoID.SelectedValue;
            args.MapCellID     = (int)MapCellID.SelectedValue;
            args.MapDifficulty = (int)MapDifficulty.SelectedValue;
            args.IsBossOnly    = IsBossOnly.CheckState;
            args.RankS         = RankS.Checked;
            args.RankA         = RankA.Checked;
            args.RankB         = RankB.Checked;
            args.RankX         = RankX.Checked;
            args.MergeRows     = MergeRows.Checked;
            args.BaseRow       = row;

            RecordView.Tag = args;


            // column initialize
            if (MergeRows.Checked)
            {
                RecordView_Name.DisplayIndex   = 0;
                RecordView_Header.HeaderText   = "回数";
                RecordView_Header.Width        = 100;
                RecordView_Header.DisplayIndex = 1;
                RecordView_RankS.Width         = 100;
                RecordView_RankS.Visible       = true;
                RecordView_RankA.Width         = 100;
                RecordView_RankA.Visible       = true;
                RecordView_RankB.Width         = 100;
                RecordView_RankB.Visible       = true;

                RecordView_Date.Visible = false;
                RecordView_Map.Visible  = false;
                RecordView_Rank.Visible = false;
            }
            else
            {
                RecordView_Header.HeaderText   = "";
                RecordView_Header.Width        = 50;
                RecordView_Header.DisplayIndex = 0;
                RecordView_Date.Width          = 150;
                RecordView_Date.Visible        = true;
                RecordView_Map.Width           = 240;
                RecordView_Map.Visible         = true;
                RecordView_Rank.Width          = 40;
                RecordView_Rank.Visible        = true;

                RecordView_RankS.Visible = false;
                RecordView_RankA.Visible = false;
                RecordView_RankB.Visible = false;
            }
            RecordView.ColumnHeadersVisible = true;


            StatusInfo.Text = "検索中です...";
            StatusInfo.Tag  = DateTime.Now;

            Searcher.RunWorkerAsync(args);
        }
        private void ButtonRun_Click(object sender, EventArgs e)
        {
            if (Searcher.IsBusy)
            {
                if (MessageBox.Show("要中断搜索吗?", "正在搜索中", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.Yes)
                {
                    Searcher.CancelAsync();
                }
                return;
            }

            RecordView.Rows.Clear();
            RecordView.Font = Utility.Configuration.Config.UI.JapFont;

            var row = new DataGridViewRow();

            row.CreateCells(RecordView);


            var args = new SearchArgument
            {
                EquipmentCategory = (int)EquipmentCategory.SelectedValue,
                EquipmentName     = (string)EquipmentName.SelectedItem,
                SecretaryCategory = (int)SecretaryCategory.SelectedValue,
                SecretaryName     = (string)SecretaryName.SelectedItem,
                DateBegin         = DateBegin.Value,
                DateEnd           = DateEnd.Value,
                Recipe            = (string)Recipe.SelectedItem,
                MergeRows         = MergeRows.Checked,
                BaseRow           = row
            };


            if (!MergeRows.Checked)
            {
                RecordView_Header.Width         = 50;
                RecordView_Header.HeaderText    = "";
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.Fill;
                RecordView_Name.HeaderText      = "装备";
                RecordView_Date.Width           = 140;
                RecordView_Date.Visible         = true;
                RecordView_Recipe.Width         = 120;
                RecordView_Recipe.Visible       = true;
                RecordView_FlagshipType.Width   = 60;
                RecordView_FlagshipType.Visible = true;
                RecordView_Flagship.Width       = 60;
                RecordView_Flagship.Visible     = true;
                RecordView_Detail.Visible       = false;
            }
            else
            {
                RecordView_Header.Width         = 150;
                RecordView_Header.HeaderText    = "次数";
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.NotSet;
                RecordView_Name.Width           = 160;
                RecordView_Name.HeaderText      = ((EquipmentName.Text != NameAny && EquipmentName.Text != NameExist) || (int)EquipmentCategory.SelectedValue != -1) ? "配方" : "装备";
                RecordView_Date.Visible         = false;
                RecordView_Recipe.Visible       = false;
                RecordView_FlagshipType.Visible = false;
                RecordView_Flagship.Visible     = false;
                RecordView_Detail.HeaderText    = (SecretaryName.Text != NameAny || (int)SecretaryCategory.SelectedValue != -1) ? "各配方次数" : "各舰种次数";
                RecordView_Detail.Visible       = true;
            }
            RecordView.ColumnHeadersVisible = true;

            StatusInfo.Text = "搜索中 ...";
            StatusInfo.Tag  = DateTime.Now;

            Searcher.RunWorkerAsync(args);
        }
Esempio n. 4
0
        private void ButtonRun_Click(object sender, EventArgs e)
        {
            if (Searcher.IsBusy)
            {
                if (MessageBox.Show(EncycloRes.InterruptSearch, EncycloRes.Searching, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.Yes)
                {
                    Searcher.CancelAsync();
                }
                return;
            }

            RecordView.Rows.Clear();

            var row = new DataGridViewRow();

            row.CreateCells(RecordView);


            var args = new SearchArgument
            {
                ShipCategory        = (int)ShipCategory.SelectedValue,
                ShipName            = (string)ShipName.SelectedItem,
                SecretaryCategory   = (int)SecretaryCategory.SelectedValue,
                SecretaryName       = (string)SecretaryName.SelectedItem,
                DateBegin           = DateBegin.Value,
                DateEnd             = DateEnd.Value,
                Recipe              = Recipe.Text,
                DevelopmentMaterial = (int)DevelopmentMaterial.SelectedValue,
                EmptyDock           = (int)EmptyDock.SelectedValue,
                IsLargeConstruction = IsLargeConstruction.CheckState,
                MergeRows           = MergeRows.Checked,
                BaseRow             = row
            };

            RecordView.Tag = args;


            // column initialize
            if (!args.MergeRows)
            {
                RecordView_Header.DisplayIndex        = 0;
                RecordView_Header.Width               = 50;
                RecordView_Header.HeaderText          = "";
                RecordView_Name.DisplayIndex          = 1;
                RecordView_Name.AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
                RecordView_Name.HeaderText            = EncycloRes.ShipName;
                RecordView_Name.Visible               = true;
                RecordView_Date.DisplayIndex          = 2;
                RecordView_Date.Width                 = 140;
                RecordView_Date.HeaderText            = EncycloRes.Date;
                RecordView_Date.Visible               = true;
                RecordView_Recipe.DisplayIndex        = 3;
                RecordView_Recipe.AutoSizeMode        = DataGridViewAutoSizeColumnMode.NotSet;
                RecordView_Recipe.Width               = 200;
                RecordView_Recipe.HeaderText          = EncycloRes.Recipe;
                RecordView_Recipe.Visible             = true;
                RecordView_SecretaryShip.DisplayIndex = 4;
                RecordView_SecretaryShip.Width        = 60;
                RecordView_SecretaryShip.HeaderText   = EncycloRes.Flagship;
                RecordView_SecretaryShip.Visible      = true;
                RecordView_Material100.Visible        = false;
                RecordView_Material20.Visible         = false;
                RecordView_Material1.Visible          = false;
            }
            else
            {
                if (args.ShipName != NameAny)
                {
                    RecordView_Recipe.DisplayIndex = 0;
                    RecordView_Recipe.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                    RecordView_Recipe.HeaderText   = EncycloRes.Recipe;
                    RecordView_Recipe.Visible      = true;
                    RecordView_Name.Visible        = false;
                }
                else
                {
                    RecordView_Name.DisplayIndex = 0;
                    RecordView_Name.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                    RecordView_Name.HeaderText   = EncycloRes.ShipName;
                    RecordView_Name.Visible      = true;
                    RecordView_Recipe.Visible    = false;
                }
                RecordView_Header.DisplayIndex      = 1;
                RecordView_Header.Width             = 120;
                RecordView_Header.HeaderText        = EncycloRes.Times;
                RecordView_Material100.DisplayIndex = 2;
                RecordView_Material100.Width        = 120;
                RecordView_Material100.HeaderText   = GeneralRes.DevMat + "x100";
                RecordView_Material20.DisplayIndex  = 3;
                RecordView_Material20.Width         = 120;
                RecordView_Material20.HeaderText    = GeneralRes.DevMat + "x20";
                RecordView_Material1.DisplayIndex   = 4;
                RecordView_Material1.Width          = 120;
                RecordView_Material1.HeaderText     = GeneralRes.DevMat + "x1";
                if (args.IsLargeConstruction == CheckState.Unchecked ||
                    (args.Recipe != NameAny && args.Recipe.IndexOf("/") < 4) ||
                    args.DevelopmentMaterial != -1)
                {
                    RecordView_Material100.Visible = false;
                    RecordView_Material20.Visible  = false;
                    RecordView_Material1.Visible   = false;
                }
                else
                {
                    RecordView_Material100.Visible = true;
                    RecordView_Material20.Visible  = true;
                    RecordView_Material1.Visible   = true;
                }
                RecordView_Date.Visible          = false;
                RecordView_SecretaryShip.Visible = false;
            }
            RecordView.ColumnHeadersVisible = true;


            StatusInfo.Text = EncycloRes.Searching + "...";
            StatusInfo.Tag  = DateTime.Now;

            Searcher.RunWorkerAsync(args);
        }
Esempio n. 5
0
        private void ButtonRun_Click(object sender, EventArgs e)
        {
            if (Searcher.IsBusy)
            {
                if (MessageBox.Show("検索を中止しますか?", "検索中です", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.Yes)
                {
                    Searcher.CancelAsync();
                }
                return;
            }

            RecordView.Rows.Clear();

            var row = new DataGridViewRow();

            row.CreateCells(RecordView);


            var args = new SearchArgument();

            args.EquipmentCategory = (int)EquipmentCategory.SelectedValue;
            args.EquipmentName     = (string)EquipmentName.SelectedItem;
            args.SecretaryCategory = (int)SecretaryCategory.SelectedValue;
            args.SecretaryName     = (string)SecretaryName.SelectedItem;
            args.DateBegin         = DateBegin.Value;
            args.DateEnd           = DateEnd.Value;
            args.Recipe            = (string)Recipe.SelectedItem;
            args.MergeRows         = MergeRows.Checked;
            args.BaseRow           = row;


            if (!MergeRows.Checked)
            {
                RecordView_Header.Width         = 50;
                RecordView_Header.HeaderText    = "";
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.Fill;
                RecordView_Name.HeaderText      = "装備";
                RecordView_Date.Width           = 140;
                RecordView_Date.Visible         = true;
                RecordView_Recipe.Width         = 120;
                RecordView_Recipe.Visible       = true;
                RecordView_FlagshipType.Width   = 60;
                RecordView_FlagshipType.Visible = true;
                RecordView_Flagship.Width       = 60;
                RecordView_Flagship.Visible     = true;
                RecordView_Detail.Visible       = false;
            }
            else
            {
                RecordView_Header.Width         = 150;
                RecordView_Header.HeaderText    = "回数";
                RecordView_Name.AutoSizeMode    = DataGridViewAutoSizeColumnMode.NotSet;
                RecordView_Name.Width           = 160;
                RecordView_Name.HeaderText      = ((EquipmentName.Text != NameAny && EquipmentName.Text != NameExist) || (int)EquipmentCategory.SelectedValue != -1) ? "レシピ" : "装備";
                RecordView_Date.Visible         = false;
                RecordView_Recipe.Visible       = false;
                RecordView_FlagshipType.Visible = false;
                RecordView_Flagship.Visible     = false;
                RecordView_Detail.HeaderText    = (SecretaryName.Text != NameAny || (int)SecretaryCategory.SelectedValue != -1) ? "レシピ別回数" : "艦種別回数";
                RecordView_Detail.Visible       = true;
            }
            RecordView.ColumnHeadersVisible = true;

            StatusInfo.Text = "検索中です...";
            StatusInfo.Tag  = DateTime.Now;

            Searcher.RunWorkerAsync(args);
        }