Пример #1
0
        void item4_1_MouseUp(object sender, MouseButtonEventArgs e)
        {
            selectGrid.Children.Clear();
            PictureControl innerControl = new PictureControl();

            innerControl.InitVideoList(iconInfoList);
            selectGrid.Children.Add(innerControl);
        }
Пример #2
0
        void item4_MouseUp(object sender, MouseButtonEventArgs e)
        {
            contentsGrid.Children.Clear();
            PictureControl pictureControl = new PictureControl();

            pictureControl.button4.Visibility = Visibility.Hidden;
            pictureControl.InitVideoList(selUserDetail.Faces);
            contentsGrid.Children.Add(pictureControl);
        }
Пример #3
0
 void item4_MouseUp(object sender, MouseButtonEventArgs e)
 {
     try
     {
         contentsGrid.Children.Clear();
         PictureControl pictureControl = new PictureControl();
         pictureControl.button4.Visibility = Visibility.Hidden;
         pictureControl.InitVideoList(selUserDetail.Faces);
         contentsGrid.Children.Add(pictureControl);
     }
     catch (Exception ex)
     {
         string strError = ex.ToString();
         ErrorCollection.GetInstance().SetErrorInfo(strError);
     }
 }
Пример #4
0
        public void NotifyOccured(NotifyType notifyType, Socket socket, BaseInfo baseInfo)
        {
            switch (notifyType)
            {
            case NotifyType.Reply_UpdateUser:
            {
                UserInfo userName = (UserInfo)baseInfo;
                Login.main.nickName.Content = userName.Nickname;

                ToolTip tt = new ToolTip();
                tt.Content = userName.Nickname;
                Login.main.nickName.ToolTip = tt;

                IniFileEdit _IniFileEdit = new IniFileEdit(Login._UserPath);

                ImageBrush updateImg = new ImageBrush();
                updateImg.Stretch = Stretch.Fill;
                _IniFileEdit.SetIniValue("UserInfo", "userImage", userName.Icon);

                BitmapImage bi = new BitmapImage();
                bi.BeginInit();
                bi.UriSource = new Uri(userName.Icon, UriKind.RelativeOrAbsolute);
                bi.EndInit();

                //updateImg.ImageSource = bi;
                updateImg.ImageSource     = ImageDownloader.GetInstance().GetImage(userName.Icon);
                myPicture.Fill            = updateImg;
                Login.main.memberImg.Fill = updateImg;

                ToolTip sign = new ToolTip();
                sign.Content = Login._UserInfo.Sign;
                Login.main.singBox.ToolTip = sign;
                //Login.main.singBox.Text = Login._UserInfo.Sign;

                if (selectGrid.Children.Count > 0 && selectGrid.Children[0] is MyInfoControl)
                {
                    MyInfoControl myInfoControl = (MyInfoControl)selectGrid.Children[0];

                    myInfoControl.buttonSave.IsEnabled = false;
                }

                //MessageBoxCommon.Show("更新成功", MessageBoxType.Ok);
                TempWindowForm tempWindowForm = new TempWindowForm();
                QQMessageBox.Show(tempWindowForm, "更新成功", "提示", QQMessageBoxIcon.OK, QQMessageBoxButtons.OK);
            }
            break;

            case NotifyType.Request_VideoUpload:
            {
                // 2014-02-09: GreenRose
                if (Main.loadWnd != null)
                {
                    Main.loadWnd.Close();
                    Main.loadWnd = null;
                }

                //List<IconInfo> listVideoInfo = new List<IconInfo>();
                IconInfo newIcon = (IconInfo)baseInfo;
                //iconInfoList.Add(newIcon);
                if (iconInfoList != null)
                {
                    iconInfoList.Add(newIcon);
                }
                else
                {
                    iconInfoList = new List <IconInfo>();
                    iconInfoList.Add(newIcon);
                }

                selectGrid.Children.Clear();
                PictureControl pictureControl = new PictureControl();
                pictureControl.InitVideoList(iconInfoList);
                selectGrid.Children.Add(pictureControl);

                TempWindowForm tempWindowForm = new TempWindowForm();
                QQMessageBox.Show(tempWindowForm, "更新成功", "提示", QQMessageBoxIcon.OK, QQMessageBoxButtons.OK);
            }
            break;

            //case NotifyType.Reply_NewID:
            //     {
            //         UserInfo newUserInfo = (UserInfo)baseInfo;
            //         TempWindowForm tempWindowForm = new TempWindowForm();
            //         QQMessageBox.Show(tempWindowForm, "帐号申请通过." + newUserInfo.Id + "(首次登陆没有密码 登陆后请完善资料)", "提示", QQMessageBoxIcon.OK, QQMessageBoxButtons.OK);
            //         userInfoList.Add(newUserInfo);

            //         selectGrid.Children.Clear();
            //         NoticeMemberControl noticeMemberControl = new NoticeMemberControl();
            //         noticeMemberControl.listMember(userInfoList);
            //         selectGrid.Children.Add(noticeMemberControl);
            //     }
            //     break;
            case NotifyType.Reply_IconUpload:
            {
                IconInfo newIcon = (IconInfo)baseInfo;

                IconInfo iconInfo = iconInfoList.Find(item => item.Id == newIcon.Id);
                if (iconInfo == null)
                {
                    iconInfoList.Add(newIcon);

                    selectGrid.Children.Clear();
                    AlbermControl albermControl = new AlbermControl();
                    albermControl.pictureList(iconInfoList);
                    selectGrid.Children.Add(albermControl);
                }
            }
            break;

            case NotifyType.Reply_Give:
            {
                PresentHistoryInfo presentHistoryInfo = (PresentHistoryInfo)baseInfo;

                presentHistoryList.Add(presentHistoryInfo);
                selectGrid.Children.Clear();
                InnerControl innerControl = new InnerControl();
                innerControl.InnerChatting(chatHistoryList);
                selectGrid.Children.Add(innerControl);



                for (int i = 0; i < userInfoList.Count; i++)
                {
                    if (userInfoList[i].Id == presentHistoryInfo.ReceiveId)
                    {
                        userInfoList[i].Cash = userInfoList[i].Cash + presentHistoryInfo.Cash;

                        selectGrid.Children.Clear();
                        NoticeMemberControl noticeMemberControl = new NoticeMemberControl();
                        noticeMemberControl.listMember(userInfoList);
                        selectGrid.Children.Add(noticeMemberControl);

                        break;
                    }
                }
            }
            break;

            case NotifyType.Reply_UpdatePercent:
            {
                UserInfo userPercent = (UserInfo)baseInfo;
                if (userPercent.Id == Login._UserInfo.Id)
                {
                    selectGrid.Children.Clear();
                    MyInfoControl myInfoControl = new MyInfoControl();
                    myInfoControl.InitMyInfo(Login._UserInfo);
                    selectGrid.Children.Add(myInfoControl);
                }
            }
            break;

            case NotifyType.Reply_IconRemove:
            {
                IconInfo newIcon = (IconInfo)baseInfo;
                for (int i = 0; i < iconInfoList.Count; i++)
                {
                    if (iconInfoList[i].Icon == newIcon.Icon)
                    {
                        iconInfoList.Remove(iconInfoList[i]);
                    }
                }

                selectGrid.Children.Clear();
                AlbermControl albermControl = new AlbermControl();
                albermControl.pictureList(iconInfoList);
                selectGrid.Children.Add(albermControl);
            }
            break;

            case NotifyType.Reply_Error:
            {
                ResultInfo errorInfo = (ResultInfo)baseInfo;
                ErrorType  errorType = errorInfo.ErrorType;

                //Login.ShowError(errorType);
            }
            break;
            }
        }