Merge pull request #204 from GaborApatiNagy/CA-145350

CA-145350: Hard to clear error notification
This commit is contained in:
Mihaela Stoica 2014-09-12 11:36:09 +01:00
commit eb47ea7018
4 changed files with 0 additions and 34 deletions

View File

@ -434,16 +434,6 @@ namespace XenAdmin
{
if (meddlingAction == null)
SetStatusBar(Properties.Resources._000_error_h32bit_16, action.Exception.Message);
IXenObject model =
(IXenObject)action.VM ??
(IXenObject)action.Host ??
(IXenObject)action.Pool ??
(IXenObject)action.SR;
if (model != null)
model.InError = true;
RequestRefreshTreeView();
}
else if (meddlingAction == null)
{
@ -2692,12 +2682,7 @@ namespace XenAdmin
if (eventsPage.Visible)
{
// Unmark node if user has now seen error in log tab
if (SelectionManager.Selection.FirstAsXenObject != null)
SelectionManager.Selection.FirstAsXenObject.InError = false;
eventsPage.RefreshDisplayedEvents();
RequestRefreshTreeView();
}
loggedInLabel1.Connection = null;

View File

@ -501,7 +501,6 @@ namespace XenAdmin
_index++;
IXenObject xenObject = obj as IXenObject;
bool error = xenObject != null && xenObject.InError;
bool highlighted = _highlightedDragTarget != null && obj != null && _highlightedDragTarget.Equals(obj);
if (highlighted)
@ -510,12 +509,6 @@ namespace XenAdmin
result.ForeColor = SystemColors.HighlightText;
result.NodeFont = Program.DefaultFont;
}
else if (error)
{
result.BackColor = Program.ErrorBackColor;
result.ForeColor = Program.ErrorForeColor;
result.NodeFont = Program.DefaultFont;
}
else if (grayed)
{
result.BackColor = _treeViewBackColor;

View File

@ -44,9 +44,6 @@ namespace XenAPI
string Name { get; }
bool InError { get; set; }
IXenConnection Connection { get; set; }
bool Locked { get; set; }

View File

@ -100,7 +100,6 @@ namespace XenAPI
IXenObject result = (IXenObject)MemberwiseClone();
result.ClearEventListeners();
result.Locked = false;
result.InError = false;
return result;
}
@ -264,17 +263,9 @@ namespace XenAPI
return s != null && int.TryParse(s, out result) ? result : def;
}
private bool in_error;
public virtual string Name
{
get { return ""; }
}
public bool InError
{
get { return in_error; }
set { in_error = value; }
}
}
}