当前位置: 首页>>代码示例>>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;未经允许,请勿转载。