Exemplo n.º 1
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            GB18030 name = new GB18030(new byte[128]);

            name.Set(textBox1.Text);
            data.Name = name;
        }
Exemplo n.º 2
0
 public Trigger(Policy p, int index, string name)
     : this()
 {
     this.Parent = p;
     this.Index  = index;
     this.Name   = new GB18030(new byte[128]);
     this.Name.Set(name);
     this.IsEnabled     = true;
     this.IsRun         = false;
     this.IsAttackValid = false;
     this.Count         = 0;
     this.Version       = Trigger.EstimatedVersion;
     this.RootConditon  = new Condition().GetCondition(new CharStream("@5@[email protected]"));
 }
Exemplo n.º 3
0
 public Trigger Deserialize(Policy p, DataStream ds)
 {
     this.Parent = p;
     ++Trigger.Versions[this.Version = ds.ReadInt32()];
     this.Index         = ds.ReadInt32();
     this.IsEnabled     = (int)ds.ReadByte() > 0;
     this.IsRun         = (int)ds.ReadByte() > 0;
     this.IsAttackValid = (int)ds.ReadByte() > 0;
     this.Name          = ds.ReadGB18030();
     this.RootConditon  = new Condition().Deserialize(ds);
     this.Count         = ds.ReadInt32();
     for (int index = 0; index < this.Count; ++index)
     {
         this.Operations.Add(new Operation().Deserialize(this, ds));
     }
     return(this);
 }