Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }
Exemplo n.º 4
0
        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());
        }
Exemplo n.º 5
0
        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());
        }
Exemplo n.º 6
0
        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());
        }