public ShellViewModel() { // TODO: set config directly m_migrationServiceManager = MigrationServiceManager.GetInstance(); // Set up runtime view model hosting environment m_runtimeManager = RuntimeManager.GetInstance(); IRefreshService refresh = (IRefreshService)m_runtimeManager.GetService(typeof(IRefreshService)); refresh.AutoRefresh += this.AutoRefresh; // Avoid race by driving through top level refresh instead of relying upon background thread. Refresh(); ConfigurationModel.Initialize(); m_headlineViewModel = new HeadlineControlViewModel(Properties.Resources.ShellHeaderString, this); m_notificationBarVM = new NotificationBarViewModel(this); PushViewModel(new HomeViewModel(this)); m_backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_DoWork); m_backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(m_backgroundWorker_RunWorkerCompleted); this.Controller.Created += this.OnCreated; this.Controller.Opened += this.OnOpened; this.Controller.Saved += this.OnSaved; }
public SessionGroupRunViewModel(RTSessionGroupRun sessionGroupRun) { m_sessionGroupRun = sessionGroupRun; m_host = RuntimeManager.GetInstance(); IRefreshService refresh = (IRefreshService)m_host.GetService(typeof(IRefreshService)); refresh.AutoRefresh += this.AutoRefresh; // Avoid race by driving through top level refresh instead of relying upon background thread. Refresh(); }
private void Hyperlink_Click(object sender, RoutedEventArgs e) { OneWaySessionMigrationViewModel oneWaySession = (sender as Hyperlink).DataContext as OneWaySessionMigrationViewModel; var v = oneWaySession.Source; TabControl tabControl = FindVisualParent <TabControl>(this); tabControl.SelectedIndex = 1; RuntimeManager runtimeManager = RuntimeManager.GetInstance(); runtimeManager.ConflictManager.SelectedMigrationSource = runtimeManager.ConflictManager.MigrationSources.Single(x => x.UniqueId.Equals(v.UniqueId)); }
public ChangeGroupViewModel(RTChangeGroup changeGroup) { m_changeGroup = changeGroup; m_host = RuntimeManager.GetInstance(); }
public override void Init() { base.Init(); mFMODManager = RuntimeManager.GetInstance(); }
public ConflictViewModel(RTConflict conflict) { m_conflict = conflict; m_host = RuntimeManager.GetInstance(); }