public void SetSessionGroupUniqueId(Guid sessionGroupUniqueId) { SessionGroupStatus = new SessionGroupStatus(sessionGroupUniqueId); ConflictManager = new ApplicationViewModel(this); ConflictManager.SetSessionGroupUniqueId(sessionGroupUniqueId, true); this.RuntimeManager.SetSessionGroupUniqueId(sessionGroupUniqueId, ConflictManager); Properties.Settings.Default.LastSessionGroupUniqueId = sessionGroupUniqueId; if (!GlobalConfiguration.UseWindowsService) { ISyncStateManager stateManager = SqlSyncStateManager.GetInstance(); stateManager.TryResetSessionGroupStates(sessionGroupUniqueId); RuntimeManager.DisableAutoRefresh(); } else { RuntimeManager.EnableAutoRefresh(); } Refresh(); }