private void listPoolValues_ItemChanging(object sender, ListItemChangingEventArgs e)
        {
            if (e.Item == null)
            {
                return;
            }
            PoolValue item = e.Item.Tag as PoolValue;

            this._poolValue.Value = item;
            e.Item = this.listPoolVars.Items.Cast <ListViewItem>()
                     .FirstOrDefault(i => i.Tag == this._poolValue.Value);
        }
Exemple #2
0
        protected override void EmitPoolValueInitializer(PoolValue value)
        {
            //<poolValueInitialization> ::= <poolName> ’initializerFor:’ <poolVariableNameString>
            //<elementSeparator> <variableInitializer> <elementSeparator>
            //<poolVariableNameString> ::= stringDelimiter <poolVariableName> stringDelimiter
            this.WriteIdentifier(value.Parent.Name);
            this.WriteString(" initializerFor: ");
            this.WriteQuotedIdentifier(value.Name);
            this.WriteElementSeparator();
            this.WriteNewLine();

            this.EmitInitializer(value.Initializer);
        }
        private void CreateNewPoolValueMenuItem_Click(object sender, EventArgs e)
        {
            if (this.Pool == null)
            {
                return;
            }
            if (this.SystemImplementation == null)
            {
                return;
            }
            PoolValue value = new PoolValue(this.Pool);

            value.Name = "";
            if (!this.PoolValueHolder.SetValue(value))
            {
                return;
            }
            this.poolValuesControl.SetPrimaryFocus();
        }
Exemple #4
0
        protected override void EmitPoolValueDefinition(PoolValue value)
        {
            //<poolVariableDefinition> ::= <poolValueDefinition> | <poolConstantDefinition>
            //<poolValueDefinition> ::= <poolName> ’variable:’ <poolVariableNameString> <elementSeparator>
            //<poolConstantDefinition> ::= <poolName> ’constant:’ <poolVariableNameString> <elementSeparator>

            //<poolVariableNameString> ::= stringDelimiter <poolVariableName> stringDelimiter
            //<poolName> ::= identifier
            //<poolVariableName> ::= identifier
            this.WriteIdentifier(value.Parent.Name);
            if (value.PoolValueType == PoolValueTypeEnum.Constant)
            {
                this.WriteString(" constant: ");
            }
            else
            {
                this.WriteString(" variable: ");
            }
            this.WriteQuotedIdentifier(value.Name);
            this.WriteElementSeparator();
            this.WriteNewLine();
            this.WriteNewLine();
        }
 protected abstract void EmitPoolValueInitializer(PoolValue value);
 protected abstract void EmitPoolValueDefinition(PoolValue value);
Exemple #7
0
 private void CreateNewPoolValueMenuItem_Click(object sender, EventArgs e)
 {
     if (this.Pool == null)
         return;
     if (this.SystemImplementation == null)
         return;
     PoolValue value = new PoolValue(this.Pool);
     value.Name = "";
     if (!this.PoolValueHolder.SetValue(value))
         return;
     this.poolValuesControl.SetPrimaryFocus();
 }