Hi,
I just installed the full version of 5.0 and noticed that the DrawSample method has been overloaded and the overload I am using has been deprecated. Now, in addition to providing a Canvas object, a DrawingRectangelF must also be provided. But now when I use this method I get the following error:
System.ArgumentException was unhandled
Message=The parameter you supplied may not be empty.
Parameter name: text
ParamName=text
Source=MapSuiteCore
StackTrace:
at mBQ=.eTw=.7zw=(String 8Dw=, String 8Tw=)
at ThinkGeo.MapSuite.Core.GeoCanvas.DrawText(String text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable`1 textPathInScreen, DrawingLevel drawingLevel, Single xOffset, Single yOffset, Single rotateAngle)
at ThinkGeo.MapSuite.Core.TextStyle.DrawSampleCore(GeoCanvas canvas, DrawingRectangleF drawingExtent)
at ThinkGeo.MapSuite.Core.Style.DrawSample(GeoCanvas canvas, DrawingRectangleF drawingExtent)
at MapUtilities.DisplayUtilities.GetStyleImage(Style oStyle, Size oSize) in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Classes\DisplayUtilities.vb:line 96
at MapUtilities.frmLayerProperties.mUpdateTextPreview() in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Forms\frmLayerProperties.vb:line 915
at MapUtilities.frmLayerProperties.mSetCurrentTextStyle() in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Forms\frmLayerProperties.vb:line 489
at MapUtilities.frmLayerProperties.mSetFormForFeatureLayer() in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Forms\frmLayerProperties.vb:line 131
at MapUtilities.frmLayerProperties.frmLayerProperties_Load(Object sender, EventArgs e) in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Forms\frmLayerProperties.vb:line 93
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at MapUtilities.LayerUtils.SetLayerProperties(SilvicsTOCNode oNode, CustomWinformsMap oMap, Boolean& bTOCUpdateNeeded) in C:\Silvics\VS 2010 Projects\GeoFrame\MapUtilities\Classes\LayerUtils.vb:line 1169
at GeoFrame.frmMain.mHandleFrameworkToolClick(ToolBase oTool) in C:\Silvics\VS 2010 Projects\GeoFrame\GeoFrame\Forms\frmMain.vb:line 942
at GeoFrame.frmMain.ToolbarsMgr_ToolClick(Object sender, ToolClickEventArgs e) in C:\Silvics\VS 2010 Projects\GeoFrame\GeoFrame\Forms\frmMain.vb:line 820
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()
at Infragistics.Win.UltraWinToolbars.ToolMenuItem.OnClick()
at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.DoClickProcessing(MouseEventArgs e)
at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.TextUIElementBase.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinToolbars.PopupControlBase.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at GeoFrame.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
The text parameter it is complaining about is within the ThinkGeo codebase, so this looks like a potential bug.
Thanks,
Steve