Пример #1
0
        protected override void OnLoad(EventArgs e)
        {
            var screen = Screen.FromPoint(this.Location);

            this.Location = new Point(screen.WorkingArea.Right - this.Width - 10, screen.WorkingArea.Bottom - this.Height - 10);
            base.OnLoad(e);
            birthdayNames.Text = GetBirthdays.GetBirthday();
        }
Пример #2
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            CurrentDate.Text       = "Dnes je: " + DateTime.Now.ToString();
            CurrentMeniny.Text     = "Dnes má meniny: " + SeznamMenin.DnesniMeniny();
            CurrentNarozeniny.Text = "Dnes má narozeniny: " + GetBirthdays.GetBirthday();

            settingwindow = new SettingsDialog();
            notifywindow  = new NotificationWindow();

            if (DateTime.Now.Hour == settingwindow.notifytime.Hour &&
                DateTime.Now.Minute == settingwindow.notifytime.Minute &&
                DateTime.Now.Second == settingwindow.notifytime.Second &&
                IsFormOpened(notifywindow) == false && GetBirthdays.GetBirthday() != " - ")
            {
                notifywindow.delay = Convert.ToInt16(settingwindow.notifydelay);
                notifywindow.Show();
            }
        }