public void Stop() { if( !_isClosing ) { _isClosing = true; _view.Close(); } else { _isClosing = false; _vm = null; } }
void OnClosing( object sender, System.ComponentModel.CancelEventArgs e ) { if( !_isClosing ) { _isClosing = true; Context.ConfigManager.UserConfiguration.LiveUserConfiguration.SetAction( new Guid( PluginIdString ), ConfigUserAction.Stopped ); Context.PluginRunner.Apply(); return; } else { _isClosing = false; _vm = null; } }
public void Start() { _vm = new ExportKeyboardViewModel( this, KeyboardContext.Service.Keyboards ); _view = new ExportKeyboardView() { DataContext = _vm }; _view.Closing += OnClosing; _view.Show(); }