private void btnterug_Click(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Normal) { Global.size = this.Size; Global.position = this.Location; } Global.windowstate = this.WindowState; this.Close(); mParent.herlaad(); }
private void TextBrowser_FormClosing(object sender, FormClosingEventArgs e) { Global.windowstate = this.WindowState; if (this.WindowState != FormWindowState.Maximized) { Global.size = this.Size; Global.position = this.Location; } _ParentForm.herlaad(); }
public static void Sluit_forms(base_form sluit_vanaf) { DE = Forms_OD.GetEnumerator(); int index = 0; bool gevonden = false; base_form herlaad_scherm = new base_form(); while (DE.MoveNext()) { if (DE.Key == sluit_vanaf && !gevonden) { herlaad_scherm = (base_form)Forms_OD[index]; KillStack.Push((base_form)DE.Key); gevonden = true; } else if (gevonden) { KillStack.Push((base_form)DE.Key); } ++index; } int KillCount = KillStack.Count; for (int j = 0; j < KillCount; j++) { base_form tmp = KillStack.Pop(); if (Sluitbaar(tmp)) { Forms_OD.Remove(tmp); tmp.program_closes = true; tmp.Close(); String log_line = "sluit venster @ " + DateTime.Now.ToString() + ": huidig: " + tmp.ToString() + ": close_naar: " + herlaad_scherm.ToString(); System.IO.StreamWriter file = new System.IO.StreamWriter(Global.log_file_path, true); file.WriteLine(log_line); file.Close(); } else { herlaad_scherm = tmp; break; } } if (gevonden) { herlaad_scherm.herlaad(); } KillStack.Clear(); }
private void button1_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (this.WindowState == FormWindowState.Normal) { Global.size = this.Size; Global.position = this.Location; } Global.windowstate = this.WindowState; Cursor.Current = Cursors.Default; this.sluit(); Close(); _parent.herlaad(); }