Exemple #1
0
        public LogView(ILogViewModel viewModel)
        {
            _viewModel     = viewModel;
            BindingContext = _viewModel;

            InitializeComponent();
        }
 public ShellViewModel(
     IZoomViewModel zoomViewModel,
     IRetroViewModel retroViewModel,
     IConfigurationViewModel configurationViewModel,
     ILogViewModel logViewModel,
     IRetroService retroService,
     IDialogCoordinator dialogCoordinator)
 {
     m_retroService             = retroService;
     m_dialogCoordinator        = dialogCoordinator;
     RetroViewModel             = retroViewModel;
     UserConfigurationViewModel = configurationViewModel;
     ZoomViewModel = zoomViewModel;
     LogViewModel  = logViewModel;
 }
Exemple #3
0
        public MainViewModel
        (
            IControlsViewModel controlsViewModel,
            IWorkoutsViewModel workoutsViewModel,
            ILogViewModel logViewModel,
            ISettingsViewModel settingsViewModel
        )
        {
            foreach (var item in new object[]
            {
                controlsViewModel,
                workoutsViewModel,
                logViewModel,
                settingsViewModel
            })
            {
                Items.Add(item);
            }

            ActivateItemAsync(Items[1], new System.Threading.CancellationToken());
        }
Exemple #4
0
        public MainViewModel(IDataService dataService, IEnumerable <INotifyService> notifyService, System.Windows.Forms.NotifyIcon notifyIcon, ILogViewModel logVM = null)
        {
            _Startup = true;
            Dispatcher.CurrentDispatcher.ShutdownStarted += Dispatcher_ShutdownStarted;
            LoadSettings();
            SetNotifyIcon(notifyIcon);

            DataService = dataService;
            NotifyService.AddRange(notifyService);
            _LogViewModel = logVM;

            IsAutoStart = GetStartWithSystem();
            AddSortingByDate();

            LoadData();

            View.Closing += View_Closing;

            NotifyTimer          = new DispatcherTimer();
            NotifyTimer.Interval = FirstTick;
            NotifyTimer.Tick    += NotifyTimer_Tick;
            NotifyTimer.Start();

            if (IsAutoStart)
            {
                View.Hide();
                _NotifyIcon.ShowBalloonTip(Properties.Settings.Default.BaloonBasicTipTime,
                                           Properties.Settings.Default.AppName,
                                           Properties.Resources.Started,
                                           System.Windows.Forms.ToolTipIcon.None);
            }
            else
            {
                View.Show();
            }
            _Startup = false;
        }
 public LogModule(ILogViewModel vm)
     : this()
 {
     _vm = vm;
     DataContext = vm;
 }
Exemple #6
0
 public LogModule(ILogViewModel vm) : this()
 {
     _vm         = vm;
     DataContext = vm;
 }
 public LogWindow(ILogViewModel logViewModel)
 {
     InitializeComponent();
     _logViewModel = logViewModel;
     DataContext   = _logViewModel;
 }