private void __setUIMode(QwasiUIMode uiMode) { if (uiMode == QwasiUIMode.Edit) { __enterUIEditMode(); } else if (uiMode == QwasiUIMode.Simulation) { __enterUISimulationMode(); } else if (uiMode == QwasiUIMode.Analytics) { __enterUIAnalyticsMode(); } }
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)); }
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; }
public QwasiUIEventArgs(QwasiUIMode uiMode) { this.UIMode = uiMode; }