/// <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()); }
/// <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()); }
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); }
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); }