Browse Source

Errorlist labels are now updated.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@276 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Mike Krüger 21 years ago
parent
commit
635349f5ca
  1. 1
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs
  2. 2
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs
  3. 31
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs
  4. 25
      src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs
  5. 1
      src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

1
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs

@ -145,7 +145,6 @@ namespace ICSharpCode.FormDesigner
serviceContainer.AddService(typeof(MemberRelationshipService), new DefaultMemberRelationshipService()); serviceContainer.AddService(typeof(MemberRelationshipService), new DefaultMemberRelationshipService());
ICSharpCode.FormDesigner.Services.EventBindingService eventBindingService = new ICSharpCode.FormDesigner.Services.EventBindingService(); ICSharpCode.FormDesigner.Services.EventBindingService eventBindingService = new ICSharpCode.FormDesigner.Services.EventBindingService();
serviceContainer.AddService(typeof(System.ComponentModel.Design.IEventBindingService), eventBindingService); serviceContainer.AddService(typeof(System.ComponentModel.Design.IEventBindingService), eventBindingService);

2
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs

@ -99,7 +99,7 @@ namespace ICSharpCode.FormDesigner.Services
public object GetService(System.Type serviceType) public object GetService(System.Type serviceType)
{ {
// if (IsServiceMissing(serviceType)) { // if (IsServiceMissing(serviceType)) {
//// Console.WriteLine("request missing service : {0} from Assembly {1} is not aviable.", serviceType, serviceType.Assembly.FullName); // Console.WriteLine("request missing service : {0} from Assembly {1} is not aviable.", serviceType, serviceType.Assembly.FullName);
//// Console.ReadLine(); //// Console.ReadLine();
// } else { // } else {
// Console.WriteLine("get service : {0} from Assembly {1}.", serviceType, serviceType.Assembly.FullName); // Console.WriteLine("get service : {0} from Assembly {1}.", serviceType, serviceType.Assembly.FullName);

31
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs

@ -6,6 +6,7 @@
// </file> // </file>
using System; using System;
using System.ComponentModel;
using System.Collections; using System.Collections;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.Drawing.Design; using System.Drawing.Design;
@ -249,6 +250,7 @@ namespace ICSharpCode.FormDesigner.Services
public ToolboxItem DeserializeToolboxItem(object serializedObject) public ToolboxItem DeserializeToolboxItem(object serializedObject)
{ {
// Console.WriteLine("DeserializeToolboxItem {0}", serializedObject);
if (serializedObject is System.Windows.Forms.IDataObject) { if (serializedObject is System.Windows.Forms.IDataObject) {
if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) {
return (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem)); return (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem));
@ -259,31 +261,38 @@ namespace ICSharpCode.FormDesigner.Services
public ToolboxItem DeserializeToolboxItem(object serializedObject, IDesignerHost host) public ToolboxItem DeserializeToolboxItem(object serializedObject, IDesignerHost host)
{ {
Console.WriteLine("DeserializeToolboxItem {0} host {1}", serializedObject, host);
if (serializedObject is System.Windows.Forms.IDataObject) { if (serializedObject is System.Windows.Forms.IDataObject) {
if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) {
ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem)); ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem));
if (host != null) { if (host != null) {
ArrayList list = (ArrayList)toolboxByHost[host]; ArrayList list = (ArrayList)toolboxByHost[host];
if (list != null && list.Contains(item)) { if (list != null && list.Contains(item)) {
Console.WriteLine("Item1>" + item);
return item; return item;
} }
list = (ArrayList)toolboxByHost[ALL_HOSTS]; list = (ArrayList)toolboxByHost[ALL_HOSTS];
if (list != null && list.Contains(item)) { if (list != null && list.Contains(item)) {
Console.WriteLine("Item2>" + item + " type " + item.GetType());
return item; return item;
} }
} }
} }
} }
Console.WriteLine("return null");
return null; return null;
} }
public ToolboxItem GetSelectedToolboxItem() public ToolboxItem GetSelectedToolboxItem()
{ {
// Console.WriteLine("GetSelectedToolboxItem");
return selectedItem; return selectedItem;
} }
public ToolboxItem GetSelectedToolboxItem(IDesignerHost host) public ToolboxItem GetSelectedToolboxItem(IDesignerHost host)
{ {
// Console.WriteLine("GetSelectedToolboxItem host {0}", host);
IList list = (IList)toolboxByHost[host]; IList list = (IList)toolboxByHost[host];
if (list != null && list.Contains(selectedItem)) { if (list != null && list.Contains(selectedItem)) {
return selectedItem; return selectedItem;
@ -298,6 +307,7 @@ namespace ICSharpCode.FormDesigner.Services
public ToolboxItemCollection GetToolboxItems() public ToolboxItemCollection GetToolboxItems()
{ {
// Console.WriteLine("GetToolboxItems");
ToolboxItem[] items = new ToolboxItem[toolboxItems.Count]; ToolboxItem[] items = new ToolboxItem[toolboxItems.Count];
toolboxItems.CopyTo(items); toolboxItems.CopyTo(items);
return new ToolboxItemCollection(items); return new ToolboxItemCollection(items);
@ -305,6 +315,7 @@ namespace ICSharpCode.FormDesigner.Services
public ToolboxItemCollection GetToolboxItems(string category) public ToolboxItemCollection GetToolboxItems(string category)
{ {
// Console.WriteLine("GetToolboxItems category {0}", category);
if (category == null) { if (category == null) {
category = ALL_CATEGORIES; category = ALL_CATEGORIES;
} }
@ -318,6 +329,7 @@ namespace ICSharpCode.FormDesigner.Services
public ToolboxItemCollection GetToolboxItems(string category, IDesignerHost host) public ToolboxItemCollection GetToolboxItems(string category, IDesignerHost host)
{ {
// Console.WriteLine("GetToolboxItems category {0} host {1}", category, host);
if (category == null) { if (category == null) {
category = ALL_CATEGORIES; category = ALL_CATEGORIES;
} }
@ -362,16 +374,19 @@ namespace ICSharpCode.FormDesigner.Services
public bool IsSupported(object serializedObject, ICollection filterAttributes) public bool IsSupported(object serializedObject, ICollection filterAttributes)
{ {
return false; // Console.WriteLine("IsSupported serializedObiect {0} filterAttributes {1}", serializedObject, filterAttributes);
return true;
} }
public bool IsSupported(object serializedObject, IDesignerHost host) public bool IsSupported(object serializedObject, IDesignerHost host)
{ {
return false; // Console.WriteLine("IsSupported serializedObiect {0} host {1}", serializedObject, host);
return true;
} }
public bool IsToolboxItem(object serializedObject) public bool IsToolboxItem(object serializedObject)
{ {
// Console.WriteLine("IsToolboxItem serializedObiect {0}", serializedObject);
if (serializedObject is System.Windows.Forms.IDataObject) { if (serializedObject is System.Windows.Forms.IDataObject) {
if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) {
return true; return true;
@ -382,17 +397,20 @@ namespace ICSharpCode.FormDesigner.Services
public bool IsToolboxItem(object serializedObject, IDesignerHost host) public bool IsToolboxItem(object serializedObject, IDesignerHost host)
{ {
// Console.WriteLine("IsToolboxItem serializedObiect {0} host {1}", serializedObject, host);
// needed for Toolbox drag & drop // needed for Toolbox drag & drop
if (serializedObject is System.Windows.Forms.IDataObject) { if (serializedObject is System.Windows.Forms.IDataObject) {
if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) {
ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem)); ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem));
if (host != null) { if (host != null) {
ArrayList list = (ArrayList)toolboxByHost[host]; ArrayList list = (ArrayList)toolboxByHost[host];
if (list != null && list.Contains(item)) if (list != null && list.Contains(item)) {
return true; return true;
}
list = (ArrayList)toolboxByHost[ALL_HOSTS]; list = (ArrayList)toolboxByHost[ALL_HOSTS];
if (list != null && list.Contains(item)) if (list != null && list.Contains(item)) {
return true; return true;
}
} }
} }
} }
@ -432,11 +450,13 @@ namespace ICSharpCode.FormDesigner.Services
public void SelectedToolboxItemUsed() public void SelectedToolboxItemUsed()
{ {
// Console.WriteLine("SelectedToolboxItemUsed");
FireSelectedItemUsed(); FireSelectedItemUsed();
} }
public object SerializeToolboxItem(ToolboxItem toolboxItem) public object SerializeToolboxItem(ToolboxItem toolboxItem)
{ {
// Console.WriteLine("SerializeToolboxItem");
return null; return null;
} }
@ -453,6 +473,7 @@ namespace ICSharpCode.FormDesigner.Services
public void SetSelectedToolboxItem(ToolboxItem toolboxItem) public void SetSelectedToolboxItem(ToolboxItem toolboxItem)
{ {
// Console.WriteLine("SetSelectedToolboxItem toolboxItem {0}", toolboxItem);
if (toolboxItem != selectedItem) { if (toolboxItem != selectedItem) {
FireSelectedItemChanging(); FireSelectedItemChanging();
selectedItem = toolboxItem; selectedItem = toolboxItem;

25
src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs

@ -145,12 +145,14 @@ namespace ICSharpCode.SharpDevelop.Gui
void OnCombineOpen(object sender, SolutionEventArgs e) void OnCombineOpen(object sender, SolutionEventArgs e)
{ {
listView.Items.Clear(); listView.Items.Clear();
UpdateToolstripStatus();
} }
void OnCombineClosed(object sender, EventArgs e) void OnCombineClosed(object sender, EventArgs e)
{ {
try { try {
listView.Items.Clear(); listView.Items.Clear();
UpdateToolstripStatus();
} catch (Exception ex) { } catch (Exception ex) {
Console.WriteLine(ex); Console.WriteLine(ex);
} }
@ -161,6 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui
if (TaskService.TaskCount > 0) { if (TaskService.TaskCount > 0) {
WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad(this.GetType().FullName); WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad(this.GetType().FullName);
} }
UpdateToolstripStatus();
} }
void ListViewItemActivate(object sender, EventArgs e) void ListViewItemActivate(object sender, EventArgs e)
@ -265,11 +268,14 @@ namespace ICSharpCode.SharpDevelop.Gui
void TaskServiceCleared(object sender, EventArgs e) void TaskServiceCleared(object sender, EventArgs e)
{ {
listView.Items.Clear(); listView.Items.Clear();
UpdateToolstripStatus();
} }
void TaskServiceAdded(object sender, TaskEventArgs e) void TaskServiceAdded(object sender, TaskEventArgs e)
{ {
AddTask(e.Task); AddTask(e.Task);
UpdateToolstripStatus();
} }
void TaskServiceRemoved(object sender, TaskEventArgs e) void TaskServiceRemoved(object sender, TaskEventArgs e)
@ -281,6 +287,7 @@ namespace ICSharpCode.SharpDevelop.Gui
break; break;
} }
} }
UpdateToolstripStatus();
} }
/// <summary> /// <summary>
@ -296,18 +303,22 @@ namespace ICSharpCode.SharpDevelop.Gui
return FormattedDescription.Replace("\n", " "); return FormattedDescription.Replace("\n", " ");
} }
void InternalShowResults() void UpdateToolstripStatus()
{ {
// listView.CreateControl is called in the constructor now. Console.WriteLine("Updpate " + TaskService.TaskCount);
if (!listView.IsHandleCreated) {
return;
}
foreach (ToolStripItem item in toolStrip.Items) { foreach (ToolStripItem item in toolStrip.Items) {
if (item is IStatusUpdate) { if (item is IStatusUpdate) {
((IStatusUpdate)item).UpdateStatus(); ((IStatusUpdate)item).UpdateStatus();
} }
} }
}
void InternalShowResults()
{
// listView.CreateControl is called in the constructor now.
if (!listView.IsHandleCreated) {
return;
}
listView.BeginUpdate(); listView.BeginUpdate();
listView.Items.Clear(); listView.Items.Clear();
@ -317,6 +328,8 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
listView.EndUpdate(); listView.EndUpdate();
UpdateToolstripStatus();
} }
} }
} }

1
src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

@ -103,6 +103,7 @@ namespace ICSharpCode.SharpDevelop
void continueButtonClick(object sender, System.EventArgs e) void continueButtonClick(object sender, System.EventArgs e)
{ {
DialogResult = System.Windows.Forms.DialogResult.Ignore; DialogResult = System.Windows.Forms.DialogResult.Ignore;
CopyInfoToClipboard();
Close(); Close();
} }

Loading…
Cancel
Save