示例#1
0
 //implenting singelton pattern to this class
 public static BookForm Instance()
 {
     if (instance == null)
     {
         instance = new BookForm();
     }
     instance.SetAsNewWindow();
     return(instance);
 }
示例#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));
     }
 }
示例#3
0
 private void Books_Click(object sender, EventArgs e)
 {
     Utils.SwitchBetweenWindows(this, BookForm.Instance());
 }