Пример #1
0
 public static singleton GetInstance()
 {
     if (instance == null)
     {
         instance = new singleton();
     }
     return(instance);
 }
Пример #2
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         singleton sng = singleton.GetInstance();
         canvas.Children.Add(sng.r);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }