public AddPictureViewModel() { this.Component = PluginContext.ComponentFactory.GetInstance <IPictureComponent>(); this.Categories = new ObservableCollection <TagDto>(); this.refreshCommand = new RelayCommand(() => this.Refresh(), () => this.CanRefresh()); this.selectFileCommand = new RelayCommand(() => this.SelectFile(), () => this.CanSelectFile()); this.savePictureCommand = new RelayCommand(() => this.SavePicture(), () => this.CanSavePicture()); }
public AddPictureViewModel() { this.Component = PluginContext.ComponentFactory.GetInstance<IPictureComponent>(); this.Categories = new ObservableCollection<TagDto>(); this.refreshCommand = new RelayCommand(() => this.Refresh(), () => this.CanRefresh()); this.selectFileCommand = new RelayCommand(() => this.SelectFile(), () => this.CanSelectFile()); this.savePictureCommand = new RelayCommand(() => this.SavePicture(), () => this.CanSavePicture()); }
public AddTagViewModel() { this.SelectedTag = new TagDto(TagCategory.Picture); if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance<IPictureComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPictureComponent>(); } this.ShowPopupCommand = new RelayCommand(() => this.IsPopupOpened = true); this.AddCommand = new RelayCommand(() => this.Add(), () => this.CanAdd()); }
public AddTagViewModel() { this.SelectedTag = new TagDto(TagCategory.Picture); if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance <IPictureComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPictureComponent>(); } this.ShowPopupCommand = new RelayCommand(() => this.IsPopupOpened = true); this.AddCommand = new RelayCommand(() => this.Add(), () => this.CanAdd()); }
public WorkbenchViewModel() : base() { this.IsBusy = true; this.Pictures = new ObservableCollection<LightPictureDto>(); this.Tags = new ObservableCollection<TagDto>(); this.FilterTags = new ObservableCollection<TagDto>(); this.IsInformationExpanded = false; this.SelectedPicture = new PictureDto(); this.component = PluginContext.ComponentFactory.GetInstance<IPictureComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPictureComponent>(); this.refreshCommand = new RelayCommand(() => this.Refresh()); this.AddPictureCommand = new RelayCommand(() => AddPicture(), () => this.CanAddSomething()); this.AddTypeCommand = new RelayCommand(() => ViewService.Manager.ShowDialog<AddTagViewModel>(), () => this.CanAddSomething()); this.FilterPictureCommand = new RelayCommand(() => this.Filter()); this.selectPictureCommand = new RelayCommand(() => this.SelectPicture(), () => this.CanSelectPicture()); this.editCommand = new RelayCommand(() => this.Edit(), () => this.CanEdit()); this.updateCommand = new RelayCommand(() => this.Update(), () => this.CanUpdate()); }
public WorkbenchViewModel() : base() { this.IsBusy = true; this.Pictures = new ObservableCollection <LightPictureDto>(); this.Tags = new ObservableCollection <TagDto>(); this.FilterTags = new ObservableCollection <TagDto>(); this.IsInformationExpanded = false; this.SelectedPicture = new PictureDto(); this.component = PluginContext.ComponentFactory.GetInstance <IPictureComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPictureComponent>(); this.refreshCommand = new RelayCommand(() => this.Refresh()); this.AddPictureCommand = new RelayCommand(() => AddPicture(), () => this.CanAddSomething()); this.AddTypeCommand = new RelayCommand(() => ViewService.Manager.ShowDialog <AddTagViewModel>(), () => this.CanAddSomething()); this.FilterPictureCommand = new RelayCommand(() => this.Filter()); this.selectPictureCommand = new RelayCommand(() => this.SelectPicture(), () => this.CanSelectPicture()); this.editCommand = new RelayCommand(() => this.Edit(), () => this.CanEdit()); this.updateCommand = new RelayCommand(() => this.Update(), () => this.CanUpdate()); }