public CheckBoxImportKeyboardViewModel( string keyboardName, bool alreadyExist ) { _keyboardName = keyboardName; _alreadyExist = alreadyExist; _isSelected = false; CheckCommand = new VMCommand( () => IsSelected = (IsSelected) ? false : true ); }
public ExportKeyboardViewModel( ExportKeyboard owner, IKeyboardCollection keyboards ) { _checkBoxs = new List<CheckBoxExportKeyboardViewModel>(); _owner = owner; _keyboards = keyboards; _canExecute = true; CreateCheckBox(); SaveCommand = new VMCommand( ShowSaveWindow, o => CanExecute ); }
public ImportKeyboardViewModel( ImportKeyboard owner, IKeyboardCollection keyboards ) { _checkBoxs = new ObservableCollection<CheckBoxImportKeyboardViewModel>(); _owner = owner; _keyboards = keyboards; _canExecute = true; _canExecuteImport = false; OpenCommand = new VMCommand( ShowOpenFileWindow, o => CanExecute ); ImportCommand = new VMCommand( Importkeyboards, o => CanExecuteImport ); }
public PluginUpdateViewModel( INamedVersionedUniqueId pluginId, System.Action<IDownloadResult> InstallAction ) { PluginId = pluginId; InstallCommand = new VMCommand( () => { State = PluginUpdateState.Installing; InstallAction( DownloadResult ); }, ( o ) => { return State == PluginUpdateState.WaitingForInstall; } ); }
public TextTemplateCommandParameterManager(ITextTemplateService textTemplate, ISendStringService sendString) { _textTemplate = textTemplate; _placeholder = ""; _insertPlacholder = new VMCommand( () => { if( string.IsNullOrEmpty( _placeholder ) ) return; if( !IsFocused ) return; sendString.SendString( _textTemplate.OpentTag + _placeholder + _textTemplate.CloseTag ); NotifyPropertyChanged( "Template" ); NotifyPropertyChanged( "IsValid" ); } ); }
private void InitializeCommands() { StopObjectExplorer = new VMCommand( () => { // TODO } ); ShowLastReport = new VMCommand( () => { // TODO } ); Rediscover = new VMCommand( () => { // TODO } ); ShowHelp = new VMCommand( () => { HelpService.ShowHelpFor( ObjectExplorer.PluginId ); } ); }
void CreateCommands() { ResetUserAction = new VMCommand( () => VMIContext.Context.ConfigManager.UserConfiguration.LiveUserConfiguration.SetAction( _pluginInfo.PluginId, Plugin.Config.ConfigUserAction.None ) ); ApplyCommand = new VMCommand( () => _pluginRunner.Apply() ); StartCommand = new VMCommand( Start, CanStart ); StopCommand = new VMCommand( Stop, CanStop ); }
public VMUnbindButton(Action onClick) { UnbindCommand = new VMCommand( onClick ); }
public CheckBoxExportKeyboardViewModel( IKeyboard keyboard ) { _keyboard = keyboard; _isSelected = false; CheckCommand = new VMCommand( () => IsSelected = (IsSelected)?false:true ); }