Exemple #1
0
 public Log()
 {
     InitializeComponent();
     GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
     dc.Add(pnlHeader, lblCaption);
     btnClear.Click += (s, e) => rtbLog.Text = null;
 }
Exemple #2
0
 public MainForm()
 {
     InitializeComponent();
     Shown += (s, e) => GUIHelpers.Transitions.ShowForm(this, 1, 0.1, 10);
     GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
     dc.Add(pnlHeader);
     btnExit.Click += (s, e) => Process.GetCurrentProcess().Kill();
     SetHandlers();
     SetDefaults();
     btnImage.Click += (s, e) =>
     {
         for (int i = 0; i < 6; i++)
         {
             char[] arr = new char[6] {
                 '#', '#', '#', '#', '#', '#'
             };
             arr[i] = '@';
             C_CHAT packet = new C_CHAT();
             packet.Message    = $"<FONT>{new string(arr)}</FONT>";
             packet.TextOffset = 10;
             packet.Channel    = Tera.Core.Game.ChatChannel.Global;
             PacketController.Send(packet);
         }
     };
 }
Exemple #3
0
        public PacketInfoForm(RawPacket packet)
        {
            InitializeComponent();
            GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
            dc.Add(pnlHeader, lblCaption);
            btnExit.Click += (s, e) => Close();
            string opName = PacketController.Client.Processor.Serializer.Tables.Game.OpCodeToName[packet.OpCode];

            lblOpCode.Text = packet.OpCode.ToString();
            lblOpName.Text = opName;
            lblLength.Text = packet.Length.ToString();
            tbData.Text    = packet.Data.AsString(10000);
            PacketController.Client.Processor.Serializer.Info.TryGetValue(opName, out PacketReflectionInfo info);
            if (info != null)
            {
                pnlFields.Controls.Clear();
                using (TeraBinaryReader reader = new TeraBinaryReader(packet.GetPayloadData()))
                {
                    foreach (FieldInfo field in info.Fields)
                    {
                        FieldInfoControl ctrl = new FieldInfoControl(field.Name, reader.ReadString(field.FieldType))
                        {
                            Dock = DockStyle.Top
                        };
                        pnlFields.Controls.Add(ctrl);
                        ctrl.BringToFront();
                    }
                }
            }
        }
Exemple #4
0
 public SendDataForm()
 {
     InitializeComponent();
     GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
     dc.Add(pnlHeader, lblCaption);
     btnExit.Click             += (s, e) => Close();
     tbData.TextChanged        += tbData_TextChanged;
     btnSend.Click             += btnSend_Click;
     cbxDirection.SelectedIndex = 0;
 }
Exemple #5
0
 public SendPacketForm()
 {
     InitializeComponent();
     GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
     dc.Add(pnlHeader, lblCaption);
     btnExit.Click += (s, e) => Close();
     foreach (KeyValuePair <string, PacketReflectionInfo> kvp in PacketController.Client.Processor.Serializer.Info)
     {
         cbxOps.Items.Add(kvp.Value);
     }
     cbxOps.SelectedValueChanged += cbxOps_SelectedValueChanged;
     btnSend.Click += btnSend_Click;
 }
Exemple #6
0
 public MainForm()
 {
     dllPath = $"{currentFolder}\\{dllName}";
     InitializeComponent();
     Shown += (s, e) =>
     {
         GUIHelpers.Transitions.ShowForm(this, 0.96, 0.12, 10);
         tmrApplication.Start();
     };
     GUIHelpers.DragControl dc = new GUIHelpers.DragControl(this);
     dc.Add(this, lblCaption, lblHint);
     btnExit.Click += (s, e) => GUIHelpers.Transitions.HideForm(this, 0.12, 10, true);
     if (!File.Exists(dllPath))
     {
         SetStatus($"The file \"{dllName}\" is missing!", StatusType.Fail); return;
     }
     SetStatus($"Waiting for {processName}..", StatusType.Default);
 }