コード例 #1
0
 private QueueControl CreatePluginControlIds(ControlEntry entry)
 {
     var controlId = entry.Id;
     var pluginControlId = entry.Control.Id;
     var pluginId = Controls.GetPluginId(entry);
     var simpleActions = entry.Control.SimpleActions;
     var slidingActions = entry.Control.SlidingActions;
     return new QueueControl(controlId, pluginControlId, pluginId, simpleActions, slidingActions);
 }
コード例 #2
0
 private static object CreateDeviceState()
 {
     var pluginId = Guid.NewGuid();
     var controls = new PluginControlEntryDictionary();
     var controlEntry = new ControlEntry(
         Guid.NewGuid(),
         new Control("1", "name1", new[] { "action1" }, new[] { "action2" }));
     controls[pluginId].Add(controlEntry);
     var devices = new DeviceEntryList
     {
         new DeviceEntry(Guid.NewGuid(), "device1", new[] {controlEntry})
     };
     return new DeviceStoreState(devices, controls);
 }
コード例 #3
0
 public Guid GetPluginId(ControlEntry entry)
 {
     return Dic.Keys.First(pluginId => Dic[pluginId].Contains(entry));
 }
コード例 #4
0
 public ControlDeviceDataEntry(ControlEntry control, Guid deviceId)
 {
     Control = control;
     DeviceId = deviceId;
 }