Expand|Select|Wrap|Line Numbers
- public static void SetAccountID(string account)
- {
- Form1._instance.Show(); //checks for an open instance
- Form1.LoadAccounts(); //not sure how to/if I can call instance function
- }
My understanding of the singleton pattern was that the call
Expand|Select|Wrap|Line Numbers
- Form1._instance.Show();
Expand|Select|Wrap|Line Numbers
- public Form1 Instance
- {
- get
- {
- if (Form1._instance == null)
- {
- Form1._instance = new Form1();
- }
- return Form1._instance;
- }
- }
- private static Form1 _instance = null;