Пример #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int local;

            if(e.Equals("One"))
            {
                Console.Write("True");
            }
        }
Пример #2
0
        /// <summary>
        /// Action to be taken at a Link submit action)
        /// </summary>
        /// <param name="sender"> The associated sender components</param>
        /// <param name="e"> The associated event arguments</param>
        public void wtlnkSort_Click(object sender, System.EventArgs e)
        {
            ObjectKey oldCurrentESpaceKey = heContext.CurrentESpaceKey;

            try {
                heContext.CurrentESpaceKey = ssContactManager.Global.eSpaceKey;
                if (IsAjaxRequest && e.Equals(EventArgs.Empty) && ((OSPage)Page).TriggersBubbleUpEvents((Control)sender))
                {
                    return;
                }
                ((IWebScreen)((System.Web.UI.Control)sender).Page).OnSubmit(((IParentEditRecordProp)sender).GetParentEditRecordClientId(), false);
                if (Commandsort(heContext))
                {
                    doAJAXRefreshScreen(heContext);
                }
            } finally {
                heContext.CurrentESpaceKey = oldCurrentESpaceKey;
            }
        }
        private void OnLAuthStatusChanged(object sender, EventArgs e)
        {
            AuthStatusChangedEventArgs ea;

            if (e.Equals(EventArgs.Empty))
            {
                ea = new AuthStatusChangedEventArgs(AuthStatusType.AS_NONE);
            }
            else
            {
                ea = (AuthStatusChangedEventArgs)e;
            }

            switch (ea.AuthStatus)
            {
                case AuthStatusType.AS_NONE:
                    btnLConnect.Enabled = true;
                    btnLAuth.Enabled = false;
                    tbLVerifier.ReadOnly = true;
                    tbLAuthStatus.Text = "None";
                    break;
                case AuthStatusType.AS_REQRCV:
                    btnLConnect.Enabled = true;
                    btnLAuth.Enabled = true;
                    tbLVerifier.ReadOnly = false;
                    tbLAuthStatus.Text = "Req-rcv";
                    break;
                case AuthStatusType.AS_OK:
                    btnLConnect.Enabled = false;
                    btnLAuth.Enabled = false;
                    tbLVerifier.ReadOnly = true;
                    tbLAuthStatus.Text = "Authorized";
                    break;
            }
        }
