public BmiRecord() : base() { this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); this.ConfigureAutoMapper(); }
public BmiRecord() : base() { this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); this.ConfigureAutoMapper(); }
/// <summary> /// Initialises this plugin. Basicaly it should configure the menus into the PluginHost /// Every task that could throw exception should be in this method and not in the ctor. /// </summary> public override void Initialise() { this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); PluginContext.Host.Invoke(() => { this.ConfigureViewService(); this.BuildButtons(); this.BuildContextMenu(); }); }
public AddBmiViewModel() { if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); } this.AddCommand = new RelayCommand(() => this.AddBmi(), () => this.CanAddBmi()); if (PluginContext.Host.SelectedPatient != null) { this.CurrentBmi.Height = PluginContext.Host.SelectedPatient.Height; this.CurrentBmi.Date = DateTime.Today; } }
public AddBmiViewModel() { if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); } this.AddCommand = new RelayCommand(() => this.AddBmi(), () => this.CanAddBmi()); if (PluginContext.Host.SelectedPatient != null) { this.CurrentBmi.Height = PluginContext.Host.SelectedPatient.Height; this.CurrentBmi.Date = DateTime.Today; } }
/// <summary> /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class. /// </summary> /// <param name="host">The host.</param> public WorkbenchViewModel() : base() { if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); } this.SelectedBmi = new BmiDto(); this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); this.BmiHistory = new ObservableCollection<BmiDto>(); this.refreshCommand = new RelayCommand(() => this.Refresh()); this.RemoveBmiCommand = new RelayCommand(() => this.RemoveBmi(), () => this.CanRemoveBmi()); }
/// <summary> /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class. /// </summary> /// <param name="host">The host.</param> public WorkbenchViewModel() : base() { if (!Designer.IsDesignMode) { this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); } this.SelectedBmi = new BmiDto(); this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>(); this.BmiHistory = new ObservableCollection <BmiDto>(); this.refreshCommand = new RelayCommand(() => this.Refresh()); this.RemoveBmiCommand = new RelayCommand(() => this.RemoveBmi(), () => this.CanRemoveBmi()); }
/// <summary> /// Initialises this plugin. Basicaly it should configure the menus into the PluginHost /// Every task that could throw exception should be in this method and not in the ctor. /// </summary> public override void Initialise() { this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>(); PluginContext.Host.Invoke(() => { this.ConfigureViewService(); this.BuildButtons(); this.BuildContextMenu(); }); }