Пример #1
0
        public wfLogin(wfClient obj)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            parent = obj;

            // Load the default values from the registry
            Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\" + MessengerShared.ApplicationName + "\\Client", true);
            // If the key doesn't exist, create it
            if (key == null)
            {
                key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\" + MessengerShared.ApplicationName + "\\Client");
            }

            txtServer.Text = (string)key.GetValue("ServerName", null);
            txtUser.Text   = (string)key.GetValue("Username", null);
            txtPwd.Text    = (string)key.GetValue("Password", null);
            if ((txtPwd.Text != null) && (txtPwd.Text != ""))
            {
                chkRemember.Checked = true;
            }

            key.Close();
        }
Пример #2
0
        public wfMsg(string username, wfClient obj)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            msUser    = username;
            parent    = obj;
            this.Text = "Message - " + msUser;
        }