Example #1
0
        public void SetModAction(int index, string actionType, string actionBody, StringLocalised actionComment, bool isXml)
        {
            actionIndex                      = index;
            comboBoxActionType.Text          = string.Copy(actionType);
            textEditorControlActionBody.Text = string.Copy(actionBody);
            StringLocalised tempLang = new StringLocalised();

            foreach (string Language in actionComment)
            {
                tempLang.Add(actionComment[Language], Language);
            }
            textEditorControlComment.TextLang = tempLang;

            if (isXml)
            {
                switch (actionType)
                {
                case "FIND":
                    textEditorControlComment.Enabled = true;
                    break;

                default:
                    textEditorControlComment.Enabled = false;
                    break;
                }
                textEditorControlComment.LanguageSelectorVisible = true;
            }
            else
            {
                textEditorControlComment.LanguageSelectorVisible = false;
                switch (actionType)
                {
                case "SAVE/CLOSE ALL FILES":
                    textEditorControlComment.Enabled = false;
                    break;

                default:
                    textEditorControlComment.Enabled = true;
                    break;
                }
            }
        }
Example #2
0
 private void languageSelectionDialog1_Save(object sender, ModFormControls.LanguageSelectionDialogBoxSaveEventArgs e)
 {
     textLang.Add("", e.Language);
     UpdateDisplay();
     this.Parent.Select();
 }