public static WCFPlayerWindowInformation2 ToWCF(PlayerWindowInformation2 info) { ScreenInformation[] keys = info.Configuration.Keys.ToArray(); ItemConfiguration[][] values = new ItemConfiguration[keys.Length][]; WCFScreenInformation[] newKeys = new WCFScreenInformation[keys.Length]; WCFItemConfiguration[][] newValues = new WCFItemConfiguration[keys.Length][]; int index = 0; foreach (var key in keys) { values[index] = info.Configuration[key].ToArray(); newKeys[index] = ToWCF(key); newValues[index++] = ToWCF(values[index]).ToArray(); } WCFPlayerWindowInformation2 res = new WCFPlayerWindowInformation2() { Displays = newKeys, Components = newValues }; return(res); }
public static ScreenInformation ToNET(WCFScreenInformation screen) { return(new ScreenInformation(ToNET(screen.Bounds), screen.DeviceID, screen.Primary)); }