68 lines
2.4 KiB
C#
68 lines
2.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|||
|
|
// Type: Raton.Handlers.HandleServices
|
||
|
|
// 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 Raton.Forms.ClientForms.Monitor;
|
||
|
|
using Server.Connection;
|
||
|
|
using Stuff;
|
||
|
|
using System;
|
||
|
|
using System.Drawing;
|
||
|
|
using System.Windows.Forms;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
namespace Raton.Handlers;
|
||
|
|
|
||
|
|
internal class HandleServices
|
||
|
|
{
|
||
|
|
public HandleServices(SillyClient sillyClient, Unpack unpack)
|
||
|
|
{
|
||
|
|
ratonServices form = (ratonServices) Application.OpenForms["Services | Client ID: " + unpack.GetAsString("UID")];
|
||
|
|
if (form == null)
|
||
|
|
return;
|
||
|
|
if (form.SillyClient == null)
|
||
|
|
form.SillyClient = sillyClient;
|
||
|
|
form.Invoke((Delegate) (() =>
|
||
|
|
{
|
||
|
|
switch (unpack.GetAsString("Command"))
|
||
|
|
{
|
||
|
|
case "List":
|
||
|
|
string[] strArray = unpack.GetAsString("Services").Split(new string[1]
|
||
|
|
{
|
||
|
|
"-=>"
|
||
|
|
}, StringSplitOptions.None);
|
||
|
|
form.aeroListView1.Items.Clear();
|
||
|
|
form.aeroListView1.BeginUpdate();
|
||
|
|
for (int index = 0; index < strArray.Length - 1; index = index + 3 + 1)
|
||
|
|
form.aeroListView1.Items.Add(new ListViewItem()
|
||
|
|
{
|
||
|
|
Text = strArray[index],
|
||
|
|
SubItems = {
|
||
|
|
strArray[index + 1],
|
||
|
|
strArray[index + 2],
|
||
|
|
strArray[index + 3]
|
||
|
|
},
|
||
|
|
Tag = (object) strArray[index],
|
||
|
|
ImageIndex = 0
|
||
|
|
});
|
||
|
|
form.aeroListView1.EndUpdate();
|
||
|
|
form.label1.Visible = false;
|
||
|
|
form.aeroListView1.Visible = true;
|
||
|
|
break;
|
||
|
|
case "StartResult":
|
||
|
|
case "StopResult":
|
||
|
|
string asString1 = unpack.GetAsString("Name");
|
||
|
|
string asString2 = unpack.GetAsString("Error");
|
||
|
|
if (!string.IsNullOrEmpty(asString2))
|
||
|
|
{
|
||
|
|
Program.form2.AddErrorLog((object) $"{unpack.GetAsString("Command").Replace("Result", "")} FAIL ({asString1}): {asString2}", (object) Color.IndianRed);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
Program.form2.AddSuccessLog((object) $"{unpack.GetAsString("Command").Replace("Result", "")} OK: {asString1}", (object) Color.LightGreen);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}));
|
||
|
|
}
|
||
|
|
}
|