Beispiel #1
0
        private void tspSelectPayload_Edit_Click(object sender, EventArgs e)
        {
            frmSelect fSelect = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            int INDEX = fSelect.lsvSelect.SelectedIndices[0];


            frmPAYLOAD fPayloadSelect = new frmPAYLOAD();

            tPayLoad_Scenario otPayLoadScenario = tPayLoad_Scenario.byINDEX(INDEX);

            fPayloadSelect.tspPayload_NamePayload.Text = otPayLoadScenario.tPayLoadData.PayLoad_Name;

            fPayloadSelect.rtxtContent.Text = otPayLoadScenario.tPayLoadData.PayLoad_Content;


            if (fPayloadSelect.ShowDialog() == DialogResult.OK)
            {
                otPayLoadScenario.tPayLoadData.PayLoad_Name = fPayloadSelect.tspPayload_NamePayload.Text;

                otPayLoadScenario.tPayLoadData.PayLoad_Content = fPayloadSelect.rtxtContent.Text;

                otPayLoadScenario.SaveAndFlush();


                Update_LV(fSelect.lsvSelect);


                fSelect.lsvSelect.Items[INDEX].Focused = true;

                fSelect.lsvSelect.Items[INDEX].Selected = true;
            }
        }
Beispiel #2
0
        private void tspSelectPayload_Add_Click(object sender, EventArgs e)
        {
            frmSelect fSelect = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            frmPAYLOAD fPayloadSelect = new frmPAYLOAD();


            if (fPayloadSelect.ShowDialog() == DialogResult.OK)
            {
                tPayLoad_Scenario otPayLoadScenario = new tPayLoad_Scenario();

                otPayLoadScenario.tPayLoadData = new tPayLoadData();

                otPayLoadScenario.tPayLoadData.PayLoad_Name = fPayloadSelect.tspPayload_NamePayload.Text;

                otPayLoadScenario.tPayLoadData.PayLoad_Content = fPayloadSelect.rtxtContent.Text;

                otPayLoadScenario.SaveAndFlush();

                Update_LV(fSelect.lsvSelect);

                fSelect.lsvSelect.Items[fSelect.lsvSelect.Items.Count - 1].Focused = true;

                fSelect.lsvSelect.Items[fSelect.lsvSelect.Items.Count - 1].Selected = true;
            }
        }
        private void tspSelectHeader_Add_Click(object sender, EventArgs e)
        {
            frmSelect fHeaders = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            Add();

            Update_LV(fHeaders.lsvSelect);
        }
Beispiel #4
0
        private void tspSelectPayload_Del_Click(object sender, EventArgs e)
        {
            frmSelect fSelect = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            int i = fSelect.lsvSelect.SelectedIndices[0];

            tPayLoad_Scenario.byINDEX(i).DeleteAndFlush();

            Update_LV(fSelect.lsvSelect);
        }
        public void tspHeaderParams_btnHedears_Click(object sender, EventArgs e)
        {
            frmSelect fHeaders = new frmSelect();

            fHeaders.tspSelect_Dublicate.Visible = true;

            fHeaders.lsvSelect.Columns.Add("Name Header Template", 273);

            fHeaders.lsvSelect.Columns.Add("Parametrs", 462);

            Update_LV(fHeaders.lsvSelect);



            fHeaders.tspSelect_Add.Click += tspSelectHeader_Add_Click;

            fHeaders.tspSelect_Dublicate.Click += tspSelectHeader_Dublicate_Click;

            fHeaders.tspSelect_Del.Click += tspSelectHeader_Del_Click;

            fHeaders.tspSelect_Edit.Click += tspSelectHeader_Edit_Click;



            if (fHeaders.ShowDialog() == DialogResult.OK)
            {
                int i = fHeaders.lsvSelect.SelectedIndices[0];

                Update_CMB(fHeader_Template.tspHeaderParams_cmbHedearsNames);

                fHeader_Template.tspHeaderParams_cmbHedearsNames.SelectedItem =
                    fHeader_Template.tspHeaderParams_cmbHedearsNames.Items[i];
            }
            else
            {
                fHeader_Template.tspHeaderParams_cmbHedearsNames.Text = string.Empty;

                Update_CMB(fHeader_Template.tspHeaderParams_cmbHedearsNames);

                if (fHeader_Template.tspHeaderParams_cmbHedearsNames.Items.Count == 0)
                {
                    fHeader_Template.tspHeaderParams_cmbHedearsNames.Items.Clear();
                }
            }



            fHeaders.tspSelect_Add.Click -= tspSelectHeader_Add_Click;

            fHeaders.tspSelect_Dublicate.Click -= tspSelectHeader_Dublicate_Click;

            fHeaders.tspSelect_Del.Click -= tspSelectHeader_Del_Click;

            fHeaders.tspSelect_Edit.Click -= tspSelectHeader_Edit_Click;
        }
        private void tspSelectHeader_Del_Click(object sender, EventArgs e)
        {
            frmSelect fHeaders = (sender as ToolStripButton).Owner.FindForm() as frmSelect;


            Del(fHeaders.lsvSelect.SelectedIndices[0]);



            Update_LV(fHeaders.lsvSelect);
        }
        private void tspSelectHeader_Dublicate_Click(object sender, EventArgs e)
        {
            frmSelect fHeaders = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            Duplicate(fHeaders.lsvSelect.SelectedIndices[0]);

            Update_LV(fHeaders.lsvSelect);


            fHeaders.lsvSelect.Items[fHeaders.lsvSelect.Items.Count - 1].Selected = true;

            fHeaders.lsvSelect.Items[fHeaders.lsvSelect.Items.Count - 1].Focused = true;
        }
