示例#1
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            msg4u newMsg = new msg4u();

            newMsg.Create(Utils.getSeries(cb_method.SelectedIndex), "VarNew_" + rnd.Next(824, 9000), "", true);

            Program.mainPP.addSelectedfile(newMsg.GetMSGData());
            Program.mainXBB.setSelectedfile(cb_xbb.SelectedIndex, Program.mainPP.Data);
            RefreshLViewList((int)Program.mainPP.Count - 2);
        }
示例#2
0
        private void ip_mes_tx_changed(object sender, FastColoredTextBoxNS.TextChangedEventArgs e)
        {
            if (Program.mainMSG != null)
            {
                lb_txcount_0.Text = ip_mes.Text.Length + checknum(ip_mes.Text.Length - Program.mainMSG.GetTextSection().Length) + " character";


                msg4u mainMSG0 = new msg4u();

                if (cb_method.SelectedIndex == 2)
                {
                    mainMSG0.Create(Utils.getSeries(cb_method.SelectedIndex), ip_var.Text, ip_mes.Text, true);


                    textBox1.Text = BitConverter.ToInt32(mainMSG0.GetEUSection(), 0) + "";
                    textBox2.Text = Program.mainMSG.isHaveMessage + "";
                }
                else
                {
                    mainMSG0.Create(Utils.getSeries(cb_method.SelectedIndex), ip_var.Text, ip_mes.Text, true);
                    textBox1.Text = "";
                    textBox2.Text = Program.mainMSG.isHaveMessage + "";
                }

                DynamicFileByteProvider dynamicFileByteProvider = null;

                try
                {
                    dynamicFileByteProvider = new DynamicFileByteProvider(new MemoryStream(mainMSG0.GetMSGData()));
                }
                catch
                {
                }

                ip_hexview.ByteProvider = dynamicFileByteProvider;

                lb_txpos_0.Text = "Position: " + ip_mes.SelectionStart + " | " + ip_mes.LinesCount + " Line | " + mainMSG0.GetMSGData().Length + "/" + Program.mainMSG.GetMSGData().Length + " byte";
            }
        }