|
@@ -1,5 +1,6 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Diagnostics;
|
|
|
using System.Drawing;
|
|
|
using System.Drawing.Drawing2D;
|
|
|
using System.IO;
|
|
@@ -51,7 +52,7 @@ namespace InABox.DynamicGrid
|
|
|
public string LineColor { get; set; }
|
|
|
public int TextSize { get; set; }
|
|
|
|
|
|
- public bool PrintAllowed { get; set; }
|
|
|
+ //public bool PrintAllowed { get; set; }
|
|
|
|
|
|
public bool SaveAllowed { get; set; }
|
|
|
|
|
@@ -591,7 +592,7 @@ namespace InABox.DynamicGrid
|
|
|
|
|
|
PdfSizeImage.Source = SizeBitmap().AsBitmapImage(32, 32, false);
|
|
|
|
|
|
- PdfPrint.Visibility = PrintAllowed ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ PdfPrint.Visibility = Visibility.Collapsed; //PrintAllowed ? Visibility.Visible : Visibility.Collapsed;
|
|
|
PdfSave.Visibility = SaveAllowed ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
|
ColorButton(PdfNoneImage, selected, Properties.Resources.hand);
|
|
@@ -662,6 +663,15 @@ namespace InABox.DynamicGrid
|
|
|
data = FlattenPdf(data);
|
|
|
var filename = dlg.FileName;
|
|
|
File.WriteAllBytes(filename, data);
|
|
|
+
|
|
|
+ var gsProcessInfo = new ProcessStartInfo();
|
|
|
+ gsProcessInfo.Verb = "open";
|
|
|
+ gsProcessInfo.WindowStyle = ProcessWindowStyle.Normal;
|
|
|
+ gsProcessInfo.FileName = filename;
|
|
|
+ gsProcessInfo.UseShellExecute = true;
|
|
|
+
|
|
|
+ Process.Start(gsProcessInfo);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|