private void emailToolStripMenuItem_Click(object sender, EventArgs e) { int emailIndex = contactsPane.SelectedCells[0].RowIndex; string email = contactsPane.Rows[emailIndex].Cells[1].Value.ToString(); office.Email(email, NotesOrganizer.GetAndFormatSelectedNotes()); }
private static void Drop() { NotesOrganizer.area.Remove(NotesOrganizer.fakePane); NotesOrganizer.Align(new Point(NotesOrganizer.fakePane.Location.X, NotesOrganizer.fakePane.Location.Y)); NotesOrganizer.area.Insert(position, NotesOrganizer.fakePane); currentArea = null; NotesOrganizer.fakePane = null; }
private void btnExport_Click(object sender, EventArgs e) { if (NotesOrganizer.GetAndFormatSelectedNotes() != null) { office.Export(NotesOrganizer.GetAndFormatSelectedNotes()); } else { InformationBox.Show("Please select at least one note by clicking on the checkbox", "Invalid Text"); } }
private void btnColor_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); if (cd.ShowDialog() == DialogResult.OK) { NotesOrganizer.SetColor(cd.Color); } Notes.Properties.Settings.Default.UserColor = cd.Color; Notes.Properties.Settings.Default.Save(); }
private void btnFont_Click(object sender, EventArgs e) { FontDialog fd = new FontDialog(); if (fd.ShowDialog() == DialogResult.OK) { NotesOrganizer.SetFont(fd.Font); } Notes.Properties.Settings.Default.UserFont = fd.Font; Notes.Properties.Settings.Default.Save(); }
public static void ManageDragPane() { if (dragging) { NotesOrganizer.fakePane = currentArea; NotesOrganizer.area.Remove(NotesOrganizer.fakePane); NotesOrganizer.fakePane.Location = NotesOrganizer.Align(NotesOrganizer.fakePane.Location); if (NotesOrganizer.area[position] != NotesOrganizer.fakePane) { NotesOrganizer.area.Remove(NotesOrganizer.fakePane); NotesOrganizer.area.Insert(position, NotesOrganizer.fakePane); Clean(); } } }
private void btnSelectAll_Click(object sender, EventArgs e) { if (btnSelectAll.Text == "Select All") { NotesOrganizer.SelectAll(false); btnSelectAll.Text = "Deselect"; btnDelete.Enabled = true; } else { NotesOrganizer.SelectAll(true); btnSelectAll.Text = "Select All"; btnDelete.Enabled = false; } this.Refresh(); }
private void btnDelete_Click(object sender, EventArgs e) { bool reset = false; for (int i = 0; i < NotesOrganizer.area.Count; i++) { if (reset) { i = 0; reset = false; } Panel pane = NotesOrganizer.area[i]; foreach (Control c in pane.Controls) { if (c is CheckBox) { CheckBox check = (CheckBox)c; if (check.Checked) { RemoveAtIndex(i); NotesOrganizer.UpdateLocations(); //dont delete this, it fixes a bug if (i == 0) { i = -1; } else { i = 0; } reset = true; } } } btnDelete.Enabled = false; } ControlManager.Refresh(); Remind(); }
new private void Update() { if (NotesOrganizer.IsExtendedView() && !NotesOrganizer.resetLocations && !pnlNoteHolder.VerticalScroll.Visible) { scroll = new Point(0, 0); } if (NotesOrganizer.scrollControlIntoView) { pnlNoteHolder.ScrollControlIntoView(NotesOrganizer.area[NotesOrganizer.area.Count - 1]); scroll = pnlNoteHolder.AutoScrollPosition; NotesOrganizer.scrollControlIntoView = false; } ShowOptions(); ShowContacts(); if (exit) { Application.Exit(); } }
private void UpdateUI_Tick(object sender, EventArgs e) { Update(); NotesOrganizer.UpdateLocations(); }