public void OnApply()
        {
            if (ConnectDialogRB.Checked == true)
            {
                Preferences.LocalSettings["ConnectPreference"] = (int)ConnectionPreference.ShowDialog;
            }
            else if (ConnectRecentRB.Checked == true)
            {
                Preferences.LocalSettings["ConnectPreference"] = (int)ConnectionPreference.UseRecent;
            }
            else if (ConnectSolutionRB.Checked == true)
            {
                Preferences.LocalSettings["ConnectPreference"] = (int)ConnectionPreference.UseSolution;
            }
            else
            {
                Preferences.LocalSettings["ConnectPreference"] = (int)ConnectionPreference.UseEnvironment;
            }

            if (useIPChk.Checked == true)
            {
                Preferences.LocalSettings["Use_IP"] = true;
            }
            else
            {
                Preferences.LocalSettings["Use_IP"] = false;
            }

            if (autoLogoffChk.Checked == true)
            {
                Preferences.LocalSettings["Auto_logoff"] = true;
            }
            else
            {
                Preferences.LocalSettings["Auto_logoff"] = false;
            }

            _recentConnections = new MRUList(5);
            if (mruLB.Items.Count > 0)
            {
                foreach (string item in mruLB.Items)
                {
                    string[]       connection = item.ToString().Split(',');
                    ConnectionData cd         = new ConnectionData();
                    cd.ServerPort = connection[0];
                    cd.UserName   = connection[1].Trim();
                    cd.Workspace  = connection[2].Trim();
                    _recentConnections.Add(cd);
                }
                Preferences.LocalSettings["RecentConnections"] = _recentConnections;
            }
            else
            {
                Preferences.LocalSettings.Remove("RecentConnections");
            }

            //double val = -1;
            //double.TryParse(CommandTimeoutTB.Text, out val);
            //if (val > 0)
            //{
            //    Preferences.LocalSettings["CommandTimeOut"] = TimeSpan.FromSeconds(val);
            //}
            //else
            //{
            //    Preferences.LocalSettings.Remove("CommandTimeOut");
            //}
        }