private void SeperateCompetitionAndSimiliarity()
        {
            if (isSimilarWeapon == null)
            {
                // 경쟁무기에 뭐가 있는지 추출해옴
                RawWeaponDBData = new string[mainFrm.CompetitionData.GetLength(0)];
                for (int i = 1; i < mainFrm.CompetitionData.GetLength(0); i++)
                {
                    RawWeaponDBData[i - 1] = mainFrm.CompetitionData[i, 3].ToString();
                }
                // 중복을 제거하고 난 뒤, Null 값도 제거하고
                RawWeaponDBData = GetDistinctValues <string>(RawWeaponDBData);
                RawWeaponDBData = RawWeaponDBData.Where(condition => condition != null).ToArray();

                isSimilarWeapon = new bool[RawWeaponDBData.Length];

                Cursor = Cursors.WaitCursor;

                selectCompetition frmSelectedCompetition = new selectCompetition();
                frmSelectedCompetition.ShowDialog();

                Cursor = Cursors.Arrow;
            }
            // 최초에 대체무기체계의 메뉴를 선정함
            if (mainFrm.CompetitionData != null && mainFrm.CompetitionData.Length != 0)
            {
                if (mainFrm.selectCompetitionAndSimilarity.Where(c => c).Count() < 5)
                {
                    Cursor = Cursors.WaitCursor;

                    SelectCompetitionAndSimilarMenu frmSelectSubstitutionMenu = new SelectCompetitionAndSimilarMenu();
                    frmSelectSubstitutionMenu.ShowDialog();

                    Cursor = Cursors.Arrow;
                }
            }
        }
Beispiel #2
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            // 경쟁무기에 뭐가 있는지 추출해옴
            Competition2.RawWeaponDBData = new string[mainFrm.CompetitionData.GetLength(0)];
            for (int i = 1; i < mainFrm.CompetitionData.GetLength(0); i++)
            {
                Competition2.RawWeaponDBData[i - 1] = mainFrm.CompetitionData[i, 3].ToString();
            }
            // 중복을 제거하고 난 뒤, Null 값도 제거하고
            Competition2.RawWeaponDBData = GetDistinctValues <string>(Competition2.RawWeaponDBData);
            Competition2.RawWeaponDBData = Competition2.RawWeaponDBData.Where(condition => condition != null).ToArray();

            Competition2.isSimilarWeapon = new bool[Competition2.RawWeaponDBData.Length];

            selectCompetition frmSelectedCompetition = new selectCompetition();

            frmSelectedCompetition.ShowDialog();

            // 최초에 대체무기체계의 메뉴를 선정함
            if (mainFrm.CompetitionData != null && mainFrm.CompetitionData.Length != 0)
            {
                if (mainFrm.selectCompetitionAndSimilarity.Where(c => c).Count() < 5)
                {
                    SelectCompetitionAndSimilarMenu frmSelectSubstitutionMenu = new SelectCompetitionAndSimilarMenu();
                    frmSelectSubstitutionMenu.ShowDialog();
                }
            }
            // 향후에는 선택한 스펙만 바꿀수 있또록 수정하여야 함
            // 일단은 이대로

            if (mainFrm.DomesticSpec == null)
            {
                mainFrm.DomesticSpec = new string[mainFrm.selectCompetitionAndSimilarity.Where(c => c).Count()];
            }
            Similarity1_Load(sender, e);
        }