예제 #1
0
파일: Pager.cs 프로젝트: dada/theresa
 public void Add(int id, ControllerConfig cfg, int value, int value2)
 {
     ControllerState s = new ControllerState();
       cfg.CopyTo(s.Config);
       s.Value = value;
       s.Value2 = value2;
       _Config.Add(id, s);
 }
예제 #2
0
파일: Pager.cs 프로젝트: dada/theresa
 public ControllerState()
 {
     Config = new ControllerConfig();
 }
예제 #3
0
파일: Client.cs 프로젝트: dada/theresa
 private void OnControlConfigure(object sender, EventArgs e)
 {
     IMidiController control = (IMidiController) sender;
       if(_ControllerConfigScreen == null) _ControllerConfigScreen = new ControllerConfigScreen(CurrentSkin);
       ControllerConfig cfg = new ControllerConfig();
       control.Config.CopyTo(cfg);
       _ControllerConfigScreen.Config = cfg;
       DialogResult r = _ControllerConfigScreen.ShowDialog();
       if(r == DialogResult.OK) {
     cfg.CopyTo(control.Config);
       }
 }
예제 #4
0
 public MidiControllerBase(Skin skin)
     : base()
 {
     _Skin = skin;
       _Config = new ControllerConfig();
       this.Paint += new PaintEventHandler(OnPaint);
       this.Resize += new EventHandler(OnResize);
       InitGraphics();
 }
예제 #5
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);
       }
 }