public TimeLineManagerViewModel(string timeLineItemsSerializationDir) { _serializationDir = timeLineItemsSerializationDir; TimeLineItems = new ObservableCollection <TimeLineItemViewModel>(AutoSerializableHelper .LoadAllAutoSerializables <TimeLineItemViewModel>(timeLineItemsSerializationDir)); DeleteSingleTimeLineCommand = new ParameterizedCommand(DeleteSingleTimeLine); }
private CommandBase createCommandBase(StructureMapCommandType commandType, string commandText) { CommandBase returnValue = null; switch (commandType) { case StructureMapCommandType.Parameterized: returnValue = new ParameterizedCommand(commandText); break; case StructureMapCommandType.Templated: returnValue = new TemplatedCommand(commandText, _database); break; case StructureMapCommandType.StoredProcedure: returnValue = new StoredProcedureCommand(commandText, this); break; } returnValue.Attach(this); return(returnValue); }
public ViewModelBase() { this.SimpleCommand = new SimpleCommand(new Action(SimpleMethod)); this.ParameterizedCommand = new ParameterizedCommand(new Action <String>(ParameterizedMethod)); }
public LoginPageViewModel() { LoginCommand = new ParameterizedCommand(async havePasswordObject => await Login(havePasswordObject as IHavePassword)); }
public AdaptedCommand(ParameterizedCommand <string> command) { this.command = command; }