コード例 #1
0
 public vMain()
 {
     try
     {
         InitializeComponent();
         controller = cMain.Instance; //Get the singleton
         DataContext = controller;
         controller.AlarmsChanged += new EventHandler(controller_AlarmsChanged);
         timer = new DispatcherTimer(DispatcherPriority.Background);
         timer.Start();
         timer.Tick += new EventHandler(timer_Tick);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
 private void Initialize()
 {
     try
     {
         InitializeComponent();
         controller = cMain.Instance; //Get the singleton
         DataContext = controller;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }