Пример #1
0
        public SpellAnimEditor()
        {
            try
            {
                InitializeComponent();

                EntryArrayBox.Load("Spell Animations.txt");
                EntryArrayBox.Value         = 0;
                EntryArrayBox.ValueChanged += EntryArrayBox_ValueChanged;

                Commands              = new SpellCommands("Spell Commands.txt");
                Anim_CodeBox.KeyDown += new KeyEventHandler(TextBox_SelectAll);
                Anim_CodeBox.AddSyntax(ASM.GetInstructionsRegex_Thumb(), System.Drawing.Color.Black, FontStyle.Bold | FontStyle.Italic);
                Anim_CodeBox.AddSyntax(Commands.GetRegex(), SystemColors.Highlight);
                Anim_CodeBox.AddSyntax(@"((\b[0-9]+)|((\b0x|\$)[0-9a-fA-F]+))\b", System.Drawing.Color.SlateBlue);
                Anim_CodeBox.AddSyntax("return|label.*", SystemColors.ControlDark);
                Anim_CodeBox.AddSyntax("@.*", SystemColors.ControlDark);
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not properly open the " + this.Text, ex);

                Core_CloseEditor(this, null);
            }
        }