|
@@ -36,11 +36,14 @@ namespace InABox.DynamicGrid
|
|
|
|
|
|
//public bool PrintAllowed { get; set; }
|
|
|
public bool SaveAllowed { get; set; }
|
|
|
+ public bool ButtonsVisible { get; set; }
|
|
|
public string Watermark { get; set; }
|
|
|
|
|
|
+ private bool bClosing = false;
|
|
|
+
|
|
|
private void Documents_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
|
{
|
|
|
- if (!bReady)
|
|
|
+ if (!bReady || (!ButtonsVisible && bClosing))
|
|
|
return;
|
|
|
|
|
|
for (var i = 0; i < e.RemovedItems.Count; i++)
|
|
@@ -72,6 +75,7 @@ namespace InABox.DynamicGrid
|
|
|
var pdf = new PDFEditorControl();
|
|
|
//pdf.PrintAllowed = PrintAllowed;
|
|
|
pdf.SaveAllowed = SaveAllowed;
|
|
|
+ pdf.ButtonsVisible = ButtonsVisible;
|
|
|
pdf.Watermark = Watermark;
|
|
|
editor = pdf;
|
|
|
}
|
|
@@ -94,6 +98,7 @@ namespace InABox.DynamicGrid
|
|
|
|
|
|
protected override void OnClosing(CancelEventArgs e)
|
|
|
{
|
|
|
+ bClosing = true;
|
|
|
base.OnClosing(e);
|
|
|
Documents.SelectedIndex = -1;
|
|
|
}
|