Beispiel #1
0
 public static shuxing getInstance()
 {
     if (null == shuxing._instance)
     {
         lock (obj)
         {
             if (null == shuxing._instance)
             {
                 shuxing._instance = new shuxing();
             }
         }
     }
     return(shuxing._instance);
 }
Beispiel #2
0
 public shuxing()
 {
     _instance = this;
     InitializeComponent();
     System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;//线程就能安全的访问窗体控件了//该方法是通过采用取消线程安全保护模式的方式实现的,所以不建议采用。
 }