Exemplo n.º 1
0
 internal void ChangeMode(PopupRoutedEventArgs popupArgs)
 {
     AlertMsg = popupArgs.Msg;
     if (popupArgs.PopupType == PopupType.Information)
     {
         AlertMsgMode       = true;
         AlertMsgButtonMode = 1;
         AlertMsgImageMode  = 1;
         SelectedMode       = 1;
     }
     else if (popupArgs.PopupType == PopupType.Warn)
     {
         AlertMsgMode       = true;
         AlertMsgButtonMode = 1;
         AlertMsgImageMode  = 2;
         SelectedMode       = 1;
     }
     else if (popupArgs.PopupType == PopupType.Error)
     {
         AlertMsgMode       = true;
         AlertMsgButtonMode = 1;
         AlertMsgImageMode  = 3;
         SelectedMode       = 1;
     }
     else if (popupArgs.PopupType == PopupType.Question)
     {
         AlertMsgMode       = true;
         AlertMsgButtonMode = 2;
         AlertMsgImageMode  = 4;
         SelectedMode       = 1;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 处理弹出按钮路由
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void HandlePopop(object sender, RoutedEventArgs args)
        {
            PopupRoutedEventArgs popupArgs = args as PopupRoutedEventArgs;

            if (null != popupArgs)
            {
                switch (popupArgs.PopupType)
                {
                case PopupType.Information:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Warn:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Error:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Question:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 消息命令输入
        /// </summary>
        /// <param name="no"></param>
        private void SetMsgCommand(string no)
        {
            // 确定
            if (no == "OK")
            {
            }
            // 是
            else if (no == "Yes")
            {
            }
            // 否
            else if (no == "No")
            {
            }

            PopupRoutedEventArgs popupArgs = MsgList.Dequeue();

            if (null != popupArgs.Operate)
            {
                popupArgs.Operate(no);
            }



            Msgs.AlertMsgMode = false;
            InitialMsg();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 初始化信息
        /// </summary>
        private void InitialMsg()
        {
            // 没有显示窗口, 并消息堆里大于0时执行
            if (!Msg.AlertMsgMode && MsgList.Count > 0)
            {
                PopupRoutedEventArgs popupArgs = MsgList.Peek();

                // 更改显示模式
                this.Msg.ChangeMode(popupArgs);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 处理弹出按钮路由
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void HandlePopop(object sender, RoutedEventArgs args)
        {
            PopupRoutedEventArgs popupArgs = args as PopupRoutedEventArgs;

            if (null != popupArgs)
            {
                switch (popupArgs.PopupType)
                {
                case PopupType.LockOn:
                    LockTopMode = true;
                    break;

                case PopupType.LockOff:
                    LockTopMode = false;
                    break;

                case PopupType.AnimationOn:
                    Animation.IsDisplay = true;
                    break;

                case PopupType.AnimationOff:
                    Animation.IsDisplay = false;
                    break;

                case PopupType.Information:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Warn:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Error:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                case PopupType.Question:
                    MsgList.Enqueue(popupArgs);
                    InitialMsg();
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 消息命令输入
        /// </summary>
        /// <param name="no"></param>
        private void SetMsgCommand(string no)
        {
            // 确定
            if (no == "OK")
            {
            }
            // 是
            else if (no == "Yes")
            {
            }
            // 否
            else if (no == "No")
            {
            }

            PopupRoutedEventArgs popupArgs = MsgList.Dequeue();

            if (null != popupArgs.Operate)
            {
                popupArgs.Operate(no);
            }



            if (OperatesService.GetOperates().IsExpired || OperatesService.GetOperates().IsAdminUsing)
            {
                this.Key.KeyMsgMode  = 0;
                this.IsOpenKeyWindow = true;

                this.MsgList.Clear();
                this.Msg.AlertMsgMode = false;


                OperatesService.GetOperates().IsExpired = false;
                Resources.GetRes().SERVER_SESSION       = null;
                _reLogin();
                return;
            }



            Msg.AlertMsgMode = false;
            InitialMsg();
        }