Esempio n. 1
0
 //implenting singelton pattern to this class
 public static BookForm Instance()
 {
     if (instance == null)
     {
         instance = new BookForm();
     }
     instance.SetAsNewWindow();
     return(instance);
 }
Esempio n. 2
0
 private void BackButton_Click(object sender = null, EventArgs e = null)
 {
     if (book == null)
     {
         Utils.SwitchBetweenWindows(this, BookForm.Instance());
     }
     else
     {
         Utils.SwitchBetweenWindows(this, BookDetails.Instance(book));
     }
 }
Esempio n. 3
0
 private void Books_Click(object sender, EventArgs e)
 {
     Utils.SwitchBetweenWindows(this, BookForm.Instance());
 }