예제 #1
0
        private Hashtable settings = new Hashtable(); //Hashtable for our loaded settings.

        public frmLogin()
        {
            InitializeComponent();

            //Try to load the login settings.
            prefs = new PrefsManager();
            prefs.LoadProfiles();
            //Load the profiles to our combobox.
            string[] profiles = new string[100];
            profiles = prefs.profiles;
            for (int i = 0; i < profiles.Length; i++)
            {
                if (profiles[i] != null)
                {
                    cbxProfiles.Items.Add(profiles[i].ToString());
                }
                else
                {
                    //Exit when we hit a null profile.
                    break;
                }
            }

            netcom   = new SLNetCom();
            MainForm = new frmMain(this, netcom, prefs);
            this.AddNetcomEvents();
        }
예제 #2
0
        private Hashtable settings = new Hashtable(); //Hashtable for our loaded settings.

        #endregion Fields

        #region Constructors

        public frmLogin()
        {
            InitializeComponent();

            //Try to load the login settings.
            prefs = new PrefsManager();
            prefs.LoadProfiles();
            //Load the profiles to our combobox.
            string[] profiles = new string[100];
            profiles = prefs.profiles;
            for(int i=0;i<profiles.Length;i++)
            {
                if(profiles[i]!=null)
                {
                    cbxProfiles.Items.Add(profiles[i].ToString());
                }else{
                    //Exit when we hit a null profile.
                    break;
                }
            }

            netcom = new SLNetCom();
            MainForm = new frmMain(this,netcom,prefs);
            this.AddNetcomEvents();
        }
예제 #3
0
 public void LbxChoicesSelectedIndexChanged(object sender, System.EventArgs e)
 {
     gbxGeneral.Visible    = false;
     gbxChat.Visible       = false;
     gbxIM.Visible         = false;
     gbxTimestamps.Visible = false;
     gbxProfiles.Visible   = false;
     if (lbxChoices.SelectedItem.ToString() == "General")
     {
         gbxGeneral.Visible = true;
     }
     else if (lbxChoices.SelectedItem.ToString() == "Chat")
     {
         gbxChat.Visible = true;
     }
     else if (lbxChoices.SelectedItem.ToString() == "IM")
     {
         gbxIM.Visible = true;
     }
     else if (lbxChoices.SelectedItem.ToString() == "Timestamps")
     {
         gbxTimestamps.Visible = true;
     }
     else if (lbxChoices.SelectedItem.ToString() == "Profiles")
     {
         gbxProfiles.Visible = true;
         prefs.LoadProfiles();
         //Load the profiles to our combobox.
         cbxProfiles.Items.Clear();
         string[] profiles = new string[100];
         profiles = prefs.profiles;
         for (int i = 0; i < profiles.Length; i++)
         {
             if (profiles[i] != null)
             {
                 cbxProfiles.Items.Add(profiles[i].ToString());
             }
             else
             {
                 //Exit when we hit a null profile.
                 break;
             }
         }
     }
 }