Ejemplo n.º 1
0
 private void Start()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UserMainWindow_Load(
            object sender, EventArgs e)
        {
            #region
            _AllFriends = new List <EntityTUser>();

            IconCollector.Init();

            _iconController._IconStatus.OnFlashEventHandler += new EventHandler(IconStatus_OnFlash);

            _FrmHandle = this.Handle.ToInt32();

            this.Text = string.Format(this.Text, Logon._User.userfullName);

            AsyncCallback callbak = new AsyncCallback(fillTreefriend);
            MethodInvoker gd      = new MethodInvoker(requestUserList);
            //异步请求中传入callback方法控制变化UI的最终结果?
            //其实上述方法应该返回bool类型,以确定返回登录是否成功。
            gd.BeginInvoke(callbak, gd);

            #endregion
        }