Example #1
0
 private void ButtonDefault_Click(object sender, RoutedEventArgs e)
 {
     //reset options
     //reset rotate angle
     OX_rotate.Value = 0;
     OY_rotate.Value = 0;
     OZ_rotate.Value = 0;
     //reset zoom
     OX_delatate.Value = 1;
     OY_delatate.Value = 1;
     OZ_delatate.Value = 1;
     //reset move
     OX_translate.Value = 0;
     OY_translate.Value = 0;
     OZ_translate.Value = 0;
     //reset mirror
     MirrorOX.IsChecked = false;
     MirrorOY.IsChecked = false;
     MirrorOZ.IsChecked = false;
     //delete dipyramid
     gr1.Children.Remove(dip);
     //create and add new dipyramid
     dip = new Dipyramid();
     gr1.Children.Add(dip);
     dip.reDraw();
 }
Example #2
0
 public MainWindow()
 {
     dip         = new Dipyramid();
     axis        = new Axis();
     axis.Margin = new Thickness(900, 600, 0, 0);
     InitializeComponent();
     gr1.Children.Add(dip);
     gr1.Children.Add(axis);
 }