Пример #1
0
        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);
        }
Пример #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);
        }
Пример #3
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();
        }
Пример #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();
        }
Пример #5
0
 protected abstract void EmitPoolValueInitializer(PoolValue value);
Пример #6
0
 protected abstract void EmitPoolValueDefinition(PoolValue value);
Пример #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();
 }