Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        public WorkbenchViewModel()
            : base()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPathologyComponent>();

            this.IllnessHistory = new ObservableCollection <IllnessPeriodDto>();

            this.RemoveIllessPeriodCommand = new RelayCommand(() => this.RemoveIllessPeriod(), () => this.CanRemoveIllessPeriod());
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        public WorkbenchViewModel()
            : base()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPathologyComponent>();

            this.IllnessHistory = new ObservableCollection<IllnessPeriodDto>();

            this.RemoveIllessPeriodCommand = new RelayCommand(() => this.RemoveIllessPeriod(), () => this.CanRemoveIllessPeriod());
        }
Пример #3
0
        public AddPathologyViewModel()
        {
            if (!Designer.IsDesignMode)
            {
                this.component = PluginContext.ComponentFactory.GetInstance<IPathologyComponent>();
                PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPathologyComponent>();
            }
            this.Tags = new ObservableCollection<TagDto>();
            this.Pathology = new PathologyDto();

            this.AddCommand = new RelayCommand(() => this.Add(), () => this.CanAdd());
            this.ShowPopupCommand = new RelayCommand(() => this.IsPopupOpened = true);
        }
Пример #4
0
        public AddPathologyViewModel()
        {
            if (!Designer.IsDesignMode)
            {
                this.component = PluginContext.ComponentFactory.GetInstance <IPathologyComponent>();
                PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPathologyComponent>();
            }
            this.Tags      = new ObservableCollection <TagDto>();
            this.Pathology = new PathologyDto();

            this.AddCommand       = new RelayCommand(() => this.Add(), () => this.CanAdd());
            this.ShowPopupCommand = new RelayCommand(() => this.IsPopupOpened = true);
        }