Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 private void UpdateUI_Tick(object sender, EventArgs e)
 {
     Update();
     NotesOrganizer.UpdateLocations();
 }