Exemplo n.º 1
0
        /// <summary>
        /// 재난 카테고리/종류 콤보박스 설정.
        /// </summary>
        private void InitializeDisasterCmbbox()
        {
            this.cmbboxDisasterCategory.Items.Clear();
            this.cmbboxDisasterKind.Items.Clear();

            this.cmbboxDisasterCategory.Enabled = false;
            this.cmbboxDisasterKind.Enabled     = false;

            if (BasisData.Disasters == null || BasisData.Disasters.Count <= 0)
            {
                this.cmbboxDisasterCategory.Enabled = false;
                this.cmbboxDisasterKind.Enabled     = false;

                return;
            }

            this.cmbboxDisasterCategory.Enabled = true;
            this.cmbboxDisasterCategory.Items.Add("전체");
            foreach (DisasterInfo info in BasisData.Disasters)
            {
                if (info == null || info.Category == null)
                {
                    continue;
                }
                DisasterInfo copy = new DisasterInfo();
                copy.DeepCopyFrom(info);

                this.cmbboxDisasterCategory.Items.Add(copy);
            }
            this.cmbboxDisasterCategory.SelectedIndex = 0;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 재난 카테고리/종류 콤보박스 설정.
        /// </summary>
        private bool InitializeDisasterCmbbox()
        {
            this.cmbboxDisasterCategory.Items.Clear();
            this.lstboxDisasterKind.Items.Clear();

            this.cmbboxDisasterCategory.Enabled = false;
            this.lstboxDisasterKind.Enabled     = false;

            if (BasisData.Disasters == null || BasisData.Disasters.Count <= 0)
            {
                this.cmbboxDisasterCategory.Enabled = false;
                this.lstboxDisasterKind.Enabled     = false;

                return(false);
            }

            this.cmbboxDisasterCategory.Enabled = true;

            DisasterInfo initDisaster = null;

            foreach (DisasterInfo info in BasisData.Disasters)
            {
                if (info == null || info.Category == null)
                {
                    continue;
                }
                DisasterInfo copy = new DisasterInfo();
                copy.DeepCopyFrom(info);

                this.cmbboxDisasterCategory.Items.Add(copy);

                if (info.Category.Name == "기상")
                {
                    initDisaster = copy;
                }
            }
            if (initDisaster == null || initDisaster.KindList == null)
            {
                return(true);
            }
            this.cmbboxDisasterCategory.SelectedText = "기상";
            this.lstboxDisasterKind.Enabled          = true;

            foreach (DisasterKind kindInfo in initDisaster.KindList)
            {
                this.lstboxDisasterKind.Items.Add(kindInfo);
            }

            return(true);
        }
Exemplo n.º 3
0
        private void InitializeDisasterInfo()
        {
            this.cmbboxDisasterCategory.Items.Clear();

            if (BasisData.Disasters == null || BasisData.Disasters.Count <= 0)
            {
                return;
            }
            foreach (DisasterInfo info in BasisData.Disasters)
            {
                if (info == null || info.Category == null)
                {
                    continue;
                }
                DisasterInfo copy = new DisasterInfo();
                copy.DeepCopyFrom(info);

                this.cmbboxDisasterCategory.Items.Add(copy);
            }
        }