/// <summary> /// TODO: check this method later /// </summary> private void Main_FormClosing(object sender, FormClosingEventArgs e) { //fviewTimesheet fvTimesheet = new fviewTimesheet(); //Form f = fvTimesheet.FindForm(); //f.Dispose(); using (fviewTimesheet fvTimesheet = new fviewTimesheet()) { Form f = fvTimesheet.FindForm(); } }
/// <summary> /// TODO: release memory when LOgIn is closed after being call by fviewTS /// </summary> /// <param name="e"></param> protected override void OnFormClosing(FormClosingEventArgs e) { //fviewTimesheet fvTimesheet = new fviewTimesheet(); //Form f = fvTimesheet.FindForm(); //f.Dispose(); using (fviewTimesheet fvTimesheet = new fviewTimesheet()) { Form f = fvTimesheet.FindForm(); } base.OnFormClosing(e); }