public static singleton GetInstance() { if (instance == null) { instance = new singleton(); } return(instance); }
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); } }