コード例 #1
0
 private bool ExportSvgDialog()
 {
     if (svgExportFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             File.WriteAllText(svgExportFileDialog.FileName, LineEndUtil.ToUnix(_generator.GenerateCode(ExportStrokeWidth)));
             return(true);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error encountered", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     return(false);
 }
コード例 #2
0
 private bool SaveCodeDialog()
 {
     if (saveCodeFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             File.WriteAllText(saveCodeFileDialog.FileName, LineEndUtil.ToUnix(outTextBox.Text));
             _modified = false;
             return(true);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error encountered", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     return(false);
 }