Beispiel #1
0
        private void InitLocation()
        {
            Rectangle mainArea = Screen.PrimaryScreen.WorkingArea;

            if (BINotifyForm.Count < 1)
            {
                this.Location = new Point(mainArea.Right - this.Width - 20, mainArea.Top + 10);
            }
            else
            {
                Point p = BINotifyForm.LastLocation;
                if (p.Y + this.Height + 10 > mainArea.Bottom)
                {
                    p.Y = mainArea.Top + 10;
                }
                else
                {
                    p.Y += 10;
                }
                this.Location = p;
            }
            Point bottomLeft = new Point(this.Left, this.Bottom);

            BINotifyForm.SetLastLocation(bottomLeft);
        }
        private void InvokedNotify(string Messsage, string Title)
        {
            BINotifyForm notify = new BINotifyForm();

            notify.SetMesssage(Messsage);
            notify.SetText(Title);
            notify.Show();
        }
Beispiel #3
0
        private void fadeTimer_Tick(object sender, EventArgs e)
        {
            double opacity = this.Opacity;

            opacity = opacity - 0.2;
            if (opacity <= 0)
            {
                Timer timer = (Timer)sender;
                timer.Stop();
                timer.Dispose();
                BINotifyForm.RemoveInstance();
                this.Close();
                this.Dispose();
            }
            this.Opacity = opacity;
        }
Beispiel #4
0
        /// <summary>
        /// The shadowed Show() with animation effect.
        /// </summary>
        public new void Show()
        {
            this.InitLocation();
            this.m_originalPoint = this.Location;
            this.Top             = this.Top - 10;
            this.Opacity         = 0.5;
            base.Show();

            Timer moveInTimer = new Timer();

            moveInTimer.Interval = 10;
            moveInTimer.Tick    += new EventHandler(m_moveInTimer_Tick);
            moveInTimer.Start();

            BINotifyForm.AddInstance();
        }
 private void InvokedNotify(string Messsage, string Title)
 {
     BINotifyForm notify = new BINotifyForm();
     notify.SetMesssage(Messsage);
     notify.SetText(Title);
     notify.Show();
 }