コード例 #1
0
ファイル: App.xaml.cs プロジェクト: git109/healthkick
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            ShutdownMode = ShutdownMode.OnExplicitShutdown;

              //_mediaEvent.MediaWatcher += new MediaWatcherEventHandler(MeMediaWatcher);
              _mediaEvent.ContourUSBInserted += OnContourUSBInserted;
              // TODO Remove the logical device stuff
              _mediaEvent.Monitor("K:", _mediaEvent);

              //dbPath = GetUserDirectory() + @"\GLUCOFACTS Deluxe\logs\Barracuda.log";
              // TODO rename
              //dbPath = @"C:\Bayer.db";
              // NOTE: For debugging copy Bayer.db to the Debug output directory
              dbPath = Directory.GetCurrentDirectory();
              dbFilename = "Bayer.db";
              dbPathAndFilename = dbPath  + @"\" + dbFilename;

              var dao = new DAO();
              vm = new StickerViewModel(dao);
              //vm.NewSticker();

              // Create system tray icon
              var tbi = new TaskbarIcon();
              tbi.Icon = new Icon("DefaultTrayIcon.ico");
              tbi.ToolTipText = "HealthKick!";
              tbi.ContextMenu = new ContextMenu();
              var mi = new MenuItem();
              mi.Header = "Exit";
              mi.Click += mi_Click;
              tbi.ContextMenu.Items.Add(mi);
              tbi.MenuActivation = PopupActivationMode.RightClick;

              // Timer for waiting after db accesses
              MyTimer = new Timer();
              MyTimer.Elapsed += MyTimerElapsed;
              MyTimer.Interval = 2000;
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: git109/healthkick
 public void SetViewModel(ViewModel.StickerViewModel stickerViewModel)
 {
     _vm = stickerViewModel;
 }
コード例 #3
0
 public OKCommand(StickerViewModel vm)
 {
     this.vm = vm;
 }
コード例 #4
0
 public void SetViewModel(ViewModel.StickerViewModel stickerViewModel)
 {
     _vm = stickerViewModel;
 }
コード例 #5
0
ファイル: StickerViewModel.cs プロジェクト: git109/healthkick
 public OKCommand(StickerViewModel vm)
 {
     this.vm = vm;
 }