public override void ExecuteCommand(string userId, string command) { ServerVncStatus vncData = deserialize.Deserialize <ServerVncStatus>(command); if (vncData == null) { return; } List <VncModel> vncList = new List <VncModel>(); foreach (VncEntry entry in vncData.UserVncList) { VncModel model = new VncModel() { Identifier = entry.Identifier, DisplayName = entry.OwnerPCName, DisplayCount = entry.MonitorCount, }; vncList.Add(model); } client.RefreshVncList(vncList); }
public override void ExecuteCommand(string userId, string command) { ServerVncStatus vncData = deserialize.Deserialize <ServerVncStatus>(command); if (vncData == null) { return; } List <VncModel> vncList = new List <VncModel>(); foreach (VncEntry entry in vncData.UserVncList) { VncModel model = new VncModel() { Identifier = entry.Identifier, DisplayName = entry.DisplayName, VncServerIp = entry.IpAddress, VncServerPort = entry.Port }; vncList.Add(model); } ApplicationSettings.GetInstance().VncList = vncData.UserVncList; client.RefreshVncList(vncList); }
public override void ExecuteCommand(string userId, string command) { ServerPresetsStatus vncData = deserialize.Deserialize <ServerPresetsStatus>(command); if (vncData == null) { return; } List <PresetModel> presetList = new List <PresetModel>(); foreach (PresetsEntry entry in vncData.UserPresetList) { List <ApplicationModel> appList = new List <ApplicationModel>(); foreach (ApplicationEntry appEntry in entry.ApplicationList) { ApplicationModel appModel = new ApplicationModel() { AppliationId = appEntry.Identifier, ApplicationName = appEntry.Name, }; appList.Add(appModel); } List <VncModel> vncList = new List <VncModel>(); foreach (VncEntry vncEntry in entry.VncList) { VncModel vncModel = new VncModel() { Identifier = vncEntry.Identifier, DisplayName = vncEntry.DisplayName, VncServerIp = vncEntry.IpAddress, VncServerPort = vncEntry.Port, }; vncList.Add(vncModel); } PresetModel model = new PresetModel() { PresetId = entry.Identifier, PresetName = entry.Name, ApplicationList = appList, VncList = vncList, VisionInputList = entry.InputList, }; presetList.Add(model); } ApplicationSettings.GetInstance().PresetList = vncData.UserPresetList; client.RefreshPresetList(presetList); }