Esempio n. 1
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     var viewModel = ContextRegistry.GetContext().GetObject("KnowledgeViewModel");
     //var viewModel = (KnowledgeViewModel)ContextRegistry.GetContext().GetObject("KnowledgeViewModel");
     //viewModel.Gurus = new ReadOnlyCollection<IGuru>(ContextRegistry.GetContext().GetObjectsOfType(typeof(IGuru)).Values.Cast<IGuru>().ToList());
     MainWindow = new MainWindow { Content = viewModel };
     MainWindow.Show();
 }
Esempio n. 2
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     var store = new TransientWisdomStore { MinAddLockMillis = 100, MaxAddLockMillis = 100, MinGetLockMillis = 400, MaxGetLockMillis = 400, Locked = new ThickLocked() };
     var viewModel = new KnowledgeViewModel
         {
             Gurus =
                 new ReadOnlyCollection<IGuru>(
                 new List<IGuru>
                     {
                         new RandomYesNoGuru { MinThinkMillis = 1000, MaxThinkMillis = 1000, Locked = new SpinLocked() },
                         new RandomQuestioningGuru { MinThinkMillis = 1000, MaxThinkMillis = 1000, Locked = new SpinLocked() },
                         new GuruService
                             {
                                 RealGuru = new RandomQuestioningGuru { MinThinkMillis = 1000, MaxThinkMillis = 1000, Locked = new SpinLocked() },
                                 WisdomDataAccessFind = new TransientWisdomDataAccessFind { Store = store },
                                 WisdomDataAccessSave = new TransientWisdomDataAccessSave { Store = store }
                             }
                     })
         };
     MainWindow = new MainWindow { Content = viewModel };
     MainWindow.Show();
 }
Esempio n. 3
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     var viewModel = new KnowledgeViewModel { Gurus = new ReadOnlyCollection<IGuru>(new List<IGuru> { new WcfGuruClientProxy() }) };
     MainWindow = new MainWindow { Content = viewModel };
     MainWindow.Show();
 }