private void button4_Click(object sender, EventArgs e)
 {
     MessageBox.Show("Я супермегакнопка,\nі цього мене не позбавиш!");
     DelegateButton[] buttons = new DelegateButton[] { button1_Click, button2_Click, button3_Click };
     if (checkBox1.Checked == true)
     {
         buttons[0](sender, e);
     }
     if (checkBox2.Checked == true)
     {
         buttons[1](sender, e);
     }
     if (checkBox3.Checked == true)
     {
         buttons[2](sender, e);
     }
 }
 public ExtendedButton(Rect r, Texture down, Texture up, Texture disableDown, Texture disableUp, DelegateButton delega, bool bKeepSt = true, int shadowDist = 1)
     : base(r,down,up,disableDown,disableUp,bKeepSt)
 {
     mMoveX = new SmoothStep(r.x, r.x, 1.0f, false);
     mMoveY = new SmoothStep(r.y, r.y, 1.0f, false);
     //mAlpha=1.0f;
     mFade = new SmoothStep(1.0f, 1.0f, 1.0f, false);
     mSizeX = new SmoothStep(r.width, r.width, 1.0f, false);
     mSizeY = new SmoothStep(r.height, r.height, 1.0f, false);
     mDelegate = delega;
     LimitAlphaUpdate = -1;
     ShadowDist=shadowDist;
 }
 public TextButton(Rect r, Texture down, Texture up, Texture disableDown, Texture disableUp, DelegateButton delega, Font font, bool bKeepSt = true, int shadowDist = 1)
     : base(r,down,up,disableDown,disableUp, delega, bKeepSt, shadowDist)
 {
     mStyle = new GUIStyle();
     mStyle.font = font;
     mStyle.clipping = TextClipping.Clip;
     mStyle.wordWrap = true;
     mStyle.fontSize = 10;
     mStyle.alignment = TextAnchor.MiddleCenter;
     mStyle.fontStyle = FontStyle.Normal;
     mStyle.normal.textColor = Color.black;
     mTextColor = Color.black;
     mTextOffset = Vector2.zero;
     mText = "";
     mTextOffsetSpaces = 0;
 }
 public InputText(Rect r, Texture down, Texture up, Texture disableDown, Texture disableUp, DelegateButton delega, Font font, Texture Indicator, string emptyText, bool bKeepSt = false, int shadowDist = 1)
     : base(r,down,up,disableDown,disableUp, delega, font, bKeepSt, shadowDist)
 {
     mSelected = false;
     mDrawIndicator = false;
     mIndicatorTexture = (Texture2D)Indicator;
     mIndicatorRect = new Rect(0, 0, 2, 0);
     UpdateIndicatorSize();
     UpdateIndicatorPos();
     mEmptyText = emptyText;
     mMaxLength = -1;
     mStyle.wordWrap = false;
     mIndicatorPos = 0;
     //#if UNITY_IPHONE || UNITY_ANDROID
     mOldInput = "";
     //#endif
 }
Exemple #5
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public UDPScan()
        {
            InitializeComponent();
            //当前要扫描的IP地址
            string      HostName = Dns.GetHostName();          //得到主机名
            IPHostEntry IpEntry  = Dns.GetHostEntry(HostName); //得到主机IP
            int         ii       = 0;

            for (; ii < IpEntry.AddressList.Length; ii++)
            {
                if (IpEntry.AddressList[ii].AddressFamily == AddressFamily.InterNetwork)
                {
                    break;
                }
            }
            tbipFrom.Text           = IpEntry.AddressList[ii].ToString();
            this.m_delegateFunction = new DelegateFunction(subFunctionUDP);
            this.but_delegate       = new DelegateButton(but_Protect);
        }