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 @@ -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);

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

@ -99,7 +99,7 @@ namespace ICSharpCode.FormDesigner.Services @@ -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);

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

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
// </file>
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Specialized;
using System.Drawing.Design;
@ -249,6 +250,7 @@ namespace ICSharpCode.FormDesigner.Services @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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;

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

@ -145,12 +145,14 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -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 @@ -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 @@ -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 @@ -281,6 +287,7 @@ namespace ICSharpCode.SharpDevelop.Gui
break;
}
}
UpdateToolstripStatus();
}
/// <summary>
@ -296,18 +303,22 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -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 @@ -317,6 +328,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
listView.EndUpdate();
UpdateToolstripStatus();
}
}
}

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

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

Loading…
Cancel
Save