コード例 #1
0
        private void GetSigninData_DoAction(SigninData sid)
        {
            //先判斷是否要invoke
            if (this.Dispatcher.CheckAccess() == false)
            {
                // 這裡是下載事件處理,優先權設定為ContextIdle => 列舉值為 3。 幕後作業完成後,會處理作業。
                this.Dispatcher.BeginInvoke(new Action <SigninData>(GetSigninData_DoAction), sid);
            }
            else
            {
                if (sid != null)
                {
                    Task.Factory.StartNew(() =>
                    {
                        this.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            foreach (SigninDataUser item in sid.UserList)
                            {
                                //SignRoom sg = new SignRoom(item, this.Home_ChangeTogSignPadCT_Event, this.Home_GoBackTogSignPictureCT_Event);
                                SignRoom sg = new SignRoom(item, this.Home_ChangeTogSignPadCT_Event);
                                SignRoomWP.Children.Add(sg);
                            }
                        }));
                    });
                }
                else
                {
                    AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
                }

                MouseTool.ShowArrow();
            }
        }
コード例 #2
0
 public void _003CGetSigninData_DoAction_003Eb__4()
 {
     SigninDataUser[] userList = sid.UserList;
     foreach (SigninDataUser signinDataUser in userList)
     {
         SignRoom element = new SignRoom(signinDataUser, _003C_003E4__this.Home_ChangeTogSignPadCT_Event);
         _003C_003E4__this.SignRoomWP.Children.Add(element);
     }
 }