Beispiel #8
0
        public CServers()
        {
            fSelect = new frmSelect();

            fSelect.Text = "Servers";

            fSelect.lsvSelect.Columns.Add("Full Name", 734);

            fSelect.tspSelect_Add.Click += tspServers_Add_Click;

            fSelect.tspSelect_Del.Click += tspServers_Del_Click;

            fSelect.tspSelect_Edit.Click += tspServers_Edit_Click;
        }
Beispiel #9
0
        public void llblPAYLOAD_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmSelect fPayloadSelect = new frmSelect();

            fPayloadSelect.Text += "PAYLOAD SCENARIO";

            fPayloadSelect.lsvSelect.Columns.Add("Name PAYLOAD", 175);

            fPayloadSelect.lsvSelect.Columns.Add("Content PAYLOAD", 545);

            Update_LV(fPayloadSelect.lsvSelect);



            fPayloadSelect.tspSelect_Add.Click += tspSelectPayload_Add_Click;

            fPayloadSelect.tspSelect_Del.Click += tspSelectPayload_Del_Click;

            fPayloadSelect.tspSelect_Edit.Click += tspSelectPayload_Edit_Click;


            if (fPayloadSelect.ShowDialog() == DialogResult.OK)
            {
                int i = fPayloadSelect.lsvSelect.SelectedIndices[0];

                Update_CMD(fMain.cmbPAYLOAD);

                fMain.cmbPAYLOAD.SelectedItem = fMain.cmbPAYLOAD.Items[i];
            }
            else
            {
                fMain.cmbPAYLOAD.Text = string.Empty;

                Update_CMD(fMain.cmbPAYLOAD);

                if (fMain.cmbPAYLOAD.Items.Count == 0)
                {
                    fMain.cmbPAYLOAD.Items.Clear();
                }
            }



            fPayloadSelect.tspSelect_Add.Click -= tspSelectPayload_Add_Click;

            fPayloadSelect.tspSelect_Del.Click -= tspSelectPayload_Del_Click;

            fPayloadSelect.tspSelect_Edit.Click -= tspSelectPayload_Edit_Click;
        }
        private void tspSelectHeader_Edit_Click(object sender, EventArgs e)
        {
            frmSelect fHeaders = (sender as ToolStripButton).Owner.FindForm() as frmSelect;

            int i = fHeaders.lsvSelect.SelectedIndices[0];

            Edit(i);

            Update_LV(fHeaders.lsvSelect);


            fHeaders.lsvSelect.Items[i].Focused = true;

            fHeaders.lsvSelect.Items[i].Selected = true;
        }