Exemple #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
         if (m_HelpForm != null)
         {
             m_HelpForm.Dispose();
         }
         if (m_BackgroundExpressionCompiler != null)
         {
             m_BackgroundExpressionCompiler.Dispose();
             m_BackgroundExpressionCompiler = null;
         }
     }
     base.Dispose(disposing);
 }
Exemple #2
0
        public TitleSetupEditor()
        {
            InitializeComponent();

            CheckFont();

            VisibleChanged += TitleSetupEditor_VisibleChanged;
            Shown          += TitleSetupEditor_Shown;
            FormClosing    += TitleSetupEditor_FormClosing;
            FormClosed     += TitleSetupEditor_FormClosed;

            buttonOK.Click     += buttonOK_Click;
            buttonCancel.Click += buttonCancel_Click;
            buttonHelp.Click   += buttonHelp_Click;
            buttonSave.Click   += buttonSave_Click;
            buttonRevert.Click += buttonRevert_Click;

            editTitleExpression.SetTabStopChars(ExpressionTextBox.TAB_SIZE);

            editTitleExpression.SelectionChanged += editTitleExpression_SelectionChanged;
            editTitleExpression.AfterUndo        += editTitleExpression_AfterUndo;
            editTitleExpression.AfterRedo        += editTitleExpression_AfterRedo;
            editTitleExpression.UndoEntryAdded   += editTitleExpression_UndoEntryAdded;

            listVariables.MouseDoubleClick += listVariables_MouseDoubleClick;
            listVariables.KeyDown          += listVariables_KeyDown;

            checkBoxDebugExec.CheckedChanged += checkBoxDebugExec_CheckedChanged;

            m_BackgroundExpressionCompiler = new BackgroundExpressionCompiler();
            m_BackgroundExpressionCompiler.ExpressionTextBox    = editTitleExpression;
            m_BackgroundExpressionCompiler.WarningsLabel        = labelWarnings;
            m_BackgroundExpressionCompiler.CompileResultTextBox = titleOrCompileError;

#if DEBUG_GUI
            editTitleExpression.Text = "if (true)\t\ta\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n{\n\t\"this\"\n}\nelse\n{\n\t\"that\"\n}\nXXXXXXXXXWWWWXXXXXIIIIIIIII\u8a9e\u65e0\n";
#endif
        }