public bool ValidateUiData(RoyalBase data) { bool retVal = true; if (!data.IsDefaultSetting) { bool isDisplayNameRequired = !IsInBulkAddMode; bool displayNameOk = !string.IsNullOrEmpty(textFieldDisplayName.StringValue); bool computerNameOk = !string.IsNullOrEmpty(textFieldComputerName.StringValue); if (isDisplayNameRequired && !displayNameOk) { RmMessageBox.Show(RmMessageBoxType.WarningMessage, this.View.Window, "Warning".TL(), Language.Get("The \"Display Name\" must not be empty."), "OK".TL()); } if (!computerNameOk) { RmMessageBox.Show(RmMessageBoxType.WarningMessage, this.View.Window, "Warning".TL(), Language.Get("The \"Computer Name\" must not be empty."), "OK".TL()); } retVal = (!isDisplayNameRequired || (isDisplayNameRequired && displayNameOk)) && computerNameOk; } return(retVal); }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) { return(true); } if (!ValidateUiData(data)) { return(false); } RoyalRDSConnection obj = (RoyalRDSConnection)data; if (!obj.IsDefaultSetting) { obj.URI = textFieldComputerName.StringValue; obj.Name = textFieldDisplayName.StringValue; } obj.Description = textFieldConnectionDescription.StringValue; obj.PhysicalAddress = textFieldPhysicalAddress.StringValue; return(true); }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; textFieldDisplayName.StringValue = obj.Name; if (!obj.IsDefaultSetting) { textFieldComputerName.StringValue = obj.URI; } else { textFieldComputerName.IsEnabled = false; textFieldDisplayName.IsEnabled = false; } buttonComputerNameEditor.IsEnabled = (!obj.IsDefaultSetting && EditMode == ObjectEditMode.EditMode_New); textFieldConnectionDescription.StringValue = obj.Description; textFieldPhysicalAddress.StringValue = obj.PhysicalAddress; metadataView.RoyalObject = obj; this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; checkBoxDesktopBackground.State = obj.AllowWallpaper.ToNSCellStateValue(); checkBoxMenuAndWindowAnimations.State = obj.AllowMenuAnimations.ToNSCellStateValue(); checkBoxShowWindowContentsWhileDragging.State = obj.AllowFullWindowDrag.ToNSCellStateValue(); checkBoxFontSmoothing.State = obj.AllowFontSmoothing.ToNSCellStateValue(); checkBoxVisualStyles.State = obj.AllowThemes.ToNSCellStateValue(); this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; checkBoxDesktopBackground.State = obj.AllowWallpaper.ToNSCellStateValue(); checkBoxMenuAndWindowAnimations.State = obj.AllowMenuAnimations.ToNSCellStateValue(); checkBoxShowWindowContentsWhileDragging.State = obj.AllowFullWindowDrag.ToNSCellStateValue(); checkBoxFontSmoothing.State = obj.AllowFontSmoothing.ToNSCellStateValue(); checkBoxVisualStyles.State = obj.AllowThemes.ToNSCellStateValue(); this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; checkBoxCustomPort.State = (obj.RDPPort == 3389 ? NSCellStateValue.NSOffState : NSCellStateValue.NSOnState); CheckBoxCustomPort_Action(checkBoxCustomPort); textFieldCustomPort.IntValue = obj.RDPPort; checkBoxConsoleSession.State = obj.ConnectToAdministerOrConsole.ToNSCellStateValue(); this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; checkBoxCustomPort.State = (obj.RDPPort == 3389 ? NSCellStateValue.NSOffState : NSCellStateValue.NSOnState); CheckBoxCustomPort_Action(checkBoxCustomPort); textFieldCustomPort.IntValue = obj.RDPPort; checkBoxConsoleSession.State = obj.ConnectToAdministerOrConsole.ToNSCellStateValue(); this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; if (obj.AudioRedirectionMode == 2) this.popupButtonAudio.SelectItemAtIndex(1); else // Bring to this computer falls back to leave at remote computer this.popupButtonAudio.SelectItemAtIndex(0); this.checkBoxPrinters.State = obj.RedirectPrinters.ToNSCellStateValue(); this.checkBoxDiskDrives.State = obj.RedirectDrives.ToNSCellStateValue(); this.IsInitialized = true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; switch (obj.ColorDepth) { case 8: popupButtonColors.SelectItemAtIndex(0); break; case 16: popupButtonColors.SelectItemAtIndex(1); break; case 24: popupButtonColors.SelectItemAtIndex(2); break; default: popupButtonColors.SelectItemAtIndex(2); break; } if (obj.DesktopWidth == 0 && obj.DesktopHeight == 0) { this.popupButtonDesktopSize.SelectItemAtIndex(0); } else { this.popupButtonDesktopSize.SelectItemAtIndex(1); this.textFieldCustomSizeWidth.IntValue = obj.DesktopWidth; this.textFieldCustomSizeHeight.IntValue = obj.DesktopHeight; } PopupButtonDesktopSize_Action(this); if (obj.SmartReconnect) { this.popupButtonResizeMode.SelectItemAtIndex(1); } else // Smart Size falls back to Scroll Bars { this.popupButtonResizeMode.SelectItemAtIndex(0); } PopupButtonResizeMode_Action(this); this.IsInitialized = true; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) return true; if (!ValidateUiData(data)) return false; RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.RDPPort = textFieldCustomPort.IntValue; obj.ConnectToAdministerOrConsole = checkBoxConsoleSession.State.ToBool(); return true; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) { return(true); } if (!ValidateUiData(data)) { return(false); } RoyalRDSConnection obj = (RoyalRDSConnection)data; switch ((int)this.popupButtonColors.IndexOfSelectedItem) { case 0: obj.ColorDepth = 8; break; case 1: obj.ColorDepth = 16; break; case 2: obj.ColorDepth = 24; break; } if (this.popupButtonDesktopSize.IndexOfSelectedItem == 0) { obj.DesktopWidth = 0; obj.DesktopHeight = 0; } else if (this.popupButtonDesktopSize.IndexOfSelectedItem == 1) { obj.DesktopWidth = this.textFieldCustomSizeWidth.IntValue; obj.DesktopHeight = this.textFieldCustomSizeHeight.IntValue; } obj.SmartSizing = false; obj.SmartReconnect = popupButtonResizeMode.IndexOfSelectedItem == 1; return(true); }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) return true; if (!ValidateUiData(data)) return false; RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.AllowWallpaper = checkBoxDesktopBackground.State.ToBool(); obj.AllowMenuAnimations = checkBoxMenuAndWindowAnimations.State.ToBool(); obj.AllowFullWindowDrag = checkBoxShowWindowContentsWhileDragging.State.ToBool(); obj.AllowFontSmoothing = checkBoxFontSmoothing.State.ToBool(); obj.AllowThemes = checkBoxVisualStyles.State.ToBool(); return true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; if (obj.AudioRedirectionMode == 2) { this.popupButtonAudio.SelectItemAtIndex(1); } else // Bring to this computer falls back to leave at remote computer { this.popupButtonAudio.SelectItemAtIndex(0); } this.checkBoxPrinters.State = obj.RedirectPrinters.ToNSCellStateValue(); this.checkBoxDiskDrives.State = obj.RedirectDrives.ToNSCellStateValue(); this.IsInitialized = true; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) { return(true); } if (!ValidateUiData(data)) { return(false); } RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.RDPPort = textFieldCustomPort.IntValue; obj.ConnectToAdministerOrConsole = checkBoxConsoleSession.State.ToBool(); return(true); }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) { return(true); } if (!ValidateUiData(data)) { return(false); } RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.AudioRedirectionMode = this.popupButtonAudio.IndexOfSelectedItem == 0 ? 1 : 2; obj.RedirectPrinters = this.checkBoxPrinters.State.ToBool(); obj.RedirectDrives = this.checkBoxDiskDrives.State.ToBool(); return(true); }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) { return(true); } if (!ValidateUiData(data)) { return(false); } RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.AllowWallpaper = checkBoxDesktopBackground.State.ToBool(); obj.AllowMenuAnimations = checkBoxMenuAndWindowAnimations.State.ToBool(); obj.AllowFullWindowDrag = checkBoxShowWindowContentsWhileDragging.State.ToBool(); obj.AllowFontSmoothing = checkBoxFontSmoothing.State.ToBool(); obj.AllowThemes = checkBoxVisualStyles.State.ToBool(); return(true); }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; switch (obj.ColorDepth) { case 8: popupButtonColors.SelectItemAtIndex(0); break; case 16: popupButtonColors.SelectItemAtIndex(1); break; case 24: popupButtonColors.SelectItemAtIndex(2); break; default: popupButtonColors.SelectItemAtIndex(2); break; } if (obj.DesktopWidth == 0 && obj.DesktopHeight == 0) this.popupButtonDesktopSize.SelectItemAtIndex(0); else { this.popupButtonDesktopSize.SelectItemAtIndex(1); this.textFieldCustomSizeWidth.IntValue = obj.DesktopWidth; this.textFieldCustomSizeHeight.IntValue = obj.DesktopHeight; } PopupButtonDesktopSize_Action(this); if (obj.SmartReconnect) this.popupButtonResizeMode.SelectItemAtIndex(1); else // Smart Size falls back to Scroll Bars this.popupButtonResizeMode.SelectItemAtIndex(0); PopupButtonResizeMode_Action(this); this.IsInitialized = true; }
public bool ValidateUiData(RoyalBase data) { return(true); }
public bool ValidateUiData(RoyalBase data) { return true; }
public void FuelUiWithData(RoyalBase data) { RoyalRDSConnection obj = (RoyalRDSConnection)data; textFieldDisplayName.StringValue = obj.Name; if (!obj.IsDefaultSetting) { textFieldComputerName.StringValue = obj.URI; } else { textFieldComputerName.IsEnabled = false; textFieldDisplayName.IsEnabled = false; } buttonComputerNameEditor.IsEnabled = (!obj.IsDefaultSetting && EditMode == ObjectEditMode.EditMode_New); textFieldConnectionDescription.StringValue = obj.Description; textFieldPhysicalAddress.StringValue = obj.PhysicalAddress; metadataView.RoyalObject = obj; this.IsInitialized = true; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) return true; if (!ValidateUiData(data)) return false; RoyalRDSConnection obj = (RoyalRDSConnection)data; switch ((int)this.popupButtonColors.IndexOfSelectedItem) { case 0: obj.ColorDepth = 8; break; case 1: obj.ColorDepth = 16; break; case 2: obj.ColorDepth = 24; break; } if (this.popupButtonDesktopSize.IndexOfSelectedItem == 0) { obj.DesktopWidth = 0; obj.DesktopHeight = 0; } else if (this.popupButtonDesktopSize.IndexOfSelectedItem == 1) { obj.DesktopWidth = this.textFieldCustomSizeWidth.IntValue; obj.DesktopHeight = this.textFieldCustomSizeHeight.IntValue; } obj.SmartSizing = false; obj.SmartReconnect = popupButtonResizeMode.IndexOfSelectedItem == 1; return true; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) return true; if (!ValidateUiData(data)) return false; RoyalRDSConnection obj = (RoyalRDSConnection)data; obj.AudioRedirectionMode = this.popupButtonAudio.IndexOfSelectedItem == 0 ? 1 : 2; obj.RedirectPrinters = this.checkBoxPrinters.State.ToBool(); obj.RedirectDrives = this.checkBoxDiskDrives.State.ToBool(); return true; }
public bool ValidateUiData(RoyalBase data) { bool retVal = true; if (!data.IsDefaultSetting) { bool isDisplayNameRequired = !IsInBulkAddMode; bool displayNameOk = !string.IsNullOrEmpty(textFieldDisplayName.StringValue); bool computerNameOk = !string.IsNullOrEmpty(textFieldComputerName.StringValue); if (isDisplayNameRequired && !displayNameOk) RmMessageBox.Show(RmMessageBoxType.WarningMessage, this.View.Window, "Warning".TL(), Language.Get("The \"Display Name\" must not be empty."), "OK".TL()); if (!computerNameOk) RmMessageBox.Show(RmMessageBoxType.WarningMessage, this.View.Window, "Warning".TL(), Language.Get("The \"Computer Name\" must not be empty."), "OK".TL()); retVal = (!isDisplayNameRequired || (isDisplayNameRequired && displayNameOk)) && computerNameOk; } return retVal; }
public bool FuelDataWithData(RoyalBase data) { if (!this.IsInitialized) return true; if (!ValidateUiData(data)) return false; RoyalRDSConnection obj = (RoyalRDSConnection)data; if (!obj.IsDefaultSetting) { obj.URI = textFieldComputerName.StringValue; obj.Name = textFieldDisplayName.StringValue; } obj.Description = textFieldConnectionDescription.StringValue; obj.PhysicalAddress = textFieldPhysicalAddress.StringValue; return true; }