private void InitializeViews()
 {
     BasesViewModel = new BasesViewModel(db);
     BasesView      = new BasesView {
         DataContext = BasesViewModel
     };
     PlatformViewModel = new PlatformViewModel(db);
     PlatformView      = new PlatformView {
         DataContext = PlatformViewModel
     };
     ActionsViewModel = new ActionsViewModel(db);
     ActionsView      = new ActionsView {
         DataContext = ActionsViewModel
     };
     DistributionViewModel = new DistributionViewModel(db);
     DistributionView      = new DistributionView {
         DataContext = DistributionViewModel
     };
     HomeViewModel = new HomeViewModel(db);
     HomeView      = new HomeView {
         DataContext = HomeViewModel
     };
     TelegramViewModel = new TelegramViewModel(db);
     TelegramView      = new TelegramView {
         DataContext = TelegramViewModel
     };
 }
Example #2
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     _windowClosing = true;
     SettingsView.BotMapPage.WindowClosing = true;
     if (Bot == null || _loadingUi)
     {
         return;
     }
     Bot.GlobalSettings.StoreData(SubPath + "\\" + Bot.ProfileName);
     TelegramView.SaveSettings();
     foreach (var b in BotsCollection)
     {
         b.Stop();
     }
     MapzenAPI.SaveKnownCoords();
 }
Example #3
0
        public MainPresenter(MainView mainview)
        {
            Console.WriteLine("Presenter Created");

            _loginmanager = new LoginManager();
            _loginmanager.OnUpdateAccountInfo += new EventHandler <LoginInfoArgs>(UpdateAccountInfo); // event있는 클래스에 UpdateAccountInfo를 Subscribe함

            _mainview                  = mainview;
            _mainview.OnLogin         += new System.EventHandler(Login);
            _mainview.OnRegisterStock += new System.EventHandler(RegisterStock);
            _mainview.OnSearchKOSPI   += new System.EventHandler(SearchKOSPI);


            _transactionmanager = new TransactionManager();
            _transactionmanager._realService.OnUpdateRealDataInfo += new EventHandler(UpdateRealDataInfo);
            _transactionmanager.OnNotifyException += new EventHandler(NotifyException);


            _mainview.UpdateDataSourceToGrid(_transactionmanager._종목정보리스트);

            _telegramview                   = new TelegramView();;
            _telegramview.OnCount          += new System.EventHandler(Count);
            _telegramview.OnRealDatasCount += new System.EventHandler(RealDatasCount);
        }