Esempio n. 1
0
 private void Tap_Tapped(object sender, EventArgs e)
 {
     if (BackCommand?.CanExecute(BackCommandParameter) ?? false)
     {
         BackCommand.Execute(BackCommandParameter);
     }
 }
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public ZeroPressureSensorViewModel()
            : base("Zero Pressure Sensor")
        {
            // Initialize values
            _events         = IoC.Get <IEventAggregator>();
            _pm             = IoC.Get <PulseManager>();
            _adcpConnection = IoC.Get <AdcpConnection>();

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.DeployAdcpView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Zero Pressure sensor command
            ZeroPressureSensorCommand = ReactiveCommand.Create();
            ZeroPressureSensorCommand.Subscribe(_ => ZeroPressureSensor());

            InitializeValue();
        }
Esempio n. 3
0
        private void OnToolbarClick(object sender, ToolbarButtonClickEventArgs e)
        {
            switch (e.ClickedButton)
            {
            case ToolbarButton.Back:
                BackCommand?.TryExecute();
                break;

            case ToolbarButton.Edit:
                EditCommand?.TryExecute();
                break;

            case ToolbarButton.Delete:
                DeleteCommand?.TryExecute();
                break;

            case ToolbarButton.Save:
                SaveCommand?.TryExecute();
                break;

            case ToolbarButton.Cancel:
                CancelCommand?.TryExecute();
                break;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public BottomTrackOnViewModel()
            : base("Bottom Track On")
        {
            // Initialize values
            _events = IoC.Get <IEventAggregator>();
            _pm     = IoC.Get <PulseManager>();

            ConfigKey = "";

            // Create the list
            CreateList();

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.BinsView, ConfigKey)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            MovingCommand = ReactiveCommand.Create();
            MovingCommand.Subscribe(_ => MovingBoat());

            MovingCommand = ReactiveCommand.Create();
            MovingCommand.Subscribe(_ => MonitoringAdcp());
        }
Esempio n. 5
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public ScanAdcpViewModel()
            : base("Scan ADCP")
        {
            // Initialize values
            _events         = IoC.Get <IEventAggregator>();
            _pm             = IoC.Get <PulseManager>();
            _adcpConnection = IoC.Get <AdcpConnection>();

            // Serial Number Generator view model
            SerialNumberGeneratorVM              = IoC.Get <SerialNumberGeneratorViewModel>();
            SerialNumberGeneratorVM.UpdateEvent += SerialNumberGeneratorVM_UpdateEvent;

            // Next command
            NextCommand = ReactiveCommand.Create(this.WhenAny(x => x.IsScanning, x => !x.Value));
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.ModeView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Scan ADCP command
            ScanAdcpCommand = ReactiveCommand.CreateAsyncTask(_ => ScanAdcp());

            InitializeValue();
        }
Esempio n. 6
0
        private BethesdaNetLoginVM()
        {
            Instructions     = "Login to Bethesda.NET in-game...";
            LoginViaSkyrimSE = ReactiveCommand.CreateFromTask(async() =>
            {
                LoggingIn.OnNext(true);
                Instructions = "Starting Skyrim Special Edition...";
                await BethesdaNetDownloader.Login(Game.SkyrimSpecialEdition);
                LoggingIn.OnNext(false);
                await BackCommand.Execute();
            }, Game.SkyrimSpecialEdition.MetaData().IsInstalled
                ? LoggingIn.Select(e => !e).StartWith(true)
                : Observable.Return(false));

            LoginViaFallout4 = ReactiveCommand.CreateFromTask(async() =>
            {
                LoggingIn.OnNext(true);
                Instructions = "Starting Fallout 4...";
                await BethesdaNetDownloader.Login(Game.Fallout4);
                LoggingIn.OnNext(false);
                await BackCommand.Execute();
            }, Game.Fallout4.MetaData().IsInstalled
                ? LoggingIn.Select(e => !e).StartWith(true)
                : Observable.Return(false));
        }
Esempio n. 7
0
        /// <summary>
        /// Intialize the view model.
        /// </summary>
        public CommunicationViewModel()
            : base("Communications")
        {
            // Set Event Aggregator
            _events = IoC.Get <IEventAggregator>();
            _pm     = IoC.Get <PulseManager>();

            // Get the singleton ADCP connection
            _adcpConnection = IoC.Get <AdcpConnection>();

            // Initialize the values
            InitValues();

            // Set the list
            CommPortList = SerialOptions.PortOptions;
            BaudRateList = SerialOptions.BaudRateOptions;

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.ScanAdcpView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Scan for ADCP command
            ScanAdcpCommand = ReactiveCommand.Create();
            ScanAdcpCommand.Subscribe(_ => ScanForAdcp());
        }
Esempio n. 8
0
 public PatientSearchViewModel(MainWidowViewModel containingVm, Physician physicianUser)
 {
     this.BackCommand       = new BackCommand(this);
     this.containingShellVm = containingVm;
     this.patientM          = new PhysicianShellModel();
     this.PhysicianUser     = physicianUser;
 }
Esempio n. 9
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public VesselMountViewModel()
            : base("Vessel Mount ViewModel")
        {
            // Initialize values
            _events = IoC.Get <IEventAggregator>();
            _events.Subscribe(this);
            _pm = IoC.Get <PulseManager>();

            // Get the singleton ADCP connection
            _adcpConnection = IoC.Get <AdcpConnection>();

            // Get Options
            GetOptions();

            // Set the list
            CommPortList = SerialOptions.PortOptions;
            BaudRateList = SerialOptions.BaudRateOptions;

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.AveragingView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Set the lists
            InitLists();
            InitValues();
        }
Esempio n. 10
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public TimeViewModel()
            : base("ADCP Time")
        {
            // Initialize values
            _events = IoC.Get <IEventAggregator>();
            _pm     = IoC.Get <PulseManager>();

            // Initialize the list
            TimeZoneList = new ReactiveList <AdcpTimeZoneOptions>();
            TimeZoneList.Add(new AdcpTimeZoneOptions(RTI.Commands.AdcpTimeZone.LOCAL, "Local", true));
            TimeZoneList.Add(new AdcpTimeZoneOptions(RTI.Commands.AdcpTimeZone.GMT, "GMT", false));

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.EnsembleIntervalView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Local Date Time Command
            SetLocalDateTimeCommand = ReactiveCommand.Create();
            SetLocalDateTimeCommand.Subscribe(_ => SetLocalDateTime());

            // GMT Date Time Command
            SetGmtDateTimeCommand = ReactiveCommand.Create();
            SetGmtDateTimeCommand.Subscribe(_ => SetGmtDateTime());

            InitializeValue();
        }
Esempio n. 11
0
        /// <summary>
        /// 저장작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnSave(object obj)
        {
            // 필수체크 (Tag에 필수체크 표시한 EditBox, ComboBox 대상으로 수행)
            if (!BizUtil.ValidReq(blk03AddView))
            {
                return;
            }


            if (Messages.ShowYesNoMsgBox("저장하시겠습니까?") != MessageBoxResult.Yes)
            {
                return;
            }

            try
            {
                BizUtil.Update2(Dtl, "updateBlk03Dtl");
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBox("저장 처리중 오류가 발생하였습니다." + ex.Message);
                return;
            }
            Messages.ShowOkMsgBox();
            BackCommand.Execute(null); //닫기
        }
Esempio n. 12
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public TemperatureViewModel()
            : base("Salinity")
        {
            // Initialize values
            _events = IoC.Get <IEventAggregator>();
            _pm     = IoC.Get <PulseManager>();


            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.TimeView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Salinity coommand
            SalinityCommand = ReactiveCommand.Create();
            SalinityCommand.Subscribe(param => OnSalinityCommand(param));

            InitializeValue();
        }
Esempio n. 13
0
        private void OnSearch()
        {
            if (!Id.HasValue)
            {
                return;
            }

            if (_history.Any())
            {
                if (_history.Peek() != Id.Value)
                {
                    _history.Push(Id.Value);
                }
            }
            else
            {
                _history.Push(Id.Value);
            }

            Tables.Clear();
            foreach (var table in DbManager.Search(ConnectionString, Id.Value).OrderBy(x => x.Name))
            {
                Tables.Add(table);
            }

            BackCommand.OnCanExecuteChanged();
        }
Esempio n. 14
0
        /// <summary>
        /// Initialize the view model.
        /// </summary>
        public FrequencyViewModel()
            : base("Frequency ViewModel")
        {
            // Initialize values
            _events = IoC.Get <IEventAggregator>();
            _pm     = IoC.Get <PulseManager>();


            // Next command
            NextCommand = ReactiveCommand.Create(this.WhenAny(x => x.SelectedSubsystem, x => x.Value != null));
            NextCommand.Subscribe(_ => OnNextCommand());

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            FreqCommand = ReactiveCommand.Create();
            FreqCommand.Subscribe(param => AddConfig(param));

            // Set the possible subsystems
            SetSubsystems();
        }
Esempio n. 15
0
        private void ExecuteSave()
        {
            _appSettingsService.Save(AppSettings);
            _projectSettingsService.Save(ProjectSettings);

            BackCommand.Execute(null);
        }
Esempio n. 16
0
        /// <summary>
        /// Select whether to playback a file or a project.
        /// </summary>
        public SelectPlaybackViewModel()
            : base("Select Playback")
        {
            // Initialize values
            _pm     = IoC.Get <PulseManager>();
            _events = IoC.Get <IEventAggregator>();

            // Initialize values
            IsLoading = false;

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.ViewDataView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Select a file to playback
            FilePlaybackCommand = ReactiveCommand.Create();
            FilePlaybackCommand.Subscribe(_ => PlaybackFile());

            // Project coommand
            ProjectPlaybackCommand = ReactiveCommand.Create();
            ProjectPlaybackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.LoadProjectsView)));
        }
        public Task <IReadOnlyCollection <ITelegramResponse> > Handle(BackCommand request,
                                                                      CancellationToken cancellationToken)
        {
            var startKeyboard = StartKeyboard();

            return(Task.FromResult(startKeyboard));
        }
Esempio n. 18
0
        /// <summary>
        /// Create a base view for all the Averaging Views.
        /// </summary>
        public AveragingBaseViewModel()
            : base("AvergingBaseViewModel")
        {
            // Project Manager
            _pm = IoC.Get <PulseManager>();
            _pm.RegisterDisplayVM(this);
            _events = IoC.Get <IEventAggregator>();
            _events.Subscribe(this);

            // Initialize the dict
            _averagingVMDict = new ConcurrentDictionary <SubsystemDataConfig, AveragingViewModel>();

            // Create the ViewModels based off the AdcpConfiguration
            AddConfigurations();

            // Next command
            NextCommand = ReactiveCommand.Create();
            NextCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.SimpleCompassCalWizardView)));

            // Back coommand
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Exit coommand
            ExitCommand = ReactiveCommand.Create();
            ExitCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));
        }
Esempio n. 19
0
 private void BrowserOnLoadingStateChanged(object o, LoadingStateChangedEventArgs loadingStateChangedEventArgs)
 {
     _dispatcher.InvokeAsync(() =>
     {
         BackCommand.RaiseCanExecuteChanged();
         ForwardCommand.RaiseCanExecuteChanged();
     });
 }
Esempio n. 20
0
 public UpdatePhysicianViewModel(AdminShellViewModel containingVm, Physician physicianToUpdate)
 {
     updatePhysicianM  = new UpdatePhysicianModel();
     this.containingVm = containingVm;
     Physician         = physicianToUpdate;
     UpdateDbCommand   = new UpdateInDbCommand(this);
     IsNewPhysician    = false;
     BackCommand       = new BackCommand(this);
 }
