Browse Source

r7306@daniel-notebook (orig r3337): daniel | 2008-08-14 07:45:52 +0200

Remove unused IWorkbenchWindow events.


git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0wpf@3339 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
f13ff91c49
  1. 27
      src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs
  2. 33
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs

27
src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs

@ -78,36 +78,9 @@ namespace ICSharpCode.SharpDevelop.Gui
void RedrawContent(); void RedrawContent();
/// <summary>
/// Used internally:
/// This method is called by the workbench to notify the window that is was selected.
/// </summary>
void OnWindowSelected(EventArgs e);
/// <summary>
/// Used internally:
/// This method is called by the workbench to notify the window that is was deselected.
/// </summary>
void OnWindowDeselected(EventArgs e);
/// <summary>
/// Is called when the window is selected.
/// </summary>
event EventHandler WindowSelected;
/// <summary>
/// Is called when the window is deselected.
/// </summary>
event EventHandler WindowDeselected;
/// <summary> /// <summary>
/// Is called when the title of this window has changed. /// Is called when the title of this window has changed.
/// </summary> /// </summary>
event EventHandler TitleChanged; event EventHandler TitleChanged;
/// <summary>
/// Is called after the window closes.
/// </summary>
event EventHandler CloseEvent;
} }
} }

33
src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs

@ -278,6 +278,7 @@ namespace ICSharpCode.SharpDevelop.Gui
if (newTitle != Title) { if (newTitle != Title) {
Title = newTitle; Title = newTitle;
OnTitleChanged(EventArgs.Empty);
} }
} }
} }
@ -339,7 +340,6 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
OnCloseEvent(null);
Dispose(); Dispose();
return true; return true;
} }
@ -366,38 +366,7 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
// protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
// {
// e.Cancel = !CloseWindow(false);
// }
void OnCloseEvent(EventArgs e)
{
OnWindowDeselected(e);
if (CloseEvent != null) {
CloseEvent(this, e);
}
}
public void OnWindowSelected(EventArgs e)
{
if (WindowSelected != null) {
WindowSelected(this, e);
}
}
public void OnWindowDeselected(EventArgs e)
{
if (WindowDeselected != null) {
WindowDeselected(this, e);
}
}
public event EventHandler WindowSelected;
public event EventHandler WindowDeselected;
public event EventHandler TitleChanged; public event EventHandler TitleChanged;
public event EventHandler CloseEvent;
public BitmapSource Icon { get; set; } public BitmapSource Icon { get; set; }
} }

Loading…
Cancel
Save