Huvudfönstret:
Först bygger man en prototyp i (Microsoft Expression Blend) SketchFlow.
Skapa nytt objekt:
Sen "the real deal" mha ArcGIS for WP7:
<StackPanel Orientation="Vertical" Width="{Binding Width, ElementName=View} ">
<StackPanel Orientation="Vertical" Width="{Binding Width, ElementName=View}">
Private Sub AddBalloonCallout(ByVal activeView As IActiveView)
Dim pTextElement As ITextElement
Dim pElement As IElement
Dim pPoint As IPoint
Dim pCallout As ICallout
Dim pTextSymbol As IFormattedTextSymbol
Dim pGraphicsContainer As IGraphicsContainer
Dim midX As Double, midY As Double
'Create a new text element
pTextElement = New TextElement
pElement = CType(pTextElement, IElement) 'QI
pTextElement.Text = "Text callout" & vbCrLf & "In the middle of the screen"
'Position the new element on the active view's center point
midX = (activeView.Extent.XMax + activeView.Extent.XMin) / 2
midY = (activeView.Extent.YMax + activeView.Extent.YMin) / 2
pPoint = New Point
pPoint.PutCoords(midX, midY)
pElement.Geometry = pPoint
'Set the text element symbology to a default balloon callout
pTextSymbol = New TextSymbol
pCallout = New BalloonCallout
pTextSymbol.Background = CType(pCallout, ITextBackground)
'Use this formula to get a callout anchor point location
pPoint.PutCoords(midX - activeView.Extent.Width / 4, midY + activeView.Extent.Width / 20)
pCallout.AnchorPoint = pPoint
pTextElement.Symbol = pTextSymbol
'Add the element to the active view, either the focus Map or PageLayout
pGraphicsContainer = CType(activeView, IGraphicsContainer)
pGraphicsContainer.AddElement(pElement, 0)
pElement.Activate(activeView.ScreenDisplay)
'Flag the area of the new element for refreshing
activeView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, pElement, Nothing)
End Sub
Private activeViewEvents As ESRI.ArcGIS.Carto.IActiveViewEvents_Event
Private m_ActiveViewEventsItemAdded As ESRI.ArcGIS.Carto.IActiveViewEvents_ItemAddedEventHandler
Private Sub AddEventListenerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddEventListenerToolStripMenuItem.Click
activeViewEvents = CType(axMapControl1.ActiveView.FocusMap, ESRI.ArcGIS.Carto.IActiveViewEvents_Event)
m_ActiveViewEventsItemAdded = New ESRI.ArcGIS.Carto.IActiveViewEvents_ItemAddedEventHandler(AddressOf OnActiveViewEventsItemAdded)
AddHandler CType(axMapControl1.ActiveView.FocusMap, ESRI.ArcGIS.Carto.IActiveViewEvents_Event).ItemAdded, m_ActiveViewEventsItemAdded
End Sub
Private Sub OnActiveViewEventsItemAdded()
'makes layer(1) always on top.
axMapControl1.ActiveView.FocusMap.MoveLayer(axMapControl1.ActiveView.FocusMap.Layer(0), 1)
End Sub
Private m_polygonFeedback As INewPolygonFeedback
Private m_screenDisplay As IScreenDisplay
Private m_hookHelper As IHookHelper
Public Overrides Sub OnCreate(ByVal hook As Object)
If (m_hookHelper Is Nothing) Then m_hookHelper = New HookHelperClass
If Not hook Is Nothing Then
m_hookHelper.Hook = hook
End If
End Sub
Public Overrides Sub OnClick()
m_screenDisplay = m_hookHelper.ActiveView.ScreenDisplay
End Sub
Public Overrides Sub OnDblClick()
Dim polygon As IPolygon = m_polygonFeedback.Stop()
MsgBox("Area: " & CType(polygon, IArea).Area)
m_polygonFeedback = Nothing
End Sub
Public Overrides Sub OnMouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Integer, ByVal Y As Integer)
If Button = 1 Then
Dim cursorPoint As ESRI.ArcGIS.Geometry.IPoint = m_screenDisplay.DisplayTransformation.ToMapPoint(X, Y)
If m_polygonFeedback Is Nothing Then
m_polygonFeedback = New NewPolygonFeedbackClass()
m_polygonFeedback.Display = m_screenDisplay
m_polygonFeedback.Start(cursorPoint)
Else
m_polygonFeedback.AddPoint(cursorPoint)
End If
End If
End Sub
Public Overrides Sub OnMouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Integer, ByVal Y As Integer)
If Not m_polygonFeedback Is Nothing Then
Dim cursorPoint As ESRI.ArcGIS.Geometry.IPoint = m_screenDisplay.DisplayTransformation.ToMapPoint(X, Y)
m_polygonFeedback.MoveTo(cursorPoint)
End If
End Sub
Ett skript på den här sidan gör att Internet Explorer går långsamt. Om det fortsätter att vara igång kan datorn sluta att svara. Vill du avbryta skriptet?
Stop running this script
1.In Visual Studio, open Solution Explorer and select the file to exclude.
2.On the File menu, click Source Control, then click Exclude from Source Control.
3.When you are ready to place the file under source control, you can access the File menu and click Source Control, then uncheck Exclude from Source Control.
Delete files that you want to exclude, add them to were they were again, but do not checkin yet. Then on source control undo pending changes. After that these files would not be source controled items.
Error messages when you try to connect Outlook 2007 to Exchange Server: "The action cannot be completed" or "Your Microsoft Exchange Server is unavailable" or "Cannot start Microsoft Office Outlook"
Could not load file or assembly 'ESRI.ArcGIS.Version, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. Det går inte att hitta filen.
if (!RuntimeManager .Bind(ProductCode .Engine))
{
if (!RuntimeManager .Bind(ProductCode .Desktop))
{
MessageBox .Show("Unable to bind to ArcGIS runtime. Application will be shut down." );
return ;
}
}
Värt att notera det nya RuntimeManager objektet som ESRI använder för att göra bind mot runtime versionen. Detta måste göras i koden innan några ArcObjects objekt anropas.
och "Advanced" och klicka i "run as admininstrator"
så startas VS alltid med administrator rättigheter.
Dim destination As String = "c:\\testPDF.pdf"
Dim source As List(Of String) = New List(Of String)
source.Add("c:\\1.pdf")
source.Add("c:\\2.pdf")
PdfMerge.MergeFiles(destination, source.ToArray())