Example #1
0
        private void SetLanguage()
        {
            StringForm form = (StringForm)Owner;

            if (form.GetType() == typeof(DropboxFileDialog))
            {
                LanguageUtil.SetCurrentLanguage(this);

                fileNameLabel.Text = LanguageUtil.GetCurrentLanguageString("fileNameLabel_DropboxFileDialog", Name);
                okButton.Text      = LanguageUtil.GetCurrentLanguageString("okButton_DropboxFileDialog", Name);
                Text = LanguageUtil.GetCurrentLanguageString("Title_DropboxFileDialog", Name);
            }
            else if (form.GetType() == typeof(ZipExtract))
            {
                LanguageUtil.SetCurrentLanguage(this);

                fileNameLabel.Text = LanguageUtil.GetCurrentLanguageString("fileNameLabel_ZipExtract", Name);
                okButton.Text      = LanguageUtil.GetCurrentLanguageString("okButton_ZipExtract", Name);
                Text = LanguageUtil.GetCurrentLanguageString("Title_ZipExtract", Name);
            }
        }
Example #2
0
        private void fileNameTextBox_TextChanged(object sender, EventArgs e)
        {
            StringForm form = (StringForm)Owner;

            okButton.Enabled = !(String.IsNullOrEmpty(fileNameTextBox.Text));

            if (form.GetType() == typeof(DropboxFileDialog) && DropboxManager.StringContainsCharNotAllowed(fileNameTextBox.Text))
            {
                okButton.Enabled = false;
                WindowManager.ShowAlertBox(this, LanguageUtil.GetCurrentLanguageString("DPDefaultFileCharNotAllowed", Name));
                fileNameTextBox.Focus();
            }
        }