From 471de2f4ce644b2aef09b5f8cc2a25ef344eab45 Mon Sep 17 00:00:00 2001 From: Peter Forstmeier Date: Tue, 7 Feb 2006 13:32:41 +0000 Subject: [PATCH] Fixing Issue SD2-688 from Matt Ward git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1090 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../FieldsExplorer/FieldsExplorer.cs | 109 ++++++++++-------- .../Resources/BitmapResources.res | 8 -- .../Resources/BitmapResources.resources | Bin 2192 -> 0 bytes .../Resources/BuildBitmapResources.bat | 2 - .../Resources/Icons/Icons.16x16.Ascending.png | Bin 665 -> 0 bytes .../Icons/Icons.16x16.Descending.png | Bin 674 -> 0 bytes .../SharpReportAddin/Resources/ResAsm.exe | Bin 10752 -> 0 bytes .../SharpReportAddin/SharpReportAddin.csproj | 1 - .../SharpReportAddin/SharpReportView.cs | 47 ++++---- 9 files changed, 89 insertions(+), 78 deletions(-) delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.res delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.resources delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BuildBitmapResources.bat delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/Icons/Icons.16x16.Ascending.png delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/Icons/Icons.16x16.Descending.png delete mode 100644 src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/ResAsm.exe diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/FieldsExplorer.cs b/src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/FieldsExplorer.cs index dcc6da129c..c70737f5e0 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/FieldsExplorer.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/FieldsExplorer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 1.1.4322.2032 +// Runtime Version: 1.1.ascendingIconscendingIcon322.2032 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,7 +13,6 @@ using System; using System.IO; using System.Data; using System.Drawing; -using System.Resources; using System.Reflection; using System.Windows.Forms; using System.ComponentModel; @@ -31,7 +30,7 @@ using SharpReportCore; /// /// /// created by - Forstmeier Peter -/// created on - 12.06.2005 18:17:46 +/// created on - 12.06.200descendingIconescendingIcon 18:17:ascendingIconscendingIcon6 /// /// @@ -84,12 +83,12 @@ namespace SharpReportAddin { ColumnsTreeNode cn = (ColumnsTreeNode)this.SelectedNode; if (cn.SortDirection == ListSortDirection.Ascending) { cn.SortDirection = ListSortDirection.Descending; - cn.ImageIndex = 5; - cn.SelectedImageIndex = 5; + cn.ImageIndex = descendingIcon; + cn.SelectedImageIndex = descendingIcon; } else { cn.SortDirection = ListSortDirection.Ascending; - cn.ImageIndex = 4; - cn.SelectedImageIndex = 4; + cn.ImageIndex = ascendingIcon; + cn.SelectedImageIndex = ascendingIcon; } this.NotifyReportView(); } @@ -144,8 +143,8 @@ namespace SharpReportAddin { // Useless to add a node twice if (!CheckForExist (node,dest)) { dest.SortDirection = ListSortDirection.Ascending; - dest.ImageIndex = 4; - dest.SelectedImageIndex = 4; + dest.ImageIndex = ascendingIcon; + dest.SelectedImageIndex = ascendingIcon; this.SelectedNode = (TreeNode)dest; CheckNode (dest); node.Nodes.Add(dest); @@ -158,9 +157,7 @@ namespace SharpReportAddin { private void Fill () { - this.Nodes.Clear(); - InitImageList(); - BuildNodes(); +// BuildNodes(); this.FillTree(); this.ExpandAll(); isFilled = true; @@ -204,14 +201,14 @@ namespace SharpReportAddin { ColumnsTreeNode cn = (ColumnsTreeNode)node; if (cn.SortDirection == ListSortDirection.Ascending) { - cn.ImageIndex = 4; + cn.ImageIndex = ascendingIcon; } else { - cn.ImageIndex = 5; + cn.ImageIndex = descendingIcon; } } else if (node.Parent == this.nodeGrouping) { ColumnsTreeNode cn = (ColumnsTreeNode)node; - cn.ImageIndex = 2; - cn.SelectedImageIndex = 2; + cn.ImageIndex = clearIcon; + cn.SelectedImageIndex = clearIcon; } } @@ -226,6 +223,7 @@ namespace SharpReportAddin { } #region PadEvents + private void OnWindowChange (object sender,EventArgs e) { try { if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow == null || WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent == null) { @@ -252,8 +250,7 @@ namespace SharpReportAddin { WorkbenchSingleton.Workbench.WorkbenchLayout.HidePad(pad); } - } catch (Exception er) { - System.Console.WriteLine("\tFieldsExplorer {0}",er.Message); + } catch (Exception) { } } @@ -306,6 +303,7 @@ namespace SharpReportAddin { void SetAvailableFields () { try { + this.nodeAvailableFields.Nodes.Clear(); int avCount = this.reportModel.ReportSettings.AvailableFieldsCollection.Count; for (int i = 0;i < avCount ;i++ ) { AbstractColumn af = this.reportModel.ReportSettings.AvailableFieldsCollection[i]; @@ -316,18 +314,18 @@ namespace SharpReportAddin { n.ContextmenuAddinTreePath = ""; switch (this.reportModel.ReportSettings.CommandType) { case CommandType.Text:{ - n.ImageIndex = 6; - n.SelectedImageIndex = 6; + n.ImageIndex = columnIcon; + n.SelectedImageIndex = columnIcon; break; } case CommandType.StoredProcedure: { - n.ImageIndex = 7; - n.SelectedImageIndex = 7; + n.ImageIndex = storedprocIcon ; + n.SelectedImageIndex = storedprocIcon ; break; } default:{ - n.ImageIndex = 6; - n.SelectedImageIndex = 6; + n.ImageIndex = columnIcon; + n.SelectedImageIndex = columnIcon; break; } } @@ -343,6 +341,7 @@ namespace SharpReportAddin { void SetSortFields(){ try { ColumnsTreeNode node; + this.nodeSorting.Nodes.Clear(); int scCount = this.reportModel.ReportSettings.SortColumnCollection.Count; foreach (SortColumn sc in this.reportModel.ReportSettings.SortColumnCollection) { node = new ColumnsTreeNode(sc.ColumnName,sc.SortDirection); @@ -350,8 +349,8 @@ namespace SharpReportAddin { node.ImageIndex = 4; node.SelectedImageIndex = 4; } else { - node.ImageIndex = 5; - node.SelectedImageIndex = 5; + node.ImageIndex = descendingIcon; + node.SelectedImageIndex = descendingIcon; } this.nodeSorting.Nodes.Add(node); } @@ -362,16 +361,17 @@ namespace SharpReportAddin { void SetGroupFields(){ try { ColumnsTreeNode node; + this.nodeGrouping.Nodes.Clear(); int gcCount = this.reportModel.ReportSettings.GroupColumnsCollection.Count; for (int i = 0;i < gcCount ;i++ ) { GroupColumn gc = (GroupColumn)this.reportModel.ReportSettings.GroupColumnsCollection[i]; node = new ColumnsTreeNode(gc.ColumnName); if (node.SortDirection == ListSortDirection.Ascending) { - node.ImageIndex = 4; - node.SelectedImageIndex = 4; + node.ImageIndex = ascendingIcon; + node.SelectedImageIndex = ascendingIcon; } else { - node.ImageIndex = 5; - node.SelectedImageIndex = 5; + node.ImageIndex = descendingIcon; + node.SelectedImageIndex = descendingIcon; } this.nodeGrouping.Nodes.Add(node); } @@ -383,14 +383,15 @@ namespace SharpReportAddin { void SetParamFields (){ ColumnsTreeNode node; + this.nodeParams.Nodes.Clear(); int parCount = this.reportModel.ReportSettings.SqlParametersCollection.Count; if (parCount > 0) { for (int i = 0;i < parCount ;i++ ) { SqlParameter par = (SqlParameter)this.reportModel.ReportSettings.SqlParametersCollection[i]; node = new ColumnsTreeNode(par.ParameterName); node.Tag = par; - node.SelectedImageIndex = 9; - node.ImageIndex = 9; + node.SelectedImageIndex = columnIcon; + node.ImageIndex = columnIcon; this.nodeParams.Nodes.Add (node); } } @@ -398,12 +399,15 @@ namespace SharpReportAddin { void SetFunctions(){ ColumnsTreeNode node; + this.nodeFunction.Nodes.Clear(); foreach (ReportSection section in this.reportModel.SectionCollection) { foreach (BaseReportObject item in section.Items) { BaseFunction func = item as BaseFunction; if (func != null) { - node = new ColumnsTreeNode(func.Name); - this.nodeFunction.Nodes.Add(func.FriendlyName); + node = new ColumnsTreeNode (func.FriendlyName); + node.SelectedImageIndex = functionIcon; + node.ImageIndex = functionIcon; + this.nodeFunction.Nodes.Add(node); } } } @@ -419,12 +423,12 @@ namespace SharpReportAddin { this.EndUpdate(); } - private const int folderClosed = 0; - private const int folderOpen = 1; - + + void BuildNodes() { BeginUpdate(); + this.Nodes.Clear(); TreeNode root = new TreeNode(ResourceService.GetString("SharpReport.FieldsExplorer.Title")); nodeAvailableFields = new SectionTreeNode(ResourceService.GetString("SharpReport.FieldsExplorer.AvailableFields")); nodeAvailableFields.ImageIndex = folderClosed; @@ -458,6 +462,16 @@ namespace SharpReportAddin { this.EndUpdate(); } + private const int folderClosed = 0; + private const int folderOpen = 1; + private const int clearIcon = 2; + + private const int ascendingIcon = 4; + private const int descendingIcon = 5; + private const int storedprocIcon = 7; + + private const int columnIcon = 8; + private const int functionIcon = 9; void InitImageList() { ImageList imageList = new ImageList(); @@ -469,20 +483,19 @@ namespace SharpReportAddin { imageList.Images.Add(new Bitmap(1, 1)); imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SelectionArrow")); - - ResourceManager rm = new ResourceManager ("SharpReportAddin.Resources.BitmapResources", - System.Reflection.Assembly.GetExecutingAssembly()); - - - imageList.Images.Add ((Bitmap)rm.GetObject("Icons.SharpReport.16x16.Ascending")); - imageList.Images.Add ((Bitmap)rm.GetObject("Icons.SharpReport.16x16.Descending")); - + + imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpReport.Ascending")); + + imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpReport.Descending")); //Table's or procedure imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpQuery.Table")); imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpQuery.Procedure")); - imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpQuery.View")); + //Parameters imageList.Images.Add(IconService.GetBitmap("Icons.16x16.SharpQuery.Column")); + + //Function + imageList.Images.Add(ResourceService.GetIcon("Icons.16x16.SharpReport.Function")); ImageList = imageList; } catch (Exception e) { MessageService.ShowError(e); @@ -554,7 +567,7 @@ namespace SharpReportAddin { public FieldsExplorer() { WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += OnWindowChange; - + LabelEdit = true; AllowDrop = true; HideSelection = false; @@ -566,6 +579,8 @@ namespace SharpReportAddin { this.DragDrop += TreeViewDragDrop; this.DragOver += TreeViewDragOver; contentPanel.Controls.Add(this); + this.InitImageList(); + BuildNodes(); } } } diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.res b/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.res deleted file mode 100644 index d9e1446a75..0000000000 --- a/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.res +++ /dev/null @@ -1,8 +0,0 @@ - -# Bitmaps for SharpReport - -Icons.SharpReport.16x16.Ascending = Icons\Icons.16x16.Ascending.png -Icons.SharpReport.16x16.Descending = Icons\Icons.16x16.Descending.png - - - diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.resources b/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/BitmapResources.resources deleted file mode 100644 index 6a8f063ff3890b3e78e6ece089b4bb6127c07b07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2192 zcmX?i>is@O1_p+SK%5g?SzMBus~417oL^d$oLUTL1*ImYq!#HYRpNw%QN%R^_((GauW-56i|i9 zahQQ|nrWJOnxSEesX?M~Vt}Iy5H*+n{pGxWc|Oo)26rId19XFvCqptrK0_WuF@qjM zFhd4IB0~{F0YeZ&Dv-mZKpF1y?6c>=s>*?VV1f&H(m;0d5{rJ1Fg9nex_bZ9I*_as2|rd2~l+B>rg9ht#3cmFRq_(0}x3)At* zg3+gYkKJxPs=KH%lc`K+NnzM+pCm1_gaS{kR*t>QR=2tzPu@}e=Z~vT>+8M7Q$L^Z zVdy=mDVS-o^ttDuv+ZyFoK}n;dtIxi>nE37K?fJ(}sV|D2A+=%-+Ss4uYY%ceJgGLzE55Jk<{|)zsVBL*EG3HZN67amF4Fh`F%GyV{1UR zV61Upu&A5I5fzJPp#`^YBqS;X#;o6;V^;q9>$S`2@||fDd0wbA{@QyvekZ?I*Tj=d zCnNoH^WK<+$Jy6yx*n4~bycy}=amOiPtP^;@(W;aU$*k4X~TUh?s6BlYkwTCN$DP` zXvr06@N2ov^dzfU_+snjB%!kXFItW+RUH%TKo=uC%C<>coTc&p)c3R-T{IihqmBgt)Ocd^{w^6PR21`r>c)lZkt- zy`7)(mcM@A{EwF}mz0*C|Mei3^TI91sm{z!&gZXIynRsjH`e&&zaN^r?{@cwrB4gw zJW(Xa@WOq?o}8)z&B&6+Ke=C6zW=H>X$SB0J&SGB&n2#I_V(k*>uCy94oCmTMM`=&hQh;FZYCZoo@SgyXaDONhMY|)mjKmILy+{CzMmjo~8qoB|m(&ntk gCN|kf9y8Tht#~YA>RH2Y^7=J(Dp6$JRwGa7~{$DiKuvIZK)aD(Qzn=XUnJk@Vw-HKA%B$hH=ZT>!#Dm#re~d`P_n( zluE7!Hk)|;aEip)waKnuyT+ufeIKXOF>o@U$6+w4JFpN?i=t2pA}F*Y41l0oO3FhX z@9i1YEm*WcUCxAnD8{~c1(jM#YTE#y7Loq|0A79O-tRSp00000NkvXXu0mjfn_yB) diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/Icons/Icons.16x16.Descending.png b/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/Icons/Icons.16x16.Descending.png deleted file mode 100644 index 1f17a8e44ed678ca2fa0a94662afeafb22dffe8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 674 zcmV;T0$u%yP)weC8&NFjn%uHmG*jBJbC@u_^F0vIA z_ky_7g8A2BH8$ zNOj$asRRH(g%P9-TLY3H3S^;{_4?E~Th)z-5C%Z-5WpDN8UP@GD3E|$htQ42Enooj zeKJ*ZZoK*U=`W3Kz4xP`yLt2aZ01s8$zd?G#tjDZgE@fHt{)6t-AGDohm+-^GvXG< z>&b=#Ve87;1~5ihwzsyst{b(Z;6Vjo=ksN4+bdVTnQmS%H4cvw0f;S1W5mo451N5f zzz)#$*!k>|F?QfKx-K3au0U)~EdWwVQB#n&X0ysv>n>2yw)ptrqjjUNE`L3lZjZ*3 ztU!h1Wv*&t?VvVi+!VI9c482e8uf%KZ} z)9HnufBLQKrIL2{>bEB+C$sY#DR-}4y?prSjuE7sL>aT@+Bk(t3B%_6k z+cqFe->*{&sl?NDpGhAHOuzr(#g9+^%$ds-wNOct$BP3{NfxpwQ(?~JS?4AfW2P4R zo>Wq)C6Unp2z@;JrR1Q+8$gM7@Bi_E5Ht=kDg>+50svS@rSI2dT(0IyuZ+s1q>@w~ z9xSM&W-^jqiqEF0APN*fv&PCagaB1a#n}cxNx8BpF*rB=AAtFNaA4UnGXMYp07*qo IM6N<$g3+2hjQ{`u diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/ResAsm.exe b/src/AddIns/Misc/SharpReport/SharpReportAddin/Resources/ResAsm.exe deleted file mode 100644 index 71f8a419d47dad82b6d64650247e61c20995145c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10752 zcmeHNe{dZ2b$`3}`y`#bcOY9vvey#Whfg{S+X?b-{j@ABSw@n708Z?av_4(9yOnqE zY>O7EguuWQL!giZr=*0o(|XcLF)aynlF~F}Qf6S94$ZVP1rM~zw4G9#G@W)rDDLOI z-94Rt*udY-p7(v<_kG{@z4v|Zecyg}<>A}EKt3Y!v?VrWy zPb06bdqEj`ZQb~E&emrvGizlE`ede9G)ww~pOisl5w_#{>z}tT6nFl-N5A1 zVO83)tx5F6wi7@&P@eOE^3{cZY0Jo)U=&;DKxA1-+*MZ>QBPG@(5FGuJ8g8nj`5J4;9n>L5($Taqx2V({l^39)6~q+0fcQoeVJ&QdFq6E2 zdlB?DdA;O%CPlTVwGAY51A1W-!G?LAr`YpLEUbywh{`g2tF(1$QS`-Nw$S>0NO2iV zCL|H1p!IcDhjfUFg3eVCZ2bvniCQhP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View.cs index 146dc90825..8cd3ab88f1 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs @@ -55,16 +55,19 @@ namespace SharpReportAddin{ panel.AutoScroll = true; CreateTabControl(); BuildToolBarItems(); - PropertyPad.Grid.SelectedObject = designerControl.ReportModel.ReportSettings; - PropertyPad.Grid.Refresh(); + + if (PropertyPad.Grid != null) { + PropertyPad.Grid.SelectedObject = designerControl.ReportModel.ReportSettings; + PropertyPad.Grid.Refresh(); + } + //Activate the FieldsExplorer - Pad PadDescriptor pad = WorkbenchSingleton.Workbench.GetPad(typeof(FieldsExplorer)); if (pad != null) { pad.CreatePad(); } - } catch (Exception e) { - MessageService.ShowError(e,e.Message); - throw e; + } catch (Exception) { + throw; } } @@ -358,13 +361,10 @@ namespace SharpReportAddin{ private void OnObjectSelected (object sender,EventArgs e) { if (designerControl.ReportControl.SelectedObject != null) { -// BaseReportObject bro = designerControl.ReportControl.SelectedObject as BaseReportObject; -// -// if (bro != null) { -// string s = "{" + bro.Name + "}"; -// StatusBarService.SetMessage(s); -// } - PropertyPad.Grid.SelectedObject = designerControl.ReportControl.SelectedObject; + if (PropertyPad.Grid != null) { + PropertyPad.Grid.SelectedObject = designerControl.ReportControl.SelectedObject; + } + } } @@ -380,8 +380,10 @@ namespace SharpReportAddin{ /// Set PropertyGrid to ReportSettings /// public void ShowReportSettings () { - PropertyPad.Grid.SelectedObject = designerControl.ReportControl.ReportSettings; - PropertyPad.Grid.Refresh(); + if (PropertyPad.Grid != null) { + PropertyPad.Grid.SelectedObject = designerControl.ReportControl.ReportSettings; + PropertyPad.Grid.Refresh(); + } } @@ -505,12 +507,14 @@ namespace SharpReportAddin{ base.FileName = fileName; designerControl.ReportModel.ReportSettings.FileName = fileName; designerControl.ReportControl.ObjectSelected += new EventHandler (OnObjectSelected); - PropertyPad.Grid.SelectedObject = designerControl.ReportModel.ReportSettings; - PropertyPad.Grid.Refresh(); + if (PropertyPad.Grid != null) { + PropertyPad.Grid.SelectedObject = designerControl.ReportModel.ReportSettings; + PropertyPad.Grid.Refresh(); + } + this.designerControl.ReportModel.ReportSettings.AvailableFieldsCollection = reportManager.AvailableFieldsCollection; - - } catch (Exception e) { - MessageService.ShowError(e.Message); + + } catch (Exception ) { throw ; } } @@ -541,7 +545,10 @@ namespace SharpReportAddin{ public override void Dispose(){ - PropertyPad.Grid.SelectedObject = null; + if (PropertyPad.Grid != null) { + PropertyPad.Grid.SelectedObject = null; + } + RemoveSideBarItem(); this.Dispose(true); GC.SuppressFinalize(this);