/// <summary> /// Called when state is changed. /// </summary> /// <param name="e">Event arguments instance.</param> protected virtual void OnStateChanged(StateChangedEventArgs e) { var temp = StateChanged; if (temp != null) { temp(this, e); } }
/// <summary> /// Handles command state changes. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event arguments instance.</param> private void _StateServiceStateChanged(object sender, StateChangedEventArgs e) { _UpdateState(); }
/// <summary> /// Notifies about state change. /// </summary> /// <param name="isEnabled">The new value indicating whether the /// tracking service is enabled.</param> private void _NotifyStateChanged(bool isEnabled) { var args = new StateChangedEventArgs(isEnabled); this.OnStateChanged(args); }
/// <summary> /// Handles workflow management connection state changes. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event arguments instance.</param> private void _WorkflowManagementStateTrackerStateChanged( object sender, StateChangedEventArgs e) { if (_workflowManagementIsEnabled != e.IsEnabled) { _workflowManagementIsEnabled = e.IsEnabled; this.UpdatedEnabledState(); } }
/// <summary> /// Handles VRP solver state changes. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event arguments instance.</param> private void _SolverStateTrackerStateChanged( object sender, StateChangedEventArgs e) { var newValue = !e.IsEnabled; if (_hasRoutingOperationInProgress != newValue) { _hasRoutingOperationInProgress = newValue; this.UpdatedEnabledState(); } }