예제 #1
0
        private void UpdateTexts()
        {
            AddButton.Text       = I18N.GetString("&Add");
            DeleteButton.Text    = I18N.GetString("&Delete");
            DuplicateButton.Text = I18N.GetString("Dupli&cate");
            IPLabel.Text         = I18N.GetString("Server Addr");
            ServerPortLabel.Text = I18N.GetString("Server Port");
            PasswordLabel.Text   = I18N.GetString("Password");
            EncryptionLabel.Text = I18N.GetString("Encryption");
            ProxyPortLabel.Text  = I18N.GetString("Proxy Port");
            RemarksLabel.Text    = I18N.GetString("Remarks");
            OneTimeAuth.Text     = I18N.GetString("Onetime Authentication");
            ServerGroupBox.Text  = I18N.GetString("Server");
            OKButton.Text        = I18N.GetString("OK");
            MyCancelButton.Text  = I18N.GetString("Cancel");
            MoveUpButton.Text    = I18N.GetString("Move &Up");
            MoveDownButton.Text  = I18N.GetString("Move D&own");
/**********************************<Start> add by Ian.May,Oct.16**********************************/
//Text and other controls for shadowfog panel
/***************************** <Start> add by Ian.May,Oct.16 **************************************/
            //this.Text = I18N.GetString("Edit Servers");
            this.Text = I18N.GetString("Sign In ShadowFog");

            isPasswordTextboxClicked = false;
            // when loading the initial UI, should judge whether to load the user information from local file
            ShadowFogRememberUserCheck.Checked = controller.GetClientUserIsRemember();
            if (ShadowFogRememberUserCheck.Checked)
            {
                ShadowFogUserName.Text = controller.GetClientUserName();
                // the Text is hashed password, not the password itself
                ShadowFogPassword.Text = controller.GetClientUserPasswordHashed();
            }
            else
            {
                SendMessage(ShadowFogUserName.Handle, EM_SETCUEBANNER, 0, " Username...");
                SendMessage(ShadowFogPassword.Handle, EM_SETCUEBANNER, 0, " Password...");
            }
            // must be put after the textbox value changed, in case the textchanged event triggerd to force this flag being false;
            isHashedPassword = ShadowFogRememberUserCheck.Checked;
            /***********************************<End> add by Ian.May,Oct.16*************************************/


            /**********************************<Start> add by Ian.May,Dec.30**********************************/
            //tooltip/ for shadowfogToggleCheck
            /***************************** <Start> add by Ian.May,Dec.30 **************************************/
            ToolTip ShadowFogMode = new ToolTip();

            // Set up the delays for the ToolTip.
            ShadowFogMode.AutoPopDelay = 5000;
            ShadowFogMode.InitialDelay = 1000;
            ShadowFogMode.ReshowDelay  = 500;
            // Force the ToolTip text to be displayed whether or not the form is active.
            ShadowFogMode.ShowAlways = true;

            // Set up the ToolTip text for the Button and Checkbox.
            ShadowFogMode.SetToolTip(this.ShadoFogToggleCheck, "Switch to Shadowsocks if you uncheck this");
            /***********************************<End> add by Ian.May,Dec.30*************************************/
        }