/// <summary> /// Handles the Click event of the clearDataButton control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void clearDataButton_Click(object sender, EventArgs e) { if (MessageBox.Show("Are You sure?", "Alert", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (itemsTreeView.Nodes.Count > 0) { itemsTreeView.Nodes.Clear(); } _systemInfo.ClearDatabase(); } }