Advertisement
hood_c_hacker

Tinychat TinyTool by Gellin - Form-1-Decomp. Hood C Hacker

Feb 6th, 2012
2,254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 13.42 KB | None | 0 0
  1. // Type: TinyTool_SHARP.Form1
  2.  TinyTool_SHARP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  3.  
  4.  
  5. using FluorineFx.Messaging.Api.Service;
  6. using FluorineFx.Net;
  7. using System;
  8. using System.ComponentModel;
  9. using System.Diagnostics;
  10. using System.Drawing;
  11. using System.Windows.Forms;
  12. using System.Xml;
  13.  
  14. namespace TinyTool_SHARP
  15. {
  16.   public class Form1 : Form, IPendingServiceCallback
  17.   {
  18.     private NetConnection _netConnection;
  19.     private XmlTextReader _xmlReader;
  20.     private IContainer components;
  21.     private GroupBox GRP_BOX_CONN_CONFIG;
  22.     private Label LBL_ROOM_NAME;
  23.     private Label LBL_SERVER_IP;
  24.     private TextBox TXT_BOX_ROOM_NAME;
  25.     private TextBox TXT_BOX_SERVER_IP;
  26.     private TextBox TXT_BOX_SERVER_PORT;
  27.     private Label LBL_SERVER_PORT;
  28.     private GroupBox GRP_OPTIONS;
  29.     private Label LBL_COMMAND_ARG;
  30.     private Label LBL_COMMAND_NAME;
  31.     private Button BTN_DISCONNECT;
  32.     private Button BTN_CONNECT;
  33.     private TextBox TXT_BOX_CMD_ARG;
  34.     private TextBox TXT_BOX_COMMAND;
  35.     private LinkLabel LNK_LBL_SITE;
  36.     private Button BTN_RUN_CMD;
  37.     private TextBox TXT_BOX_CONN_NUM;
  38.     private Label DYN_LBL_STATUS;
  39.     private Label label1;
  40.  
  41.     public Form1()
  42.     {
  43.       this.InitializeComponent();
  44.     }
  45.  
  46.     private void Form1_Load(object sender, EventArgs e)
  47.     {
  48.       this._netConnection = new NetConnection();
  49.       this._netConnection.OnConnect += new ConnectHandler(this._netConnection_OnConnect);
  50.       this._netConnection.NetStatus += new NetStatusHandler(this._netConnection_NetStatus);
  51.       this._netConnection.OnDisconnect += new DisconnectHandler(this._netConnection_OnDisconnect);
  52.     }
  53.  
  54.     private void _netConnection_OnConnect(object sender, EventArgs e)
  55.     {
  56.       this.BTN_RUN_CMD.Enabled = true;
  57.       this.BTN_CONNECT.Enabled = false;
  58.       this.BTN_DISCONNECT.Enabled = true;
  59.       this.DYN_LBL_STATUS.Text = "Status: Connected";
  60.     }
  61.  
  62.     private void _netConnection_OnDisconnect(object sender, EventArgs e)
  63.     {
  64.       this.BTN_CONNECT.Enabled = true;
  65.       this.BTN_RUN_CMD.Enabled = false;
  66.       this.BTN_DISCONNECT.Enabled = false;
  67.       this.DYN_LBL_STATUS.Text = "Status: Disconnected";
  68.     }
  69.  
  70.     private void _netConnection_NetStatus(object sender, NetStatusEventArgs e)
  71.     {
  72.       if (!(e.Info["level"] as string == "error"))
  73.         return;
  74.       this.DYN_LBL_STATUS.Text = "Status: Error Connecting";
  75.     }
  76.  
  77.     private void BTN_CONNECT_Click(object sender, EventArgs e)
  78.     {
  79.       if (!(this.TXT_BOX_ROOM_NAME.Text != ""))
  80.         return;
  81.       try
  82.       {
  83.         int num = Convert.ToInt32(this.TXT_BOX_CONN_NUM.Text);
  84.         if (num > 0)
  85.         {
  86.           string[] strArray = new string[4]
  87.           {
  88.             this.TXT_BOX_ROOM_NAME.Text,
  89.             "none",
  90.             "show",
  91.             "tinychat"
  92.           };
  93.           this._xmlReader = new XmlTextReader("http://tinychat.com/api/find.room/" + this.TXT_BOX_ROOM_NAME.Text);
  94.           this._xmlReader.Read();
  95.           string attribute = this._xmlReader.GetAttribute("rtmp");
  96.           for (int index = 0; index < num; ++index)
  97.             this._netConnection.Connect(attribute, (object[]) strArray);
  98.         }
  99.         else
  100.           this.DYN_LBL_STATUS.Text = "Status: Connection Number Must be ( > 0 )";
  101.       }
  102.       catch (OverflowException ex)
  103.       {
  104.         this.DYN_LBL_STATUS.Text = "Status: Connection Number Larger then INT32";
  105.       }
  106.       catch (FormatException ex)
  107.       {
  108.         this.DYN_LBL_STATUS.Text = "Status: Improper Connection Number Format";
  109.       }
  110.     }
  111.  
  112.     private void BTN_DISCONNECT_Click(object sender, EventArgs e)
  113.     {
  114.       this._netConnection.Close();
  115.     }
  116.  
  117.     private void BTN_RUN_CMD_Click(object sender, EventArgs e)
  118.     {
  119.       if (!(this.TXT_BOX_COMMAND.Text != "") || !(this.TXT_BOX_CMD_ARG.Text != "") || this.BTN_CONNECT.Enabled)
  120.         return;
  121.       this._netConnection.Call(this.TXT_BOX_COMMAND.Text, (IPendingServiceCallback) this, new object[1]
  122.       {
  123.         (object) this.TXT_BOX_CMD_ARG.Text
  124.       });
  125.     }
  126.  
  127.     private void LNK_LBL_SITE_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  128.     {
  129.       Process.Start("");
  130.     }
  131.  
  132.     public void ResultReceived(IPendingServiceCall call)
  133.     {
  134.     }
  135.  
  136.     protected override void Dispose(bool disposing)
  137.     {
  138.       if (disposing && this.components != null)
  139.         this.components.Dispose();
  140.       base.Dispose(disposing);
  141.     }
  142.  
  143.     private void InitializeComponent()
  144.     {
  145.       ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (Form1));
  146.       this.GRP_BOX_CONN_CONFIG = new GroupBox();
  147.       this.TXT_BOX_SERVER_PORT = new TextBox();
  148.       this.LBL_SERVER_PORT = new Label();
  149.       this.TXT_BOX_SERVER_IP = new TextBox();
  150.       this.LBL_SERVER_IP = new Label();
  151.       this.TXT_BOX_ROOM_NAME = new TextBox();
  152.       this.LBL_ROOM_NAME = new Label();
  153.       this.GRP_OPTIONS = new GroupBox();
  154.       this.DYN_LBL_STATUS = new Label();
  155.       this.BTN_RUN_CMD = new Button();
  156.       this.TXT_BOX_CMD_ARG = new TextBox();
  157.       this.TXT_BOX_COMMAND = new TextBox();
  158.       this.LBL_COMMAND_ARG = new Label();
  159.       this.LBL_COMMAND_NAME = new Label();
  160.       this.BTN_CONNECT = new Button();
  161.       this.BTN_DISCONNECT = new Button();
  162.       this.LNK_LBL_SITE = new LinkLabel();
  163.       this.TXT_BOX_CONN_NUM = new TextBox();
  164.       this.label1 = new Label();
  165.       this.GRP_BOX_CONN_CONFIG.SuspendLayout();
  166.       this.GRP_OPTIONS.SuspendLayout();
  167.       this.SuspendLayout();
  168.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.TXT_BOX_SERVER_PORT);
  169.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.LBL_SERVER_PORT);
  170.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.TXT_BOX_SERVER_IP);
  171.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.LBL_SERVER_IP);
  172.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.TXT_BOX_ROOM_NAME);
  173.       this.GRP_BOX_CONN_CONFIG.Controls.Add((Control) this.LBL_ROOM_NAME);
  174.       this.GRP_BOX_CONN_CONFIG.Location = new Point(8, 8);
  175.       this.GRP_BOX_CONN_CONFIG.Name = "GRP_BOX_CONN_CONFIG";
  176.       this.GRP_BOX_CONN_CONFIG.Size = new Size(264, 104);
  177.       this.GRP_BOX_CONN_CONFIG.TabIndex = 0;
  178.       this.GRP_BOX_CONN_CONFIG.TabStop = false;
  179.       this.GRP_BOX_CONN_CONFIG.Text = "Connection Config";
  180.       this.TXT_BOX_SERVER_PORT.Enabled = false;
  181.       this.TXT_BOX_SERVER_PORT.Location = new Point(80, 48);
  182.       this.TXT_BOX_SERVER_PORT.Name = "TXT_BOX_SERVER_PORT";
  183.       this.TXT_BOX_SERVER_PORT.Size = new Size(176, 20);
  184.       this.TXT_BOX_SERVER_PORT.TabIndex = 5;
  185.       this.TXT_BOX_SERVER_PORT.Text = "443";
  186.       this.LBL_SERVER_PORT.AutoSize = true;
  187.       this.LBL_SERVER_PORT.Location = new Point(8, 48);
  188.       this.LBL_SERVER_PORT.Name = "LBL_SERVER_PORT";
  189.       this.LBL_SERVER_PORT.Size = new Size(63, 13);
  190.       this.LBL_SERVER_PORT.TabIndex = 4;
  191.       this.LBL_SERVER_PORT.Text = "Server Port:";
  192.       this.TXT_BOX_SERVER_IP.Enabled = false;
  193.       this.TXT_BOX_SERVER_IP.Location = new Point(80, 24);
  194.       this.TXT_BOX_SERVER_IP.Name = "TXT_BOX_SERVER_IP";
  195.       this.TXT_BOX_SERVER_IP.Size = new Size(176, 20);
  196.       this.TXT_BOX_SERVER_IP.TabIndex = 3;
  197.       this.TXT_BOX_SERVER_IP.Text = "rtmp://174.122.203.146";
  198.       this.LBL_SERVER_IP.AutoSize = true;
  199.       this.LBL_SERVER_IP.Location = new Point(8, 24);
  200.       this.LBL_SERVER_IP.Name = "LBL_SERVER_IP";
  201.       this.LBL_SERVER_IP.Size = new Size(54, 13);
  202.       this.LBL_SERVER_IP.TabIndex = 2;
  203.       this.LBL_SERVER_IP.Text = "Server IP:";
  204.       this.TXT_BOX_ROOM_NAME.Location = new Point(80, 72);
  205.       this.TXT_BOX_ROOM_NAME.Name = "TXT_BOX_ROOM_NAME";
  206.       this.TXT_BOX_ROOM_NAME.Size = new Size(176, 20);
  207.       this.TXT_BOX_ROOM_NAME.TabIndex = 1;
  208.       this.TXT_BOX_ROOM_NAME.Text = "gellin";
  209.       this.LBL_ROOM_NAME.AutoSize = true;
  210.       this.LBL_ROOM_NAME.Location = new Point(8, 72);
  211.       this.LBL_ROOM_NAME.Name = "LBL_ROOM_NAME";
  212.       this.LBL_ROOM_NAME.Size = new Size(69, 13);
  213.       this.LBL_ROOM_NAME.TabIndex = 0;
  214.       this.LBL_ROOM_NAME.Text = "Room Name:";
  215.       this.GRP_OPTIONS.Controls.Add((Control) this.DYN_LBL_STATUS);
  216.       this.GRP_OPTIONS.Controls.Add((Control) this.BTN_RUN_CMD);
  217.       this.GRP_OPTIONS.Controls.Add((Control) this.TXT_BOX_CMD_ARG);
  218.       this.GRP_OPTIONS.Controls.Add((Control) this.TXT_BOX_COMMAND);
  219.       this.GRP_OPTIONS.Controls.Add((Control) this.LBL_COMMAND_ARG);
  220.       this.GRP_OPTIONS.Controls.Add((Control) this.LBL_COMMAND_NAME);
  221.       this.GRP_OPTIONS.Location = new Point(8, 120);
  222.       this.GRP_OPTIONS.Name = "GRP_OPTIONS";
  223.       this.GRP_OPTIONS.Size = new Size(264, 128);
  224.       this.GRP_OPTIONS.TabIndex = 1;
  225.       this.GRP_OPTIONS.TabStop = false;
  226.       this.GRP_OPTIONS.Text = "Options";
  227.       this.DYN_LBL_STATUS.AutoSize = true;
  228.       this.DYN_LBL_STATUS.Location = new Point(8, 104);
  229.       this.DYN_LBL_STATUS.Name = "DYN_LBL_STATUS";
  230.       this.DYN_LBL_STATUS.Size = new Size(109, 13);
  231.       this.DYN_LBL_STATUS.TabIndex = 7;
  232.       this.DYN_LBL_STATUS.Text = "Status: Disconnected";
  233.       this.BTN_RUN_CMD.Enabled = false;
  234.       this.BTN_RUN_CMD.Location = new Point(72, 72);
  235.       this.BTN_RUN_CMD.Name = "BTN_RUN_CMD";
  236.       this.BTN_RUN_CMD.Size = new Size(120, 24);
  237.       this.BTN_RUN_CMD.TabIndex = 6;
  238.       this.BTN_RUN_CMD.Text = "Run Command";
  239.       this.BTN_RUN_CMD.UseVisualStyleBackColor = true;
  240.       this.BTN_RUN_CMD.Click += new EventHandler(this.BTN_RUN_CMD_Click);
  241.       this.TXT_BOX_CMD_ARG.Location = new Point(72, 48);
  242.       this.TXT_BOX_CMD_ARG.Name = "TXT_BOX_CMD_ARG";
  243.       this.TXT_BOX_CMD_ARG.Size = new Size(184, 20);
  244.       this.TXT_BOX_CMD_ARG.TabIndex = 5;
  245.       this.TXT_BOX_CMD_ARG.Text = "test";
  246.       this.TXT_BOX_COMMAND.Location = new Point(72, 24);
  247.       this.TXT_BOX_COMMAND.Name = "TXT_BOX_COMMAND";
  248.       this.TXT_BOX_COMMAND.Size = new Size(184, 20);
  249.       this.TXT_BOX_COMMAND.TabIndex = 4;
  250.       this.TXT_BOX_COMMAND.Text = "nick";
  251.       this.LBL_COMMAND_ARG.AutoSize = true;
  252.       this.LBL_COMMAND_ARG.Location = new Point(8, 48);
  253.       this.LBL_COMMAND_ARG.Name = "LBL_COMMAND_ARG";
  254.       this.LBL_COMMAND_ARG.Size = new Size(53, 13);
  255.       this.LBL_COMMAND_ARG.TabIndex = 3;
  256.       this.LBL_COMMAND_ARG.Text = "CMD Arg:";
  257.       this.LBL_COMMAND_NAME.AutoSize = true;
  258.       this.LBL_COMMAND_NAME.Location = new Point(8, 24);
  259.       this.LBL_COMMAND_NAME.Name = "LBL_COMMAND_NAME";
  260.       this.LBL_COMMAND_NAME.Size = new Size(57, 13);
  261.       this.LBL_COMMAND_NAME.TabIndex = 2;
  262.       this.LBL_COMMAND_NAME.Text = "Command:";
  263.       this.BTN_CONNECT.Location = new Point(8, 256);
  264.       this.BTN_CONNECT.Name = "BTN_CONNECT";
  265.       this.BTN_CONNECT.Size = new Size(104, 24);
  266.       this.BTN_CONNECT.TabIndex = 0;
  267.       this.BTN_CONNECT.Text = "Connect";
  268.       this.BTN_CONNECT.UseVisualStyleBackColor = true;
  269.       this.BTN_CONNECT.Click += new EventHandler(this.BTN_CONNECT_Click);
  270.       this.BTN_DISCONNECT.Enabled = false;
  271.       this.BTN_DISCONNECT.Location = new Point(168, 256);
  272.       this.BTN_DISCONNECT.Name = "BTN_DISCONNECT";
  273.       this.BTN_DISCONNECT.Size = new Size(104, 24);
  274.       this.BTN_DISCONNECT.TabIndex = 1;
  275.       this.BTN_DISCONNECT.Text = "Disconnect";
  276.       this.BTN_DISCONNECT.UseVisualStyleBackColor = true;
  277.       this.BTN_DISCONNECT.Click += new EventHandler(this.BTN_DISCONNECT_Click);
  278.       this.LNK_LBL_SITE.AutoSize = true;
  279.       this.LNK_LBL_SITE.Location = new Point(91, 296);
  280.       this.LNK_LBL_SITE.Name = "LNK_LBL_SITE";
  281.       this.LNK_LBL_SITE.Size = new Size(98, 13);
  282.       this.LNK_LBL_SITE.TabIndex = 2;
  283.       this.LNK_LBL_SITE.TabStop = true;
  284.       this.LNK_LBL_SITE.Text = "www.uc-forum.com";
  285.       this.LNK_LBL_SITE.LinkClicked += new LinkLabelLinkClickedEventHandler(this.LNK_LBL_SITE_LinkClicked);
  286.       this.TXT_BOX_CONN_NUM.Location = new Point(120, 256);
  287.       this.TXT_BOX_CONN_NUM.MaxLength = 5;
  288.       this.TXT_BOX_CONN_NUM.Name = "TXT_BOX_CONN_NUM";
  289.       this.TXT_BOX_CONN_NUM.Size = new Size(40, 20);
  290.       this.TXT_BOX_CONN_NUM.TabIndex = 3;
  291.       this.TXT_BOX_CONN_NUM.Text = "1";
  292.       this.TXT_BOX_CONN_NUM.TextAlign = HorizontalAlignment.Center;
  293.       this.label1.AutoSize = true;
  294.       this.label1.Location = new Point(88, 280);
  295.       this.label1.Name = "label1";
  296.       this.label1.Size = new Size(105, 13);
  297.       this.label1.TabIndex = 4;
  298.       this.label1.Text = "Developed by: Gellin";
  299.       this.AutoScaleDimensions = new SizeF(6f, 13f);
  300.       this.AutoScaleMode = AutoScaleMode.Font;
  301.       this.ClientSize = new Size(281, 314);
  302.       this.Controls.Add((Control) this.label1);
  303.       this.Controls.Add((Control) this.TXT_BOX_CONN_NUM);
  304.       this.Controls.Add((Control) this.LNK_LBL_SITE);
  305.       this.Controls.Add((Control) this.GRP_OPTIONS);
  306.       this.Controls.Add((Control) this.GRP_BOX_CONN_CONFIG);
  307.       this.Controls.Add((Control) this.BTN_CONNECT);
  308.       this.Controls.Add((Control) this.BTN_DISCONNECT);
  309.       this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
  310.       this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
  311.       this.MaximizeBox = false;
  312.       this.MinimizeBox = false;
  313.       this.Name = "Form1";
  314.       this.Text = "     .:: TinyChat RTMP FlourineFX Testing Tool ::.";
  315.       this.Load += new EventHandler(this.Form1_Load);
  316.       this.GRP_BOX_CONN_CONFIG.ResumeLayout(false);
  317.       this.GRP_BOX_CONN_CONFIG.PerformLayout();
  318.       this.GRP_OPTIONS.ResumeLayout(false);
  319.       this.GRP_OPTIONS.PerformLayout();
  320.       this.ResumeLayout(false);
  321.       this.PerformLayout();
  322.     }
  323.   }
  324. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement