public void StoppedControl() { // シナリオ // def がCurrentController // oth がRequestControl // oth のStartControlyobidasi // oth がCurrentController var def = new NullController {Name = "def"}; var oth = new NullController {Name = "oth"}; var cm = new DppControlManager(); cm.AddController("def", def, true); cm.AddController("oth", oth); Console.WriteLine("Requested control."); oth.RaiseRequestControl(); Console.WriteLine("Control terminated."); oth.RaiseStoppedControl("D2XX0"); }
public void Initialize() { Manager = new DppControlManager(); CacheVM = new DppCacheViewModel {Cache = new DppCache()}; ServerVM = new AwaitingServerViewModel {Server = new AwaitingServer()}; Manager.AddController("Cache", CacheVM.Cache, true); Manager.AddController("Server", ServerVM.Server); CacheVM.LoadParametersFromDefault(); Manager.ChangePort(DefaultPortName); }