public MakeShortcutCommand() { _addAppViewModel = IoC.Get <AddAppViewModel>(); _addAppViewModel.PropertyChanged += AddAppViewModelOnPropertyChanged; if (_addAppViewModel.Application != null) { _lastConfig = _addAppViewModel.Application.Config; _lastConfig.PropertyChanged += ApplicationOnLocationPropertyChanged; } }
public AddAppPage() : base() { InitializeComponent(); // Setup ViewModel _model = IoC.Get <AddAppViewModel>(); this.DataContext = _model; this.AnimateOutStarted += SaveCurrentSelection; _setApplicationImageCommand = new SetApplicationImageCommand(); }
public AddAppPage() : base() { InitializeComponent(); // Setup ViewModel ViewModel = IoC.Get <AddAppViewModel>(); this.DataContext = ViewModel; this.AnimateOutStarted += SaveCurrentSelectedItem; this.AnimateOutStarted += Dispose; IoC.Get <MainWindow>().Closing += OnMainWindowClosing; this.AnimateInStarted += SetDefaultSelectionIndex; }
public AddAppViewModel CreateNewApp() { string guid = Guid.NewGuid().ToString(); AddAppViewModel result = new AddAppViewModel() { Guid = guid }; repository.Add(guid, result); result.Saved += OnAppSaved; return(result); }
public async Task <IActionResult> App(int id, AddAppViewModel AddAppViewModel) { if (!ModelState.IsValid) { return(Ok(new { code = 0, msg = BadRequest(ModelState).Value })); } _context.Project.SingleOrDefault(m => m.Id == id).App.Add(new App { Name = AddAppViewModel.Name, CreateTime = DateTime.Now, Number = AddAppViewModel.Number, FileUrl = AddAppViewModel.FileUrl }); await _context.SaveChangesAsync(); return(Ok(new { code = 1, msg = "ok" })); }
public DeployAsiLoaderCommand(AddAppViewModel addAppViewModel) { ViewModel = addAppViewModel; ViewModel.PropertyChanged += AddAppViewModelOnPropertyChanged; SetCurrentApplication(); }
public SetApplicationImageCommand() { _addAppViewModel = IoC.Get <AddAppViewModel>(); }
public AddApplicationCommand() { _addAppViewModel = IoC.Get <AddAppViewModel>(); _mainPageViewModel = _addAppViewModel.MainPageViewModel; }
public DeleteApplicationCommand(AddAppViewModel addAppViewModel) { _addAppViewModel = addAppViewModel; _addAppViewModel.MainPageViewModel.ApplicationsChanged += RaiseCanExecute; _addAppViewModel.PropertyChanged += AddAppViewModelOnPropertyChanged; }
public AddApplicationCommand(AddAppViewModel addAppViewModel) { _addAppViewModel = addAppViewModel; _mainPageViewModel = _addAppViewModel.MainPageViewModel; }
public DeleteApplicationCommand() { _addAppViewModel = IoC.Get <AddAppViewModel>(); _addAppViewModel.MainPageViewModel.ApplicationsChanged += RaiseCanExecute; _addAppViewModel.PropertyChanged += AddAppViewModelOnPropertyChanged; }
public AddApplicationCommand() { _addAppViewModel = IoC.Get <AddAppViewModel>(); }
public SetApplicationImageCommand(AddAppViewModel model) { _addAppViewModel = model; }
private void OnAppSaved(object sender, EventArgs e) { AddAppViewModel model = (AddAppViewModel)sender; repository.Remove(model.Guid); }