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

            // Init lexer and parser
            lexer = new Lexer();
            parser = new Parser(lexer);

            // Initialize Variable Editor
            ve = new VariableEditor();
            ve.setForm(this);

            // Parser availability
            this.parserAvailable = true;

            // Init result value
            this.setEntryBoxValue("Start Typing Here...");

            // Init basic equation parameters
            noButtonSelected = new Button();
            btnMselected = noButtonSelected;
            btnDselected = noButtonSelected;
            btnXselected = noButtonSelected;
            currentMultiplier = 0;
            currentDie = "d0";
            currentModifier = 0;

            defaultFont = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point);
            selectedFont = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point);

            // Init buttons
            this.btnD_Click(this.btnD20, new EventArgs());
            this.btnM_Click(this.btnM1, new EventArgs());
            this.btnX_Click(this.btnX0, new EventArgs());
        }
Пример #2
0
        public MainWindowForm()
        {
            InitializeComponent();

            // Init lexer and parser
            lexer  = new Lexer();
            parser = new Parser(lexer);

            // Initialize Variable Editor
            ve = new VariableEditor();
            ve.setForm(this);

            // Parser availability
            this.parserAvailable = true;

            // Init result value
            this.setEntryBoxValue("Start Typing Here...");

            // Init basic equation parameters
            noButtonSelected  = new Button();
            btnMselected      = noButtonSelected;
            btnDselected      = noButtonSelected;
            btnXselected      = noButtonSelected;
            currentMultiplier = 0;
            currentDie        = "d0";
            currentModifier   = 0;

            defaultFont  = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point);
            selectedFont = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point);

            // Init buttons
            this.btnD_Click(this.btnD20, new EventArgs());
            this.btnM_Click(this.btnM1, new EventArgs());
            this.btnX_Click(this.btnX0, new EventArgs());
        }