Пример #4
0
        //obsługa zdarzeń z przycisku run w menu kontekstowym i skrócie
        private void runToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PassMaker pm = new PassMaker();
            DataFromWeb dfw = new DataFromWeb();

            string text;
            int[] tabc = new int[2];

            if (twolimitsbox.Text.Equals("") && twolimitsbox.Visible == true)
                MessageBox.Show("Limits box is empty, give a limits", "Wrong value of Limits Box!!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else if (twolimitsbox.Visible == true && twolimitsbox.Text != "" && onelimitbox.Visible == false)
            {
                //for limits from min to max
                int txtsize = twolimitsbox.Text.Length;
                text = twolimitsbox.Text;

                string[] split = text.Split(new Char[] { ':' });
                tabc[0] = Int32.Parse(split[0]);
                tabc[1] = Int32.Parse(split[1]);

                int minlim;
                int maxlim;

                minlim = tabc[0];
                maxlim = tabc[1];
                //***************************************************
                //dane.Text = pm.MakingPassword2(maxlim, minlim, dane.Text.Length, dane.Text);    //maxlim - max limit, minlim - min limit, dane.Text.Length - ilość znaków
                pm.getparam2(maxlim, minlim, dane.Text.Length, dane.Text);
                pm.runfunction2();
                dane.Text = pm.retvalue2();
            }
            else if (onelimitbox.Text.Equals("") && onelimitbox.Visible)
                MessageBox.Show("Limit box is empty, give a limit.", "Wrong value of Limit Box!!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else if (onelimitbox.Visible == true && onelimitbox.Text != "" && twolimitsbox.Visible == false)
            {
                text = onelimitbox.Text;

                tabc[0] = Int32.Parse(text);

                //dane.Text = pm.MakingPassword(tabc[0], dane.Text.Length, dane.Text);
                pm.getparam(tabc[0], dane.Text.Length, dane.Text);
                pm.runfunction();
                dane.Text = pm.retvalue();
            }
            /*else if ((onelimitbox.Visible == false && twolimitsbox.Visible == false) || LinktxtBox.Visible == false)
                MessageBox.Show("You must choose one of two limits boxes in Options or link box.", "Error!!!", MessageBoxButtons.OK, MessageBoxIcon.Error);*/
            else if (onelimitbox.Visible == true && Int32.Parse(onelimitbox.Text) > 6 && twolimitsbox.Visible == false)
            {
                MessageBox.Show("Limit box is high and will get a lot of memory!!!", "High value of limit!!!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                if (e.Equals(MessageBoxButtons.OK))
                {
                    //user know's a problem and get a responsibility for that
                    text = onelimitbox.Text;

                    tabc[0] = Int32.Parse(text);

                    //dane.Text = pm.MakingPassword(tabc[0], dane.Text.Length, dane.Text);
                    pm.getparam(tabc[0], dane.Text.Length, dane.Text);
                    pm.runfunction();
                    dane.Text = pm.retvalue();
                }
                //he choose cancel
            }
            else if (twolimitsbox.Visible == true && Int32.Parse(twolimitsbox.Text) > 6 && onelimitbox.Visible == false)
            {
                MessageBox.Show("Limit box is high and will get a lot of memory!!!", "High value of limit!!!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                if (e.Equals(MessageBoxButtons.OK))
                {
                    //for limits from min to max
                    int txtsize = twolimitsbox.Text.Length;
                    text = twolimitsbox.Text;

                    string[] split = text.Split(new Char[] { ':' });
                    tabc[0] = Int32.Parse(split[0]);
                    tabc[1] = Int32.Parse(split[1]);

                    int minlim;
                    int maxlim;

                    minlim = tabc[0];
                    maxlim = tabc[1];
                    //***************************************************
                    //user know's a problem and get a responsibility for that
                    //dane.Text = pm.MakingPassword2(maxlim, minlim, dane.Text.Length, dane.Text);    //maxlim - max limit, minlim - min limit, dane.Text.Length - ilość znaków
                    pm.getparam2(maxlim, minlim, dane.Text.Length, dane.Text);
                    pm.runfunction2();
                    dane.Text = pm.retvalue2();
                }
                //he choose cancel
            }
            else if (Linklbl.Visible == true)
                dane.Text = dfw.HSD(LinktxtBox.Text);
            else if (Linklbl.Visible == true && Linklbl.Text.Equals(""))
                MessageBox.Show("The box value is empty or has bad value! Please try again.", "Bad value or empty box!!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else if (URLTargettxtbox.Visible == true && URLTargettxtbox.Text != "")
            {
                DosDDos dds = new DosDDos();
                string target = URLTargettxtbox.Text;

                dds.getparam(dane.Text, URLTargettxtbox.Text);
                dane.Text += dds.runfunction();
            }
            else if (iptxtbox.Visible == true && iptxtbox.Text != "" && porttextbox.Text != "" && pathfiletxtbox.Text != "")
            {
                DoSUDP dudp = new DoSUDP();
                dudp.getparam(pathfiletxtbox.Text, iptxtbox.Text, Int32.Parse(porttextbox.Text), dane.Text);
                dane.Text += dudp.runfunction();
            }
            else if (URLtxtbox2.Visible == true && URLtxtbox2.Text != "")
            {
                DDoS2 dds = new DDoS2();

                dds.getparam(dane.Text, URLtxtbox2.Text);
                dane.Text += dds.runfunction();
            }
            else if(IPSYNATTtxtbox.Visible == true && IPSYNATTtxtbox.Text != "" && PORTSYNATTtxtbox.Visible == true && PORTSYNATTtxtbox.Text != "")
            {
                DoS3 ds = new DoS3();

                ds.getparam(IPSYNATTtxtbox.Text, Int32.Parse(PORTSYNATTtxtbox.Text), dane.Text);
                dane.Text += ds.runfunction();
            }
            else if(lbllinkcp.Visible == true && txtbxcplink.Visible == true && txtbxcplink.Text != "")
            {
                CPWS cpws = new CPWS();

                dane.Text = cpws.copywebsite(txtbxcplink.Text);
            }
        }