public void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent summaryComponent, Action runOnUrlClick) { Program.Invoke(this, delegate { LicenseDataGridViewRow lRow = row as LicenseDataGridViewRow; if (lRow == null || lRow.XenObject == null) { return; } summaryPanel.Title = lRow.XenObject.Name; summaryPanel.HelperUrl = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT; summaryPanel.HelperUrlVisible = lRow.HelperUrlRequired && !Controller.ReadOnlyView; summaryPanel.WarningVisible = lRow.WarningRequired; summaryPanel.WarningText = lRow.WarningText; summaryPanel.SummaryText = summaryComponent; switch (lRow.RowStatus) { case LicenseDataGridViewRow.Status.Information: summaryPanel.WarningIcon = Resources._000_Alert2_h32bit_16; break; case LicenseDataGridViewRow.Status.Warning: summaryPanel.WarningIcon = Resources._000_error_h32bit_16; break; default: summaryPanel.WarningIcon = Resources._000_Tick_h32bit_16; break; } summaryPanel.InformationVisible = false; summaryPanel.RunOnUrlClick = runOnUrlClick; }); }
protected override KeyValuePair <bool, string> DisableOtherRowsInContext(CheckableDataGridViewRow checkedRow, CheckableDataGridViewRow otherRow) { if (Helpers.ClearwaterOrGreater(checkedRow.XenObject.Connection)) { return(new KeyValuePair <bool, string>(!Helpers.ClearwaterOrGreater(otherRow.XenObject.Connection), Messages.SELECTION_CANNOT_BE_MIXED_WITH_CLEARWATER)); } return(new KeyValuePair <bool, string>(Helpers.ClearwaterOrGreater(otherRow.XenObject.Connection), Messages.SELECTION_CANNOT_BE_MIXED_WITH_CLEARWATER)); }
private SummaryTextComponent BuildSummaryComponent(CheckableDataGridViewRow row) { LicenseManagerSummaryComponent component = new LicenseManagerSummaryComponent(); LicenseManagerSummaryDecorator licenseTypeDecorator = new LicenseManagerSummaryLicenseTypeDecorator(component, row); LicenseManagerSummaryDecorator licenseSocketsDecorator = new LicenseManagerSummaryLicenseSocketsDecorator(licenseTypeDecorator, row); LicenseManagerSummaryDecorator licenseExpiresDecorator = new LicenseManagerSummaryLicenseExpiresDecorator(licenseSocketsDecorator, row); LicenseManagerSummaryDecorator licenseServerDecorator = new LicenseManagerSummaryLicenseServerDecorator(licenseExpiresDecorator, row); return(licenseServerDecorator); }
private void SummariseDisconnectedRows(List <CheckableDataGridViewRow> rowsChecked) { //Refresh current row's details if the pool/host is no longer connected CheckableDataGridViewRow row = rowsChecked.Find(r => r.Highlighted && !r.XenObject.Connection.IsConnected); if (row != null) { SummariseSelectedRow(row); } }
public void SummariseSelectedRow(CheckableDataGridViewRow dataToSummarise) { if (!dataToSummarise.XenObject.Connection.IsConnected) { View.DrawSummaryForHighlightedRow(dataToSummarise, new LicenseManagerSummaryComponent(), LaunchUrl(InvisibleMessages.UPSELL_SA)); SetSummaryInformation(Messages.POOL_OR_HOST_IS_NOT_CONNECTED); return; } SummaryTextComponent component = BuildSummaryComponent(dataToSummarise); View.DrawSummaryForHighlightedRow(dataToSummarise, component, LaunchUrl(InvisibleMessages.UPSELL_SA)); if (dataToSummarise.Disabled) { SetSummaryInformation(dataToSummarise.DisabledReason); } }
public void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent summaryComponent, Action runOnUrlClick) { Program.Invoke(this, delegate { LicenseDataGridViewRow lRow = row as LicenseDataGridViewRow; if (lRow == null) { return; } summaryPanel.Title = lRow.XenObject.Name; summaryPanel.HelperUrl = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT; summaryPanel.HelperUrlVisible = true; summaryPanel.WarningVisible = lRow.WarningRequired; summaryPanel.WarningText = lRow.WarningText; summaryPanel.SummaryText = summaryComponent; summaryPanel.WarningIcon = lRow.RowStatus == LicenseDataGridViewRow.Status.Warning ? SystemIcons.Error.ToBitmap() : Resources._000_WarningAlert_h32bit_32; summaryPanel.InformationVisible = false; summaryPanel.RunOnUrlClick = runOnUrlClick; }); }
protected override KeyValuePair <bool, string> DisableOtherRowsInContext(CheckableDataGridViewRow checkedRow, CheckableDataGridViewRow otherRow) { return(new KeyValuePair <bool, string>( LicenseStatus.GetLicensingModel(checkedRow.XenObject.Connection) != LicenseStatus.GetLicensingModel(otherRow.XenObject.Connection), Messages.SELECTION_CANNOT_BE_MIXED_FOR_LICENSING)); }
public LicenseManagerSummaryLicenseTypeDecorator(SummaryTextComponent component, CheckableDataGridViewRow row) : base(component, row) { }
public LicenseManagerSummaryDecorator(SummaryTextComponent component, CheckableDataGridViewRow row) : base(component) { Row = row as LicenseDataGridViewRow; Debug.Assert(Row != null && row != null, "Failure to cast CheckableDataGridViewRow to LicenseDataGridViewRow"); }
public void DrawHighlightedRow(CheckableDataGridViewRow row) { checkableDataGridView.HighlightRow(row); }