Skip to content

Commit

Permalink
Version_alfa_1_0_0
Browse files Browse the repository at this point in the history
Разделена работа формы и логики.
  • Loading branch information
GASSAG16 committed Sep 22, 2016
1 parent 857a5de commit 084a355
Show file tree
Hide file tree
Showing 95 changed files with 91,595 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GISSAG_alfa.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.Core", "GMap.NET.C
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.WindowsForms", "GMap.NET.WindowsForms\GMap.NET.WindowsForms.csproj", "{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GISSAG_WindowsForms", "Demo.WindowsForms\GISSAG_WindowsForms.csproj", "{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GISSAG_WindowsForms", "WindowsForms\GISSAG_WindowsForms.csproj", "{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1040A81C-796E-4514-A5AF-AB9B5F0D8858}"
ProjectSection(SolutionItems) = preProject
Expand Down
Binary file modified GISSAG_alfa.v11.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion GMap.NET.Core/GMap.NET.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Demo.WindowsForms\GISSAG_WindowsForms.csproj">
<ProjectReference Include="..\WindowsForms\GISSAG_WindowsForms.csproj">
<Project>{a2e07a76-8b2c-41a2-b23e-ea31ae94d706}</Project>
<Name>GISSAG_WindowsForms</Name>
</ProjectReference>
Expand Down
Binary file modified GMap.NET.Core/bin/x86/Debug/GMap.NET.Core.dll
Binary file not shown.
Binary file modified GMap.NET.Core/bin/x86/Debug/GMap.NET.Core.pdb
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,23 @@ G:\swer\New_folder\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.dll
G:\swer\New_folder\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.pdb
G:\swer\New_folder\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\GISSAG.exe
G:\swer\New_folder\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\GISSAG.pdb
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\GMap.NET.Core.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\GMap.NET.Core.pdb
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\Mono.Data.SqliteClient.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\Mono.Security.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\MySql.Data.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\Npgsql.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\System.Data.SqlServerCe.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\Npgsql.xml
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\de\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\es\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\fi\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\fr\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\ja\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\zh-CN\Npgsql.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\bin\x86\Debug\RU\System.Data.SqlServerCe.resources.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.csprojResolveAssemblyReference.cache
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Properties.Resources.resources
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.csproj.GenerateResource.Cache
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.dll
G:\swer\BitbucketProject\GISSAG_alfa\GMap.NET.Core\obj\x86\Debug\GMap.NET.Core.pdb
Binary file not shown.
Binary file modified GMap.NET.Core/obj/x86/Debug/GMap.NET.Core.dll
Binary file not shown.
Binary file modified GMap.NET.Core/obj/x86/Debug/GMap.NET.Core.pdb
Binary file not shown.
Binary file not shown.
103 changes: 103 additions & 0 deletions WindowsForms/CustomMarkers/GMapMarkerCircle.cs
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
}
}
69 changes: 69 additions & 0 deletions WindowsForms/CustomMarkers/GMapMarkerRect.cs
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
}
}
20 changes: 20 additions & 0 deletions WindowsForms/Demo.WindowsForms.sln
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 added WindowsForms/Demo.WindowsForms.v11.suo
Binary file not shown.
Loading

0 comments on commit 084a355

Please sign in to comment.