Пример #1
0
        public BmiRecord()
            : base()
        {
            this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IBmiComponent>();

            this.ConfigureAutoMapper();
        }
Пример #2
0
        public BmiRecord()
            : base()
        {
            this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IBmiComponent>();

            this.ConfigureAutoMapper();
        }
Пример #3
0
 /// <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();
     });
 }
Пример #4
0
        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;
            }
        }
Пример #5
0
        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;
            }
        }
Пример #6
0
        /// <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());
        }
Пример #7
0
        /// <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());
        }
Пример #8
0
 /// <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();
     });
 }