예제 #1
0
        private void OnStartup(object sender, StartupEventArgs e)
        {
            //OperatorImage temp = new OperatorImage();
            Site site = new Site { PhoneNumber = "", SMSText = "" };
            MainWindow window = new MainWindow();
            SiteViewModel siteViewModel = new SiteViewModel(site);
            HistoryViewModel historyViewModel = new HistoryViewModel(site);
            MainWindowViewModel mainWindowViewModel = new MainWindowViewModel(site);
            ContactViewModel contactViewModel = new ContactViewModel(window, site, siteViewModel);

            window.smsTab.DataContext = siteViewModel;
            window.historyTab.DataContext = historyViewModel;
            window.contactTab.DataContext = contactViewModel;
            window.mainWindow.DataContext = mainWindowViewModel;
            window.Show();
        }
예제 #2
0
 public MainWindowViewModel(Site siteModel)
 {
     this.site = siteModel;
 }
예제 #3
0
 public SiteViewModel(Site siteModel)
 {
     this.site = siteModel;
 }
예제 #4
0
 public ContactViewModel(MainWindow window, Site site, SiteViewModel siteViewModel)
 {
     this.window = window;
     this.site = site;
     this.siteViewModel = siteViewModel;
 }