public RemindMePrompt(string title, PromptReason reason) { BLIO.Log("Constructing RemindMePrompt (" + title + ")"); InitializeComponent(); promptReason = reason; this.Opacity = 0; lblText.MaximumSize = new Size((pnlMainGradient.Width - lblText.Location.X) - 10, 0); lblTitle.MaximumSize = new Size((pnlMainGradient.Width - lblTitle.Location.X) - 10, 0); lblTitle.Text = title; //Set the location within the remindme window. //This prompt can be moved, but inititally will be set to the middle of the location of RemindMe Form1 remindme = (Form1)Application.OpenForms["Form1"]; if (remindme != null) { this.StartPosition = FormStartPosition.Manual; this.Location = new Point(remindme.Location.X + ((remindme.Width / 2) - this.Width / 2), remindme.Location.Y + ((remindme.Height / 2) - (this.Height / 2))); } tmrFadeIn.Start(); strReturnValue = ""; intReturnValue = 0; minutes = 0; BLIO.Log("RemindMePrompt constructed"); }
public MaterialRemindMePrompt(string title, PromptReason reason) { BLIO.Log("Constructing RemindMePrompt (" + title + ")"); MaterialSkin.MaterialSkinManager.Instance.AddFormToManage(this); InitializeComponent(); promptReason = reason; this.Opacity = 0; lblText.MaximumSize = new Size((pnlMain.Width - lblText.Location.X) - 10, 0); this.Text = title; tmrFadeIn.Start(); strReturnValue = ""; intReturnValue = 0; minutes = 0; switch (reason) { case PromptReason.MINUTES: tbPrompt.KeyPress += timeOnly_KeyPress; tbPrompt.KeyDown += numericOnly_KeyDown; break; case PromptReason.NUMERIC: tbPrompt.KeyPress += numericOnly_KeyPress; tbPrompt.KeyDown += numericOnly_KeyDown; break; } this.MaximumSize = this.Size; this.MinimumSize = this.Size; BLIO.Log("RemindMePrompt constructed"); }
public RemindMePrompt(string title, string description, PromptReason reason) : this(title, reason) { lblText.Visible = true; lblText.Text = description; }