private void LoadUserSettings() { RdsClient.Properties.Settings d = Properties.Settings.Default; this.Width = (d.MainWindow_Size.Width >= this.MinWidth ? d.MainWindow_Size.Width : this.MinWidth); this.Height = (d.MainWindow_Size.Height >= this.MinHeight ? d.MainWindow_Size.Height : this.MinHeight); this.uc_MainTabControl.SelectedIndex = d.MainWindow_SelectedTabIndex; //this.uc_RdsExplorerContainer.MaxTabNameLength = Properties.Settings.Default.RdsExplorerTab_MaxNameLength; //if(d.FavoritesTab_AppList != null && this.m_CompositeRdsAppList != null) //{ // RdsAppList fav_apps = new RdsAppList(d.FavoritesTab_AppList, this.m_CompositeRdsAppList); // if (this.m_FavoriteRdsAppList == null) // { // this.m_FavoriteRdsAppList = fav_apps; // } // else // { // this.m_FavoriteRdsAppList.Clear(); // foreach (RdsApp app in fav_apps) // { // this.m_FavoriteRdsAppList.Add(app); // } // } //} }
private void ResetUserSettings() { RdsClient.Properties.Settings d = Properties.Settings.Default; d.MainWindow_Size = new System.Drawing.Size((int)this.MinWidth, (int)this.MinHeight); d.MainWindow_SelectedTabIndex = 0; d.RDSExplorerTab_ExpandedServers.Clear(); Properties.Settings.Default.Save(); this.LoadUserSettings(); }
private void SaveUserSettings() { RdsClient.Properties.Settings d = Properties.Settings.Default; d.MainWindow_Size = new System.Drawing.Size((int)this.Width, (int)this.Height); d.MainWindow_SelectedTabIndex = this.uc_MainTabControl.SelectedIndex; d.FavoritesTab_AppList = this.m_FavoriteRdsAppList.ToStringCollection(); try { d.RdsExplorerState = this.uc_RdsExplorerContainer.ToXmlDictionaryString(); } catch (System.Exception x) { Jrfc.Exception.HandleException(x); } Properties.Settings.Default.Save(); }