Esempio n. 21
0
 public UpdatePatientViewModel(AdminShellViewModel containingVm, Patient patientToUpdate)
 {
     updatePatientM    = new UpdatePatientModel();
     this.containingVm = containingVm;
     Patient           = patientToUpdate;
     UpdateDbCommand   = new UpdateInDbCommand(this);
     IsNewPatient      = false;
     BackCommand       = new BackCommand(this);
 }
Esempio n. 22
0
        /// <summary>
        /// 삭제처리
        /// </summary>
        /// <param name="obj"></param>
        private void OnDelete(object obj)
        {
            //0.삭제전 체크
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectFileMapList");
            param.Add("sqlId2", "SelectFileMapList");
            param.Add("CNT_NUM", Dtl.CNT_NUM);

            Hashtable result = BizUtil.SelectLists(param);
            DataTable dt     = new DataTable();
            DataTable dt2    = new DataTable();

            /*
             * try
             * {
             *  dt = result["dt"] as DataTable;
             *  if (dt.Rows.Count > 0)
             *  {
             *      Messages.ShowErrMsgBox("사진첨부내역이 존재합니다.");
             *      return;
             *  }
             * }
             * catch (Exception) { }
             * try
             * {
             *  dt2 = result["dt2"] as DataTable;
             *  if (dt2.Rows.Count > 0)
             *  {
             *      Messages.ShowInfoMsgBox("파일첨부내역이 존재합니다.");
             *      return;
             *  }
             * }
             * catch (Exception) { }
             */


            // 1.삭제처리
            if (Messages.ShowYesNoMsgBox("급수전대장을 삭제하시겠습니까?") != MessageBoxResult.Yes)
            {
                return;
            }
            try
            {
                BizUtil.Update2(Dtl, "deleteSplyDtl");
            }
            catch (Exception)
            {
                Messages.ShowErrMsgBox("삭제 처리중 오류가 발생하였습니다.");
                return;
            }
            Messages.ShowOkMsgBox();



            BackCommand.Execute(null);
        }
