private void systemBack_Click(object sender, RoutedEventArgs e)
        {
            EquipmentListControl eList = UIHelpers.FindVisualChild <EquipmentListControl>(this);

            if (eList != null)
            {
                eList.SelectedItem = null;
            }
            componentComboBox.SelectedValue = SystemComponentIndex.Equipment;
        }
示例#2
0
        protected void ScopeGroupControl_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var      item  = this.SelectedItem;
            ListView child = UIHelpers.FindVisualChild <ListView>(this);

            if (child != null && child.SelectedItems.Count == 1)
            {
                this.SelectedItem = null;
                this.SelectedItem = item;
            }
        }
        private void componentComboBox_Selected(object sender, RoutedEventArgs e)
        {
            ComboBox             comboBox = sender as ComboBox;
            EquipmentListControl eList    = UIHelpers.FindVisualChild <EquipmentListControl>(this);

            if (eList != null)
            {
                if (eList.SelectedItem != null)
                {
                    eList.SelectedItem = null;
                    Storyboard moveBack = (Storyboard)FindResource("systemMoveBack");
                    moveBack.Begin();
                }
            }
            ControllerListControl cList = UIHelpers.FindVisualChild <ControllerListControl>(this);

            if (cList != null)
            {
                cList.SelectedItem = null;
            }
            PanelListControl pList = UIHelpers.FindVisualChild <PanelListControl>(this);

            if (pList != null)
            {
                pList.SelectedItem = null;
            }
            SystemComponentIndex selectedValue = (SystemComponentIndex)comboBox.SelectedValue;

            if (selectedValue == SystemComponentIndex.Connections ||
                selectedValue == SystemComponentIndex.Misc ||
                selectedValue == SystemComponentIndex.Proposal ||
                selectedValue == SystemComponentIndex.Controllers ||
                selectedValue == SystemComponentIndex.Valves)
            {
                Storyboard move = (Storyboard)FindResource("systemMove");
                move.Begin();
            }
        }