diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs index 12c0f2500b..2928f9392a 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs @@ -145,7 +145,6 @@ namespace ICSharpCode.FormDesigner serviceContainer.AddService(typeof(MemberRelationshipService), new DefaultMemberRelationshipService()); - ICSharpCode.FormDesigner.Services.EventBindingService eventBindingService = new ICSharpCode.FormDesigner.Services.EventBindingService(); serviceContainer.AddService(typeof(System.ComponentModel.Design.IEventBindingService), eventBindingService); diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs index 51b7777bb6..6f32b2096d 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs @@ -99,7 +99,7 @@ namespace ICSharpCode.FormDesigner.Services public object GetService(System.Type 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(); // } else { // Console.WriteLine("get service : {0} from Assembly {1}.", serviceType, serviceType.Assembly.FullName); diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs index ff9db19c01..81a472bad1 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/ToolboxService.cs @@ -6,6 +6,7 @@ // using System; +using System.ComponentModel; using System.Collections; using System.Collections.Specialized; using System.Drawing.Design; @@ -249,6 +250,7 @@ namespace ICSharpCode.FormDesigner.Services public ToolboxItem DeserializeToolboxItem(object serializedObject) { +// Console.WriteLine("DeserializeToolboxItem {0}", serializedObject); if (serializedObject is System.Windows.Forms.IDataObject) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(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) { + Console.WriteLine("DeserializeToolboxItem {0} host {1}", serializedObject, host); if (serializedObject is System.Windows.Forms.IDataObject) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem)); + if (host != null) { ArrayList list = (ArrayList)toolboxByHost[host]; if (list != null && list.Contains(item)) { + Console.WriteLine("Item1>" + item); return item; } list = (ArrayList)toolboxByHost[ALL_HOSTS]; if (list != null && list.Contains(item)) { + Console.WriteLine("Item2>" + item + " type " + item.GetType()); return item; } } } } + Console.WriteLine("return null"); return null; } public ToolboxItem GetSelectedToolboxItem() { +// Console.WriteLine("GetSelectedToolboxItem"); return selectedItem; } public ToolboxItem GetSelectedToolboxItem(IDesignerHost host) { +// Console.WriteLine("GetSelectedToolboxItem host {0}", host); IList list = (IList)toolboxByHost[host]; if (list != null && list.Contains(selectedItem)) { return selectedItem; @@ -298,6 +307,7 @@ namespace ICSharpCode.FormDesigner.Services public ToolboxItemCollection GetToolboxItems() { +// Console.WriteLine("GetToolboxItems"); ToolboxItem[] items = new ToolboxItem[toolboxItems.Count]; toolboxItems.CopyTo(items); return new ToolboxItemCollection(items); @@ -305,6 +315,7 @@ namespace ICSharpCode.FormDesigner.Services public ToolboxItemCollection GetToolboxItems(string category) { +// Console.WriteLine("GetToolboxItems category {0}", category); if (category == null) { category = ALL_CATEGORIES; } @@ -318,6 +329,7 @@ namespace ICSharpCode.FormDesigner.Services public ToolboxItemCollection GetToolboxItems(string category, IDesignerHost host) { +// Console.WriteLine("GetToolboxItems category {0} host {1}", category, host); if (category == null) { category = ALL_CATEGORIES; } @@ -362,16 +374,19 @@ namespace ICSharpCode.FormDesigner.Services 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) { - return false; +// Console.WriteLine("IsSupported serializedObiect {0} host {1}", serializedObject, host); + return true; } public bool IsToolboxItem(object serializedObject) { +// Console.WriteLine("IsToolboxItem serializedObiect {0}", serializedObject); if (serializedObject is System.Windows.Forms.IDataObject) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { return true; @@ -382,17 +397,20 @@ namespace ICSharpCode.FormDesigner.Services public bool IsToolboxItem(object serializedObject, IDesignerHost host) { +// Console.WriteLine("IsToolboxItem serializedObiect {0} host {1}", serializedObject, host); // needed for Toolbox drag & drop if (serializedObject is System.Windows.Forms.IDataObject) { if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) { ToolboxItem item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem)); if (host != null) { ArrayList list = (ArrayList)toolboxByHost[host]; - if (list != null && list.Contains(item)) - return true; + if (list != null && list.Contains(item)) { + return true; + } list = (ArrayList)toolboxByHost[ALL_HOSTS]; - if (list != null && list.Contains(item)) + if (list != null && list.Contains(item)) { return true; + } } } } @@ -432,11 +450,13 @@ namespace ICSharpCode.FormDesigner.Services public void SelectedToolboxItemUsed() { +// Console.WriteLine("SelectedToolboxItemUsed"); FireSelectedItemUsed(); } public object SerializeToolboxItem(ToolboxItem toolboxItem) { +// Console.WriteLine("SerializeToolboxItem"); return null; } @@ -453,6 +473,7 @@ namespace ICSharpCode.FormDesigner.Services public void SetSelectedToolboxItem(ToolboxItem toolboxItem) { +// Console.WriteLine("SetSelectedToolboxItem toolboxItem {0}", toolboxItem); if (toolboxItem != selectedItem) { FireSelectedItemChanging(); selectedItem = toolboxItem; diff --git a/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs b/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs index 4a3ff717bf..9dd91c01a7 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs @@ -145,12 +145,14 @@ namespace ICSharpCode.SharpDevelop.Gui void OnCombineOpen(object sender, SolutionEventArgs e) { listView.Items.Clear(); + UpdateToolstripStatus(); } void OnCombineClosed(object sender, EventArgs e) { try { listView.Items.Clear(); + UpdateToolstripStatus(); } catch (Exception ex) { Console.WriteLine(ex); } @@ -161,6 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui if (TaskService.TaskCount > 0) { WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad(this.GetType().FullName); } + UpdateToolstripStatus(); } void ListViewItemActivate(object sender, EventArgs e) @@ -265,11 +268,14 @@ namespace ICSharpCode.SharpDevelop.Gui void TaskServiceCleared(object sender, EventArgs e) { listView.Items.Clear(); + UpdateToolstripStatus(); + } void TaskServiceAdded(object sender, TaskEventArgs e) { AddTask(e.Task); + UpdateToolstripStatus(); } void TaskServiceRemoved(object sender, TaskEventArgs e) @@ -281,6 +287,7 @@ namespace ICSharpCode.SharpDevelop.Gui break; } } + UpdateToolstripStatus(); } /// @@ -296,18 +303,22 @@ namespace ICSharpCode.SharpDevelop.Gui return FormattedDescription.Replace("\n", " "); } - void InternalShowResults() + void UpdateToolstripStatus() { - // listView.CreateControl is called in the constructor now. - if (!listView.IsHandleCreated) { - return; - } - + Console.WriteLine("Updpate " + TaskService.TaskCount); foreach (ToolStripItem item in toolStrip.Items) { if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateStatus(); } } + } + + void InternalShowResults() + { + // listView.CreateControl is called in the constructor now. + if (!listView.IsHandleCreated) { + return; + } listView.BeginUpdate(); listView.Items.Clear(); @@ -317,6 +328,8 @@ namespace ICSharpCode.SharpDevelop.Gui } listView.EndUpdate(); + UpdateToolstripStatus(); + } } } diff --git a/src/Main/StartUp/Project/Dialogs/ExceptionBox.cs b/src/Main/StartUp/Project/Dialogs/ExceptionBox.cs index 332dbea98d..dbb0ad4471 100644 --- a/src/Main/StartUp/Project/Dialogs/ExceptionBox.cs +++ b/src/Main/StartUp/Project/Dialogs/ExceptionBox.cs @@ -103,6 +103,7 @@ namespace ICSharpCode.SharpDevelop void continueButtonClick(object sender, System.EventArgs e) { DialogResult = System.Windows.Forms.DialogResult.Ignore; + CopyInfoToClipboard(); Close(); }