Esempio n. 23
0
 public AddPhysicianViewModel(AdminShellViewModel containingShellVm)
 {
     addPhysicianM     = new AddPhysicianModel();
     this.containingVm = containingShellVm;
     UpdateDbCommand   = new AddToDbCommand(this);
     IsNewPhysician    = true;
     BackCommand       = new BackCommand(this);
     Physician         = new Physician();
 }
Esempio n. 24
0
        private void OnBrowserNavigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            WebAddress = e.Uri == null ? "" : e.Uri.OriginalString;
            var doc = Browser.Browser.Document as HTMLDocument;

            Header = doc.title == "" ? Header : doc.title;
            ForwardCommand.RaiseCanExecuteChanged();
            BackCommand.RaiseCanExecuteChanged();
        }
Esempio n. 25
0
        /// <summary>
        /// Load the home view.
        /// </summary>
        public ShellViewModel(IEventAggregator events)
        {
            Debug.Print("Shell Open");
            // To set the Window title
            // http://stackoverflow.com/questions/4615467/problem-with-binding-title-of-wpf-window-on-property-in-shell-view-model-class
            base.DisplayName = "Pulse";

            // Initialize the values
            _events = events;
            events.Subscribe(this);

            // Setup ErrorLog
            SetupErrorLog();

            // Set a size of 10 views
            _backStack        = new Stack <ViewNavEvent>(20);
            _prevViewNavEvent = null;

            // Set the Navigation bar viewmodel
            NavBarVM        = IoC.Get <NavBarViewModel>();
            IsNavBarEnabled = false;

            // Set the Playback viewmodel
            PlaybackVM        = IoC.Get <PlaybackViewModel>();
            IsPlaybackEnabled = false;

            // Command to view the Home view
            HomeViewCommand = ReactiveCommand.Create();
            HomeViewCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.HomeView)));

            // Command to view the Terimal view
            TerminalViewCommand = ReactiveCommand.Create();
            TerminalViewCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.TerminalView)));

            // Command to view the Settings view
            SettingsViewCommand = ReactiveCommand.Create();
            SettingsViewCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.SettingsView)));

            // Command to view the Settings view
            AboutViewCommand = ReactiveCommand.Create();
            AboutViewCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.AboutView)));

            // Command to view the Settings view
            ValidationTestViewCommand = ReactiveCommand.Create();
            ValidationTestViewCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.ValidationTestView)));

            // Command to go back a view
            BackCommand = ReactiveCommand.Create();
            BackCommand.Subscribe(_ => _events.PublishOnUIThread(new ViewNavEvent(ViewNavEvent.ViewId.Back)));

            // Display the HomeViewModel
            Handle(new ViewNavEvent(ViewNavEvent.ViewId.HomeView));

            // Check for updates to the applications
            CheckForUpdates();
            Debug.Print("Shell Complete");
        }
Esempio n. 26
0
 protected override bool OnBackButtonPressed()
 {
     if (ActiveParentId != 1)
     {
         BackCommand.Execute(null);
         return(true);
     }
     base.OnBackButtonPressed();
     return(false);
 }
 public AddPatientViewModel(AdminShellViewModel containingVm)
 {
     addPatientM       = new AddPatientModel();
     this.containingVm = containingVm;
     UpdateDbCommand   = new AddToDbCommand(this);
     TodayDate         = DateTime.Today;
     IsNewPatient      = true;
     BackCommand       = new BackCommand(this);
     Patient           = new Patient();
 }
Esempio n. 28
0
 public HistoricalMedicalRecordsViewModel(PhysicianShellViewModel containingVm, string patientId, Physician physician)
 {
     this.containingVm        = containingVm;
     this.medicalRecordM      = new MedicalRecordModel(patientId, physician);
     MedicalRecordsCollection = new ObservableCollection <MedicalRecord>(medicalRecordM.MedicalRecordsList);
     BackCommand        = new BackCommand(this);
     EditingItemCommand = new EditingItemCommand(this);
     this.physician     = physician;
     this.patientId     = patientId;
 }
Esempio n. 29
0
 protected override void OnNewTemplatesAvailable()
 {
     UpdateCanFinish(false);
     _canGoBack = false;
     BackCommand.OnCanExecuteChanged();
     ShowFinishButton = false;
     EnableGoForward();
     NavigationService.Navigate(new NewItemSetupView());
     NewItemSetup.Initialize(true);
 }
 public FoodInformationViewModel(DashboardVM aDashboardVM)
 {
     Calculator        = new NutritionalValuesCalculatorCommand(this);
     SweetsInfo        = new SweetsInfoCommand(this);
     SaltyInfo         = new SaltyInfoCommand(this);
     MeatInfo          = new MeatInfoCommand(this);
     DairyInfo         = new DairyInfoCommand(this);
     BackWindowCommand = new BackCommand(this);
     dashboardVM       = aDashboardVM;
 }