private void SaveStateButton_Click(object sender, EventArgs e) { string InstanceName; SaveForm save = new SaveForm(); save.ShowDialog(); InstanceName = save.getName(); save.Dispose(); MandelbrotData state = new MandelbrotData( InstanceName, this.MaximumIterations, this.ZoomScale, this.Greyscale.Checked, this.BlackAndWhite.Checked, this.MinimumXValue, this.MaximumXValue, this.MinimumYValue, this.MaximumYValue, Convert.ToInt32(this.ZExponentBox.Value), Convert.ToInt32(this.CExponentBox.Value) ); string XmlData = state.ToXml(); string XmlFilePath = @"C:\Users\" + this.ComputerUserName + "\\Documents\\Mandelbrot\\" + this.rName + "\\SavedStates\\" + InstanceName + ".xml"; File.WriteAllText(XmlFilePath, XmlData); }
private void Save_Click(object sender, EventArgs e) { try { MessageBox.Show(this.UserName); SaveForm f = new SaveForm(); f.ShowDialog(); string tmp = f.getName(); Canvas.Save(@"C:\Users\" + this.UserName + "\\Documents\\Julia\\SavedImages\\" + tmp + ".png"); f.Dispose(); } catch (Exception saveException) { MessageBox.Show(saveException.Message); } }
public void SaveButton_Click(object sender, EventArgs e) { try { MessageBox.Show(this.ComputerUserName); SaveForm save = new SaveForm(); save.ShowDialog(); string tmp = save.getName(); FractalCanvas.Save(@"C:\Users\" + this.ComputerUserName + "\\Documents\\Mandelbrot\\" + this.rName + "\\SavedImages\\" + tmp + ".png"); save.Dispose(); } catch (Exception save_exception) { MessageBox.Show(save_exception.Message); } }