Esempio n. 1
0
        public XyPad(Skin skin)
            : base(skin)
        {
            AdditionalProperty propSpeed = new AdditionalProperty();
              propSpeed.Name = "speed";
              propSpeed.Label = "Speed";
              propSpeed.Min = 0;
              propSpeed.Max = 10;
              propSpeed.Value = 0;
              _Config.AdditionalProperties.Add(propSpeed);

              AdditionalProperty propRestX = new AdditionalProperty();
              propRestX.Name = "restx";
              propRestX.Label = "Rest X";
              propRestX.Min = 0;
              propRestX.Max = 127;
              propRestX.Value = 64;
              _Config.AdditionalProperties.Add(propRestX);

              AdditionalProperty propRestY = new AdditionalProperty();
              propRestY.Name = "resty";
              propRestY.Label = "Rest Y";
              propRestY.Min = 0;
              propRestY.Max = 127;
              propRestY.Value = 64;
              _Config.AdditionalProperties.Add(propRestY);

              _Config.CCMeaning = "X";
              _Config.CC2Meaning = "Y";

              BackToRest = new Timer();
              BackToRest.Interval = 20;
              BackToRest.Tick += new EventHandler(BackToRest_Tick);

              Width = 138;
              Height = 138;

              _BackBrush = new SolidBrush(Color.Black);
              _SelBrush = new SolidBrush(Color.Red);
              _BackRect = new Rectangle(1, 11, Width-2, 127);
              _SelRect = new Rectangle(1, 30, 34, 30);
              _Value = 64;
              _Value2 = 64;
              CalcSelRect();

              _MagentaKiller = new ImageAttributes();
              _MagentaKiller.SetColorKey(Color.Magenta, Color.Magenta);

              this.MouseDown += new MouseEventHandler(OnMouseDown);
              this.MouseMove += new MouseEventHandler(OnMouseMove);
              this.MouseUp += new MouseEventHandler(OnMouseUp);
              CalcSelRect();
        }
Esempio n. 2
0
 public void CopyTo(ControllerConfig target)
 {
     target.Name = _Name;
       target.CC = _CC;
       target.CCMeaning = _CCMeaning;
       target.CC2 = _CC2;
       target.CC2Meaning = _CC2Meaning;
       target.AdditionalProperties.Clear();
       foreach(AdditionalProperty prop in _AdditionalProperties.Values) {
     AdditionalProperty targetprop = new AdditionalProperty();
     prop.CopyTo(targetprop);
     target.AdditionalProperties.Add(targetprop);
       }
 }
Esempio n. 3
0
 public void Add(AdditionalProperty item)
 {
     base.Add(item.Name, item);
 }
Esempio n. 4
0
 public void Remove(AdditionalProperty item)
 {
     base.Remove(item.Name);
 }
Esempio n. 5
0
 public void CopyTo(AdditionalProperty target)
 {
     target.Name = _Name;
       target.Label = _Label;
       target.Min= _Min;
       target.Max = _Max;
       target.Value = _Value;
 }