Exemple #1
0
        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;
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        public ChangeGroupViewModel(RTChangeGroup changeGroup)
        {
            m_changeGroup = changeGroup;

            m_host = RuntimeManager.GetInstance();
        }
Exemple #5
0
 public override void Init()
 {
     base.Init();
     mFMODManager = RuntimeManager.GetInstance();
 }
Exemple #6
0
 public ConflictViewModel(RTConflict conflict)
 {
     m_conflict = conflict;
     m_host     = RuntimeManager.GetInstance();
 }