protected void FireElementDoubleClick(Ares.Data.IContainerElement element) { if (ElementDoubleClick != null) { ElementDoubleClick(this, new ElementDoubleClickEventArgs(element)); } }
protected void SetElementAttributes(DataGridView grid, Ares.Data.IContainerElement element, int row) { grid.Rows[row].Tag = row; if (element.InnerElement is Ares.Data.IFileElement) { String path = (element.InnerElement as Ares.Data.IFileElement).FilePath; grid.Rows[row].Cells[0].ToolTipText = path; } IList <Ares.ModelInfo.ModelError> errors = Ares.ModelInfo.ModelChecks.Instance.GetErrorsForElement(element.InnerElement); if (errors.Count > 0) { bool onlyWarnings = true; String errorTexts = String.Empty; foreach (Ares.ModelInfo.ModelError error in errors) { if (errorTexts.Length > 0) { errorTexts += "\n"; } errorTexts += error.Message; if (error.Severity == ModelInfo.ModelError.ErrorSeverity.Error) { onlyWarnings = false; } } { grid.Rows[row].Cells[0].Style.ForeColor = onlyWarnings ? Color.Orange : Color.DarkRed; grid.Rows[row].Cells[0].ErrorText = errorTexts; } } else { grid.Rows[row].Cells[0].Style.ForeColor = Color.Black; grid.Rows[row].Cells[0].ErrorText = String.Empty; } }
public ElementDoubleClickEventArgs(Ares.Data.IContainerElement element) { Element = element; }