Beispiel #1
0
        void _threadManaget_UIAnnouncementRemindCallBackEvent(object sender, AnnouncementRemindEventArgs e)
        {
            if (e.AnnouncementRemind == null)
            {
                return;
            }
            if (this.InvokeRequired)
            {
                this.Invoke(new EventHandler <AnnouncementRemindEventArgs> (_threadManaget_UIAnnouncementRemindCallBackEvent), new object [] { sender, e });
            }
            else
            {
                if (_formRemind == null)
                {
                    _formRemind          = new FormRemind( );
                    _formRemind.Location = new Point(-1000, 0);
                }
                else
                {
                    _formRemind.SetPosition( );
                }

                _formRemind.setValue(e.AnnouncementRemind);

                Utility.NativeMethods.ShowWindow(new System.Runtime.InteropServices.HandleRef(_formRemind, _formRemind.Handle), 4);
            }
        }
Beispiel #2
0
 /// <summary>
 /// 显示主界面时,把消息弹出框隐藏在最左边
 /// </summary>
 protected void ShowPushMessageForm()
 {
     try
     {
         if (_formPushMessage == null)
         {
             _formPushMessage = new FormPushMessage();
         }
         _formPushMessage.Show();
         _formPushMessage.Location = new Point(-1000, 0);
         if (_formRemind == null)
         {
             _formRemind = new FormRemind( );
         }
         _formRemind.Show( );
         _formRemind.Location = new Point(-1000, 0);
     }
     catch (Exception ex)
     {
         Utility.LogHelper.WriteException(ex);
     }
 }