/// <summary> /// Event Handler for About Menu Button. Shows us a notification box with the programs informations. /// </summary> private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { //Method for the About section in the menu var monoFlat_NotificationBox1 = new MonoFlat.MonoFlat_NotificationBox(); monoFlat_NotificationBox1.BorderCurve = 8; monoFlat_NotificationBox1.Font = new System.Drawing.Font("Tahoma", 9F); monoFlat_NotificationBox1.Image = null; monoFlat_NotificationBox1.Location = new System.Drawing.Point(this.Width / 2 - 200, this.Height / 2 - 125); monoFlat_NotificationBox1.MinimumSize = new System.Drawing.Size(100, 40); monoFlat_NotificationBox1.Name = "monoFlat_NotificationBox1"; monoFlat_NotificationBox1.NotificationType = MonoFlat.MonoFlat_NotificationBox.Type.Notice; monoFlat_NotificationBox1.RoundCorners = true; monoFlat_NotificationBox1.ShowCloseButton = true; monoFlat_NotificationBox1.Size = new System.Drawing.Size(400, 250); monoFlat_NotificationBox1.TabIndex = 2; monoFlat_NotificationBox1.Text = "\n\n\n\t\tMovie Catalog 1.0 \n\n\t\tCreated by:\n \t\tAleksander Lipka\n \t\tPiotr Lustyk"; monoFlat_ThemeContainer1.Controls.Add(monoFlat_NotificationBox1); monoFlat_NotificationBox1.BringToFront(); }
/// <summary> /// Dispose of a prompt if it is hoovered. /// </summary> private void LoginError_MouseHover(object sender, EventArgs e) { MonoFlat.MonoFlat_NotificationBox prompt = sender as MonoFlat.MonoFlat_NotificationBox; prompt.Dispose(); }
/// <summary> /// Log In function, checks if the users input is in the database and if it is, it log's in user's personal datagridview /// </summary> private void monoFlat_Button1_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; string login = monoFlat_TextBox1.Text; bool validation = Methods.LoginFunction(monoFlat_TextBox1.Text, monoFlat_TextBox2.Text); if (validation) { UserName = login; monoFlat_TextBox1.Visible = false; monoFlat_TextBox1.Text = null; monoFlat_TextBox2.Visible = false; monoFlat_TextBox2.Text = null; monoFlat_Label1.Visible = false; monoFlat_Label2.Visible = false; monoFlat_Button1.Visible = false; monoFlat_Panel1.Visible = false; monoFlat_LinkLabel2.Visible = true; ContextMenuAvailable = true; Add_Playlist_Button.Visible = true; AddAllPlaylistButtons(); HomeList_Button.Visible = true; welcome.Text = ("Welcome " + login); welcome.Location = new System.Drawing.Point(this.Width - welcome.Width - monoFlat_LinkLabel2.Width - welcome.Margin.Left - welcome.Margin.Right - monoFlat_LinkLabel2.Margin.Left - monoFlat_LinkLabel2.Margin.Right, 101); welcome.Visible = true; monoFlat_TextBox2.Text = "Password"; monoFlat_TextBox2.Enter -= TextBoxEnter; monoFlat_LinkLabel2.Location = new Point(welcome.Location.X + welcome.Width, welcome.Location.Y); LoginPromptDispose(); RefreshGrid(); folderToolStripMenuItem.Enabled = true; fileToolStripMenuItem1.Enabled = true; monoFlat_TextBox1.Text = null; monoFlat_TextBox2.Text = null; } else { loginError[loginErrorcounter] = new MonoFlat.MonoFlat_NotificationBox(); loginError[loginErrorcounter].BorderCurve = 8; loginError[loginErrorcounter].Font = new System.Drawing.Font("Tahoma", 9F); loginError[loginErrorcounter].Image = null; loginError[loginErrorcounter].Location = new System.Drawing.Point(monoFlat_Button1.Location.X - 200, monoFlat_Button1.Location.Y + 50); loginError[loginErrorcounter].MinimumSize = new System.Drawing.Size(100, 40); loginError[loginErrorcounter].Name = "monoFlat_NotificationBox1"; loginError[loginErrorcounter].NotificationType = MonoFlat.MonoFlat_NotificationBox.Type.Error; loginError[loginErrorcounter].RoundCorners = true; loginError[loginErrorcounter].ShowCloseButton = false; loginError[loginErrorcounter].Size = new System.Drawing.Size(200, 85); loginError[loginErrorcounter].TabIndex = 9; loginError[loginErrorcounter].Text = "Log In Error:\nYour password or user is incorrenct."; loginError[loginErrorcounter].MouseHover += new EventHandler(LoginError_MouseHover); monoFlat_ThemeContainer1.Controls.Add(loginError[loginErrorcounter]); loginError[loginErrorcounter].BringToFront(); loginErrorcounter++; } Cursor.Current = Cursors.Default; }