コード例 #1
0
 private void __setUIMode(QwasiUIMode uiMode)
 {
     if (uiMode == QwasiUIMode.Edit)
     {
         __enterUIEditMode();
     }
     else if (uiMode == QwasiUIMode.Simulation)
     {
         __enterUISimulationMode();
     }
     else if (uiMode == QwasiUIMode.Analytics)
     {
         __enterUIAnalyticsMode();
     }
 }
コード例 #2
0
        public void EnterEditMode()
        {
            if (this.ActiveUIMode == QwasiUIMode.Edit)
            {
                return;
            }

            __exitCurrentMode();

            foreach (IQGUserDeletable control in this.AllGraphControls.OfType <IQGUserDeletable>())
            {
                control.UserDeletable = true;
            }

            foreach (QGEdge edge in this.AllEdges)
            {
                edge.UserSelectable = true;
            }

            this.ActiveUIMode = QwasiUIMode.Edit;

            this.RaiseActiveUIModeChangedEvent(new QwasiUIEventArgs(this.ActiveUIMode));
        }
コード例 #3
0
        private void __updateButtons(QwasiUIMode uiMode)
        {
            if (uiMode == _currentUIMode)
            {
                return;
            }

            Button buttonToActivate   = __getUIModeButton(uiMode);
            Button buttonToInactivate = __getUIModeButton(_currentUIMode);

            _currentUIMode = uiMode;

            if (_inactiveBackgroundBrush != null)
            {
                buttonToInactivate.Background      = _inactiveBackgroundBrush;
                buttonToInactivate.BorderThickness = new Thickness(1);
                buttonToInactivate.BorderBrush     = Brushes.Transparent;
            }

            _inactiveBackgroundBrush         = buttonToActivate.Background;
            buttonToActivate.Background      = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFBEE6FD"));
            buttonToActivate.BorderThickness = new Thickness(2);
            buttonToActivate.BorderBrush     = Brushes.DimGray;
        }
コード例 #4
0
 public QwasiUIEventArgs(QwasiUIMode uiMode)
 {
     this.UIMode = uiMode;
 }