/// <summary> /// Fixed: /// </summary> private static HtmlBuilder SelectableMembers(this HtmlBuilder hb) { return(hb.FieldSelectable( controlId: "SelectableMembers", fieldCss: "field-vertical", controlContainerCss: "container-selectable", controlWrapperCss: " h300", labelText: Displays.SelectableMembers(), listItemCollection: SelectableMembers(), commandOptionPositionIsTop: true, commandOptionAction: () => hb .Div(css: "command-left", action: () => hb .Button( controlCss: "button-icon post", text: Displays.Add(), onClick: "$p.addSelected($(this), $('#CurrentMembers'));", icon: "ui-icon-circle-triangle-w", action: "SelectableMembers", method: "post") .Span(css: "ui-icon ui-icon-search") .TextBox( controlId: "SearchMemberText", controlCss: " always-send auto-postback w100", placeholder: Displays.Search(), action: "SelectableMembers", method: "post")))); }
public static string ToNotice( this Attachments self, Context context, string saved, Column column, bool updated, bool update) { var body = new StringBuilder(); self.ForEach(attachment => { if (attachment.Added == true) { body.Append(" {0} - {1}\r\n".Params( Displays.Add(context: context), attachment.Name)); } else if (attachment.Deleted == true) { body.Append(" {0} - {1}\r\n".Params( Displays.Delete(context: context), attachment.Name)); } }); return(body.ToString().IsNullOrEmpty() ? string.Empty : column.LabelText + " : \r\n" + body); }
public static string ToNotice( this Attachments self, Context context, string saved, Column column, NotificationColumnFormat notificationColumnFormat, bool updated, bool update) { var body = new StringBuilder(); body.Append("\n"); self.ForEach(attachment => { if (attachment.Added == true) { body.Append(" {0} - {1}\n".Params( Displays.Add(context: context), attachment.Name)); } else if (attachment.Deleted == true) { body.Append(" {0} - {1}\n".Params( Displays.Delete(context: context), attachment.Name)); } }); return(notificationColumnFormat.DisplayText( self: body.ToString(), saved: null, column: column, updated: updated && !body.ToString().IsNullOrEmpty(), update: update)); }
public void AddDisplay(ITelemetryDisplay display) { display.CloseDisplayRequest += Display_CloseDisplayRequest; ((Control)display).GotFocus += DisplayController_GotFocus; ((Form)display).MdiParent = Owner; ((Form)display).Show(); if (display is ITelemetryFrameDisplay) { if (Session != null) { ((ITelemetryFrameDisplay)display).Frames = CurrentLap.LapFrames; ((ITelemetryFrameDisplay)display).SetFrameIdx(FrameIdx); } ((ITelemetryFrameDisplay)display).PropertyChanged += DisplayController_PropertyChanged; } else if (display is ITelemetryLapDisplay) { if (Session != null) { ((ITelemetryLapDisplay)display).Laps = Session.Laps; ((ITelemetryLapDisplay)display).SetLapNumber(LapNumber); } ((ITelemetryLapDisplay)display).PropertyChanged += DisplayController_PropertyChanged; } Displays.Add(display); OnDisplayAdded(display); ActivateDisplay(display); }
public EssentialsDualDisplayRoom(DeviceConfig config) : base(config) { try { PropertiesConfig = JsonConvert.DeserializeObject <EssentialsDualDisplayRoomPropertiesConfig> (config.Properties.ToString()); var leftDisp = PropertiesConfig.Displays[eSourceListItemDestinationTypes.leftDisplay]; if (leftDisp != null) { if (!string.IsNullOrEmpty(leftDisp.Key)) { LeftDisplay = DeviceManager.GetDeviceForKey(leftDisp.Key) as IRoutingSinkWithSwitching; Displays.Add(eSourceListItemDestinationTypes.leftDisplay, LeftDisplay); } else { Debug.Console(0, this, "Unable to get LeftDisplay for Room"); } } var rightDisp = PropertiesConfig.Displays[eSourceListItemDestinationTypes.rightDisplay]; if (rightDisp != null) { if (!string.IsNullOrEmpty(rightDisp.Key)) { LeftDisplay = DeviceManager.GetDeviceForKey(rightDisp.Key) as IRoutingSinkWithSwitching; Displays.Add(eSourceListItemDestinationTypes.rightDisplay, RightDisplay); } else { Debug.Console(0, this, "Unable to get LeftDisplay for Room"); } } VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase; if (VideoCodec == null) { throw new ArgumentNullException("codec cannot be null"); } AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase; if (AudioCodec == null) { Debug.Console(0, this, "No Audio Codec Found"); } DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls; Initialize(); } catch (Exception e) { Debug.Console(1, this, "Error building room \n{0}", e); } }
public static void AddRight(Display display) { var left = Displays[Displays.Count - 1]; display.Location = new Point(left.Location.X + left.Screen.Width, display.Location.Y); Displays.Add(display); MainWindow.updateDisplayCanvas(); }
public void RegisterDisplayDevice(string name, string vendorName, string model, string version, string serialNumber, string description, IDisplayModule module) { var device = new DisplayDevice(name, vendorName, model, version, serialNumber, description, module); AllJoynDsbServiceManager.Current.AddDevice(device); _displays.Add(device); Displays.Add(module); }
public MainViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.Subscribe(this); for (int i = 0; i < System.Windows.Forms.Screen.AllScreens.Length; i++) { Displays.Add(i + 1); } MultiDiplay = AppManager.Setting.Wallpaper.DisplayMonitor < 0 && System.Windows.Forms.Screen.AllScreens.Length > 1; }
public MainViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.Subscribe(this); for (int i = 0; i < LiveWallpaperEngineManager.AllScreens.Count; i++) { Displays.Add(i + 1); } MultiDiplay = AppManager.Setting.Wallpaper.DisplayMonitor < 0 && LiveWallpaperEngineManager.AllScreens.Count > 1; }
public void AddDisplay(bool isPrimary = false) { if (!CanAddDisplay) { return; } if (Displays.Count == 0) { isPrimary = true; } Displays.Add(Display.CreateDefault(isPrimary)); NotifyPropertyChanged(nameof(CanAddDisplay)); NotifyPropertyChanged(nameof(CanChangePrimary)); NotifyPropertyChanged(nameof(CanRemoveDisplay)); }
public async Task SeedData() { var displaySizeTypeOne = new Size() { Width = 1920, Height = 1080 }; var displaySizeTypeTwo = new Size() { Width = 1080, Height = 1920 }; //Displays of type one var display = new Display { DisplaySize = displaySizeTypeOne, Prices = new List <DisplayTypePrice>() }; display.Prices.Add(new DisplayTypePrice() { Price = 1, Type = TypePrice.Cheap }); display.Prices.Add(new DisplayTypePrice() { Price = 2, Type = TypePrice.Normal }); var display2 = new Display { DisplaySize = displaySizeTypeOne, Prices = new List <DisplayTypePrice>() }; display2.Prices.Add(new DisplayTypePrice() { Price = 2, Type = TypePrice.Cheap }); display2.Prices.Add(new DisplayTypePrice() { Price = 4, Type = TypePrice.Normal }); var display3 = new Display { DisplaySize = displaySizeTypeOne, Prices = new List <DisplayTypePrice>() }; display3.Prices.Add(new DisplayTypePrice() { Price = 4, Type = TypePrice.Cheap }); display3.Prices.Add(new DisplayTypePrice() { Price = 8, Type = TypePrice.Normal }); //Displays of type two var display4 = new Display { DisplaySize = displaySizeTypeTwo, Prices = new List <DisplayTypePrice>() }; display4.Prices.Add(new DisplayTypePrice() { Price = 8, Type = TypePrice.Cheap }); display4.Prices.Add(new DisplayTypePrice() { Price = 10, Type = TypePrice.Normal }); var display5 = new Display { DisplaySize = displaySizeTypeTwo, Prices = new List <DisplayTypePrice>() }; display5.Prices.Add(new DisplayTypePrice() { Price = 10, Type = TypePrice.Cheap }); display5.Prices.Add(new DisplayTypePrice() { Price = 12, Type = TypePrice.Normal }); Displays.Add(display); Displays.Add(display2); Displays.Add(display3); Displays.Add(display4); Displays.Add(display5); await SaveChangesAsync(); }