Exemple #1
0
 protected void FireElementDoubleClick(Ares.Data.IContainerElement element)
 {
     if (ElementDoubleClick != null)
     {
         ElementDoubleClick(this, new ElementDoubleClickEventArgs(element));
     }
 }
Exemple #2
0
        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;
            }
        }
Exemple #3
0
 public ElementDoubleClickEventArgs(Ares.Data.IContainerElement element)
 {
     Element = element;
 }