Beispiel #1
0
        public Popup(Reminder rem)
        {
            BLIO.Log("Constructing Popup reminderId = " + rem.Id);
            InitializeComponent();
            this.Opacity = 0;
            this.rem     = rem;

            this.Size        = new Size((int)BLPopupDimensions.GetPopupDimensions().FormWidth, (int)BLPopupDimensions.GetPopupDimensions().FormHeight);
            lblTitle.Font    = new Font(lblTitle.Font.FontFamily, BLPopupDimensions.GetPopupDimensions().FontTitleSize, FontStyle.Bold);
            lblNoteText.Font = new Font(lblNoteText.Font.FontFamily, BLPopupDimensions.GetPopupDimensions().FontNoteSize, FontStyle.Bold);
            this.Text        = rem.Name;

            lblNoteText.MaximumSize = new Size((pnlText.Width - lblNoteText.Location.X) - 10, 0);
            lblTitle.MaximumSize    = new Size((pnlTitle.Width - lblTitle.Location.X) - 10, 0);


            //Assign the events that the user can raise while doing something on the popup. The stopflash event stops the taskbar icon from flashing
            lblTitle.MouseClick    += stopFlash_Event;
            lblNoteText.MouseClick += stopFlash_Event;
            this.MouseClick        += stopFlash_Event;
            this.ResizeEnd         += stopFlash_Event;

            BLIO.Log("Popup constructed");

            //Don't show postpone options if the reminder isn't real
            if (rem.Id == -1)
            {
                cbPostpone.Visible  = false;
                lblPostpone.Visible = false;
                tbPostpone.Visible  = false;
            }
        }
Beispiel #2
0
        private void btnReset_Click(object sender, EventArgs e)
        {
            BLPopupDimensions.ResetToDefaults();
            RemindMeMessageFormManager.MakeMessagePopup("Succesfully reset settings.", 4);

            FillValues();
            ApplyPreviewChanges();
        }
Beispiel #3
0
        private void FillValues()
        {
            dimensions = BLPopupDimensions.GetPopupDimensions();

            tbWidth.Text   = dimensions.FormWidth.ToString();
            trbWidth.Value = (int)dimensions.FormWidth;

            tbHeight.Text   = dimensions.FormHeight.ToString();
            trbHeight.Value = (int)dimensions.FormHeight;

            tbNoteFont.Text   = dimensions.FontNoteSize.ToString();
            trbNoteFont.Value = (int)dimensions.FontNoteSize;

            tbTitleFont.Text   = dimensions.FontTitleSize.ToString();
            trbTitleFont.Value = (int)dimensions.FontTitleSize;
        }
Beispiel #4
0
        private void SaveChanges()
        {
            try
            {
                PopupDimensions dimension = new PopupDimensions();
                dimension.FontNoteSize  = (long)trbNoteFont.Value;
                dimension.FontTitleSize = (long)trbTitleFont.Value;
                dimension.FormWidth     = (long)trbWidth.Value;
                dimension.FormHeight    = (long)trbHeight.Value;
                BLPopupDimensions.UpdatePopupDimensions(dimension);


                RemindMeMessageFormManager.MakeMessagePopup("Succesfully changed settings.", 4);
            }
            catch
            {
                RemindMeMessageFormManager.MakeMessagePopup("Changing settings failed", 4);
            }
        }
Beispiel #5
0
        public Popup2(Reminder rem)
        {
            InitializeComponent();
            this.rem = rem;

            this.Size    = new Size((int)BLPopupDimensions.GetPopupDimensions().FormWidth, (int)BLPopupDimensions.GetPopupDimensions().FormHeight);
            tbTitle.Font = new Font(tbTitle.Font.FontFamily, BLPopupDimensions.GetPopupDimensions().FontTitleSize, FontStyle.Bold);
            tbText.Font  = new Font(tbText.Font.FontFamily, BLPopupDimensions.GetPopupDimensions().FontNoteSize, FontStyle.Bold);


            initialWidth    = Width;
            initialHeight   = Height;
            initialFontSize = lblTitle.Font.Size;


            //Assign the events that the user can raise while doing something on the popup. The stopflash event stops the taskbar icon from flashing
            tbTitle.MouseClick += stopFlash_Event;
            tbText.MouseClick  += stopFlash_Event;
            this.MouseClick    += stopFlash_Event;
            this.ResizeEnd     += stopFlash_Event;
        }