Esempio n. 1
0
        private void hiệnGhiChúToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
            GeneralNoteForm NoteForm = new GeneralNoteForm();

            NoteForm.Dtpk.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
            NoteForm.ShowDialog();
        }
Esempio n. 2
0
 private void frmAutoShut_Resize(object sender, EventArgs e) //minimize to tray
 {
     if (FormWindowState.Minimized == this.WindowState)
     {
         this.Hide();
         NotifyIcon1.ShowBalloonTip(200);
     }
 }
Esempio n. 3
0
 private void CalendarProject_Load(object sender, EventArgs e)
 {
     Count();
     NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
     dtpk.Value       = DateTime.Now;
     ClockLB.Text     = DateTime.Now.ToString("T");
     ClockLB.Location = new Point(PanelIcon.Size.Width / 2 - ClockLB.Size.Width / 2, 12);
     timer1.Start();
 }
Esempio n. 4
0
        private void MainButton_Click(object sender, MouseEventArgs e)
        {
            m_IsLock             = !m_IsLock;
            MainButton.Text      = m_IsLock ? UnLockString : LockString;
            MainButton.BackColor = m_IsLock ? GreenColor : RedColor;

            NotifyIcon1.ShowBalloonTip(0, this.Text,
                                       string.Format(StateMsgString, m_IsLock ? LockString : UnLockString),
                                       ToolTipIcon.Info);

            System.GC.Collect();
        }
Esempio n. 5
0
 private void Form1_Resize(object sender, EventArgs e)
 {
     if (this.WindowState == FormWindowState.Minimized)
     {
         this.Hide();
         NotifyIcon1.Visible = true;
         NotifyIcon1.ShowBalloonTip(1000);
     }
     else if (FormWindowState.Normal == this.WindowState)
     {
         NotifyIcon1.Visible = false;
     }
 }
Esempio n. 6
0
        private void Form1_SizeChanged(object sender, EventArgs e)
        {
            bool mousePointerOffTaskbar = Screen.GetWorkingArea(this).Contains(Cursor.Position);

            if (this.WindowState == FormWindowState.Minimized)
            {
                NotifyIcon1.Icon           = SystemIcons.Application;
                NotifyIcon1.Visible        = true;
                NotifyIcon1.BalloonTipText = "The program is minimized to system tray";
                NotifyIcon1.ShowBalloonTip(1000);
                this.ShowInTaskbar = false;
            }
        }
Esempio n. 7
0
 private void Form1_SizeChanged(object sender, EventArgs e)
 {
     if (this.WindowState == FormWindowState.Minimized)
     {
         this.Hide();
         this.ShowInTaskbar = false;
         this.WindowState   = FormWindowState.Minimized;
         NotifyIcon1.Tag    = string.Empty;
         NotifyIcon1.ShowBalloonTip(3000, this.Text,
                                    BackgroundMsgString,
                                    ToolTipIcon.Info);
     }
 }
Esempio n. 8
0
        private void MainInterface_Load(System.Object sender, System.EventArgs e)
        {
            if (DateTime.Now.Day == 1)
            {
                this.FeesStructures.CreateOrShow();
                this.FeesStructures.MdiParent = this;
            }

            sqlm.ExecSql("select id from students where due>0");
            if (sqlm.count != 0)
            {
                NotifyIcon1.BalloonTipText  = sqlm.count + "  Students have to pay the fees";
                NotifyIcon1.BalloonTipTitle = "Fee Info";
                NotifyIcon1.ShowBalloonTip(100);
            }
            sqlm.ExecProc("exec update_leaves");
            sqlm.ExecSql("");
        }
Esempio n. 9
0
        private async void UpdateCheck(bool auto)
        {
            //s.Execute("ShowWindow");
            var github = new GitHubClient(new ProductHeaderValue("FLauncher"));

            github.Credentials = creds;

            Release release = new Release();

            try
            {
                release = await github.Repository.Release.GetLatest("OliveOil1", "Flauncher");
            }
            catch (Exception ex)
            {
                if (!auto)
                {
                    MessageBox.Show(ex.Message, "Error");
                }
                return;
            }


            if (release.TagName != File.ReadAllText(Directory.GetCurrentDirectory() + @"\version.txt"))
            {
                if (auto)
                {
                    NotifyIcon1.ShowCustomBalloon(new UpdateBalloon(true, release.TagName), System.Windows.Controls.Primitives.PopupAnimation.Fade, 10000);
                }
                else
                {
                    NotifyIcon1.ShowCustomBalloon(new UpdateBalloon(true, release.TagName), System.Windows.Controls.Primitives.PopupAnimation.Fade, 10000);
                }
            }
            else
            {
                if (!auto)
                {
                    NotifyIcon1.ShowCustomBalloon(new UpdateBalloon(false), System.Windows.Controls.Primitives.PopupAnimation.Fade, 10000);
                }
            }
        }
Esempio n. 10
0
        private void hiệnLịchNgàyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PanelDisplay.Controls.Clear();
            dtpk.Value = DateTime.Now;
            var displayDate = new DisplayDate(dtpk.Value)
            {
                Size     = new Size(1009, 620),
                Location = new Point(0, 0),
                Dock     = DockStyle.Fill,
            };

            displayDate.MonthBtn += DateDisplay_MonthBtn;
            displayDate.Nextbtn  += DateDisplay_NextBtn;
            displayDate.Prebtn   += DateDisplay_PreBtn;
            displayDate.TDbtn    += DateDisplay_TDBtn;
            ActivateButton(ButtonDate, RGBColors.color1);
            PanelDisplay.Controls.Add(displayDate);
            this.Show();
            NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
        }
Esempio n. 11
0
 private void ShowTooltip(string STR)
 {
     NotifyIcon1.ShowBalloonTip(1000, "xxUSBSentinel", STR, ToolTipIcon.Info);
 }
Esempio n. 12
0
 public void frmNotifier_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
 {
     NotifyIcon1.Dispose();
 }
Esempio n. 13
0
 private void NotifyIcon1_DoubleClick(object sender, EventArgs e)
 {
     this.Show();
     NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
 }