-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Разделена работа формы и логики.
- Loading branch information
Showing
95 changed files
with
91,595 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+79 Bytes
(100%)
GMap.NET.Core/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+18.4 KB
(130%)
GMap.NET.Core/obj/x86/Debug/GMap.NET.Core.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+270 Bytes
(100%)
GMap.NET.WindowsForms/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
| ||
namespace WindowsForms.CustomMarkers | ||
{ | ||
using System; | ||
using System.Drawing; | ||
using System.Runtime.Serialization; | ||
using GMap.NET; | ||
using GMap.NET.WindowsForms; | ||
|
||
#if !PocketPC | ||
[Serializable] | ||
public class GMapMarkerCircle : GMapMarker, ISerializable | ||
#else | ||
public class GMapMarkerCircle : GMapMarker | ||
#endif | ||
{ | ||
/// <summary> | ||
/// In Meters | ||
/// </summary> | ||
public int Radius; | ||
|
||
/// <summary> | ||
/// specifies how the outline is painted | ||
/// </summary> | ||
[NonSerialized] | ||
#if !PocketPC | ||
public Pen Stroke = new Pen(Color.FromArgb(155, Color.MidnightBlue)); | ||
#else | ||
public Pen Stroke = new Pen(Color.MidnightBlue); | ||
#endif | ||
|
||
/// <summary> | ||
/// background color | ||
/// </summary> | ||
[NonSerialized] | ||
#if !PocketPC | ||
public Brush Fill = new SolidBrush(Color.FromArgb(155, Color.LightSkyBlue)); | ||
#else | ||
public Brush Fill = new System.Drawing.SolidBrush(Color.AliceBlue); | ||
#endif | ||
|
||
/// <summary> | ||
/// is filled | ||
/// </summary> | ||
public bool IsFilled = true; | ||
|
||
public GMapMarkerCircle(PointLatLng p) | ||
: base(p) | ||
{ | ||
Radius = 150; // 100m | ||
IsHitTestVisible = false; | ||
} | ||
|
||
public override void OnRender(Graphics g) | ||
{ | ||
int R = (int)((Radius) / Overlay.Control.MapProvider.Projection.GetGroundResolution((int)Overlay.Control.Zoom, Position.Lat)) * 2; | ||
|
||
if(IsFilled) | ||
{ | ||
g.FillEllipse(Fill, new System.Drawing.Rectangle(LocalPosition.X - R / 2, LocalPosition.Y - R / 2, R, R)); | ||
} | ||
g.DrawEllipse(Stroke, new System.Drawing.Rectangle(LocalPosition.X - R / 2, LocalPosition.Y - R / 2, R, R)); | ||
} | ||
|
||
public override void Dispose() | ||
{ | ||
if(Stroke != null) | ||
{ | ||
Stroke.Dispose(); | ||
Stroke = null; | ||
} | ||
|
||
if(Fill != null) | ||
{ | ||
Fill.Dispose(); | ||
Fill = null; | ||
} | ||
|
||
base.Dispose(); | ||
} | ||
|
||
#if !PocketPC | ||
|
||
#region ISerializable Members | ||
|
||
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) | ||
{ | ||
base.GetObjectData(info, context); | ||
|
||
// TODO: Radius, IsFilled | ||
} | ||
|
||
protected GMapMarkerCircle(SerializationInfo info, StreamingContext context) | ||
: base(info, context) | ||
{ | ||
// TODO: Radius, IsFilled | ||
} | ||
|
||
#endregion | ||
|
||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
| ||
namespace WindowsForms.CustomMarkers | ||
{ | ||
using System.Drawing; | ||
using GMap.NET.WindowsForms; | ||
using GMap.NET.WindowsForms.Markers; | ||
using GMap.NET; | ||
using System; | ||
using System.Runtime.Serialization; | ||
using System.Drawing.Drawing2D; | ||
|
||
[Serializable] | ||
public class GMapMarkerRect : GMapMarker, ISerializable | ||
{ | ||
[NonSerialized] | ||
public Pen Pen; | ||
|
||
[NonSerialized] | ||
public GMarkerGoogle InnerMarker; | ||
|
||
public GMapMarkerRect(PointLatLng p) | ||
: base(p) | ||
{ | ||
Pen = new Pen(Brushes.Blue, 5); | ||
|
||
// do not forget set Size of the marker | ||
// if so, you shall have no event on it ;} | ||
Size = new System.Drawing.Size(5, 5);//111.111 | ||
Offset = new System.Drawing.Point(-Size.Width / 2, -Size.Height / 2); | ||
} | ||
|
||
public override void OnRender(Graphics g) | ||
{ | ||
g.DrawRectangle(Pen, new System.Drawing.Rectangle(LocalPosition.X, LocalPosition.Y, Size.Width, Size.Height)); | ||
; | ||
} | ||
|
||
public override void Dispose() | ||
{ | ||
if(Pen != null) | ||
{ | ||
Pen.Dispose(); | ||
Pen = null; | ||
} | ||
|
||
if(InnerMarker != null) | ||
{ | ||
InnerMarker.Dispose(); | ||
InnerMarker = null; | ||
} | ||
|
||
base.Dispose(); | ||
} | ||
|
||
#region ISerializable Members | ||
|
||
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) | ||
{ | ||
base.GetObjectData(info, context); | ||
} | ||
|
||
protected GMapMarkerRect(SerializationInfo info, StreamingContext context) | ||
: base(info, context) | ||
{ | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.WindowsForms", "Demo.WindowsForms.csproj", "{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
Oops, something went wrong.