Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmSendData f = new frmSendData();
     DialogResult dr = f.ShowDialog();
     if (dr == DialogResult.OK)
     {
         SendItem item = f.SendItem;
         App.Default.Config.SendCollection.Add(item);
         AddSendItemToListView(item);
     }
 }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmSendData  f  = new frmSendData();
            DialogResult dr = f.ShowDialog();

            if (dr == DialogResult.OK)
            {
                SendItem item = f.SendItem;
                App.Default.Config.SendCollection.Add(item);
                AddSendItemToListView(item);
            }
        }
Пример #3
0
        void SendAdd_Click(object sender, EventArgs e)
        {
            byte[] bs;
            if (this.GetSendBytes(out bs))
            {
                SendItem item = new SendItem();

                item.Name  = HexStringConverter.Default.ConvertToObject(bs).ToString();
                item.Bytes = bs;

                frmSendData f = new frmSendData(item);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    this.SendCollection.Add(item);
                    CreateContextMenu();
                }
            }
        }
Пример #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            ListViewItem lvi = GetSelectedListViewItem();

            if (lvi == null)
            {
                SelectListViewItemFirst();
                return;
            }

            SendItem     item = lvi.Tag as SendItem;
            frmSendData  f    = new frmSendData(item);
            DialogResult dr   = f.ShowDialog();

            if (dr == DialogResult.OK)
            {
                lvi.Text = item.Name;
                string s = HexStringConverter.Default.ConvertToObject(item.Bytes).ToString();
                lvi.SubItems[1].Text = s;
            }
        }
Пример #5
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            ListViewItem lvi = GetSelectedListViewItem();
            if (lvi == null)
            {
                SelectListViewItemFirst();
                return;
            }

            SendItem item = lvi.Tag as SendItem;
            frmSendData f = new frmSendData(item);
            DialogResult dr = f.ShowDialog();

            if (dr == DialogResult.OK)
            {
                lvi.Text = item.Name;
                string s = HexStringConverter.Default.ConvertToObject(item.Bytes).ToString();
                lvi.SubItems[1].Text = s;
            }
        }
Пример #6
0
        void SendAdd_Click(object sender, EventArgs e)
        {
            byte[] bs ;
            if (this.GetSendBytes(out bs))
            {
                SendItem item = new SendItem();

                item.Name = HexStringConverter.Default.ConvertToObject(bs).ToString();
                item.Bytes = bs;

                frmSendData f = new frmSendData(item);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    this.SendCollection.Add(item);
                    CreateContextMenu();
                }
            }
        }