コード例 #1
0
        private void SystemComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string selSysName = SystemComboBox.SelectedItem.ToString();

            MtGlobals.SystemName selectSys = MtCommon.GetEnumValueByString <MtGlobals.SystemName>(selSysName);

            switch (selectSys)
            {
            case MtGlobals.SystemName.AC:
                m_ltCurSystemNames          = CreateCheckBox(MtCommon.GetEnumAttributeNames(typeof(MtGlobals.ACSubSystem)));
                StandardSysList.ItemsSource = m_ltCurSystemNames;
                break;

            case MtGlobals.SystemName.WSAD:
                m_ltCurSystemNames          = CreateCheckBox(MtCommon.GetEnumAttributeNames(typeof(MtGlobals.WSADSubSystem)));
                StandardSysList.ItemsSource = m_ltCurSystemNames;
                break;

            case MtGlobals.SystemName.MG:
                m_ltCurSystemNames          = CreateCheckBox(MtCommon.GetEnumAttributeNames(typeof(MtGlobals.MGSubSystem)));
                StandardSysList.ItemsSource = m_ltCurSystemNames;
                break;

            case MtGlobals.SystemName.Steam:
                m_ltCurSystemNames          = CreateCheckBox(MtCommon.GetEnumAttributeNames(typeof(MtGlobals.SteamSubSystem)));
                StandardSysList.ItemsSource = m_ltCurSystemNames;
                break;

            default:
                break;
            }
        }
コード例 #2
0
        private void InitPipeRelation()
        {
            if (m_pipeRelation == null)
            {
                return;
            }
            SubSystemNameComBox.ItemsSource = MtCommon.GetEnumAttributeNames(typeof(MtGlobals.EPSystem));
            m_pipeRelation.SystemName       = SystemNameComBox.Text;
            m_pipeRelation.SubSystemName    = SubSystemNameComBox.Text;

            Tunnel.ItemsSource        = MtCommon.GetEnumAttributeNames(typeof(MtGlobals.Tunnel));
            m_pipeRelation.TunnelName = Tunnel.Text;

            if (null != db_path.Text)
            {
                m_pipeRelation.DBFilePath = db_path.Text;
            }
            if (null != TableName.Text)
            {
                m_pipeRelation.TableName = TableName.Text;
            }
            if (null != ColumnName.Text)
            {
                m_pipeRelation.ColumnName = ColumnName.Text;
            }
            if (MultiSystem != null && null != MultiSystem.Text)
            {
                m_pipeRelation.MultiSystem = MultiSystem.Text;
            }

            m_pipeRelation.IsPositiveDir      = IsPositiveDir.IsChecked == true ? true : false;
            m_pipeRelation.IsWaterReturnPipe  = IsWaterReturn.IsChecked == true ? true : false;
            m_pipeRelation.IsSameSystem       = SameSystemCheck.IsChecked == true ? true : false;
            m_pipeRelation.IsIsolatedElements = IsIsolatedElemtns.IsChecked == true ? true : false;
        }
コード例 #3
0
        private void InitLevel()
        {
            if (m_level == null)
            {
                return;
            }
            m_ltCurSystemNames = new List <System.Windows.Controls.CheckBox>();

            SystemComboBox.ItemsSource   = MtCommon.GetEnumAttributeNames(typeof(MtGlobals.SystemName));
            SystemComboBox.SelectedIndex = 0;

            m_ltCurSystemNames          = CreateCheckBox(MtCommon.GetEnumAttributeNames(typeof(MtGlobals.ACSubSystem)));
            StandardSysList.ItemsSource = m_ltCurSystemNames;
        }