當前位置: 首頁>>代碼示例>>C#>>正文


C# EventArgs.Equals方法代碼示例

本文整理匯總了C#中System.EventArgs.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# EventArgs.Equals方法的具體用法?C# EventArgs.Equals怎麽用?C# EventArgs.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.EventArgs的用法示例。


在下文中一共展示了EventArgs.Equals方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: listBox1_SelectedIndexChanged

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int local;

            if(e.Equals("One"))
            {
                Console.Write("True");
            }
        }
開發者ID:muledeerhunter73,項目名稱:Sorry,代碼行數:9,代碼來源:NewLocalForm.cs

示例2: OnLAuthStatusChanged

        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;
            }
        }
開發者ID:Rannasha,項目名稱:BTCT-AutoTransfer,代碼行數:35,代碼來源:BTCTC_MainWindow.cs

示例3: runToolStripMenuItem_Click

        //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;

//.........這裏部分代碼省略.........
開發者ID:WolfMan12333,項目名稱:PM4P,代碼行數:101,代碼來源:Form1.cs


注:本文中的System.EventArgs.Equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。