private void CreateBtn_Click(object sender, RoutedEventArgs e) { CheckInput(); XmlSerializer ser = new XmlSerializer(typeof(Svg)); using (StreamWriter sr = new StreamWriter("img.svg")) { ser.Serialize(sr, Template1.Create(x * 10, y * 10, z * 10, px, py)); } System.Diagnostics.Process.Start("img.svg"); }
private void BtnCreatePrint_Click(object sender, RoutedEventArgs e) { XmlSerializer ser = new XmlSerializer(typeof(Svg)); using (StreamWriter sr = new StreamWriter("img.svg")) { ser.Serialize(sr, Template1.Create(x * 10, y * 10, z * 10, px, py)); } PrintDialog printer = new PrintDialog(); if (printer.ShowDialog() == true) { } }