Esempio n. 1
0
        protected void element_Changed(FableMod.TNG.Element element)
        {
            // Got the message from the block.
            UpdateFont();

            OnBlockChanged();
        }
Esempio n. 2
0
        protected void variable_Changed(FableMod.TNG.Element element)
        {
            // Get the changed message from the TNG variable.
            UpdateFont();

            if (myVariable.Type == FableMod.TNG.VariableType.Boolean)
            {
                CheckBox checkBox = (CheckBox)myValueControl;
                checkBox.Checked = (bool)myVariable.Value;
            }
            else
            {
                TextBox textBox = (TextBox)myValueControl;
                textBox.Text = myVariable.StringValue;
            }
        }
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FableMod.TNG.Element element =
                ((FableMod.TNG.ElementArray)myBlock).Add();

            AddElement(element);

            panelControls.SuspendLayout();

            panelControls.Controls[
                panelControls.Controls.Count - 1].BringToFront();

            panelControls.ResumeLayout(true);

            bool enabled = panelControls.Controls.Count > 0;

            buttonExpand.Enabled  = enabled;
            buttonDefault.Enabled = enabled;

            array_ControlsUpdated();

            element = null;
        }