|
@@ -1392,7 +1392,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
return LoadWindow<T>(sender, new CancelEventArgs());
|
|
|
}
|
|
|
|
|
|
- public IBasePanel LoadWindow(Type t, Fluent.Button sender, CancelEventArgs cancel)
|
|
|
+ public IBasePanel? LoadWindow(Type t, Fluent.Button sender, CancelEventArgs cancel)
|
|
|
{
|
|
|
using (new WaitCursor())
|
|
|
{
|
|
@@ -2966,7 +2966,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
var ReportsBar = FindRibbonBar(CurrentTab, x => x.Header.Equals("Print"));
|
|
|
if (ReportsBar is not null)
|
|
|
{
|
|
|
- ReportsBar.Visibility = Security.IsAllowed<CanPrintReports>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ ReportsBar.Visibility = Visibility.Collapsed;
|
|
|
ReportsBar.Items.Clear();
|
|
|
}
|
|
|
}
|
|
@@ -2984,7 +2984,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
var button = new Fluent.Button
|
|
|
{
|
|
|
Header = action.Caption,
|
|
|
- LargeIcon = action.Image.AsBitmapImage(),
|
|
|
+ LargeIcon = action.Image?.AsBitmapImage(),
|
|
|
MinWidth = 60
|
|
|
};
|
|
|
|
|
@@ -2997,6 +2997,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
action.Execute();
|
|
|
};
|
|
|
|
|
|
+ ReportsBar.Visibility = Security.IsAllowed<CanPrintReports>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
ReportsBar.Items.Add(button);
|
|
|
}
|
|
|
}
|
|
@@ -3029,7 +3030,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
|
|
|
if (action.OnPopulate != null)
|
|
|
{
|
|
|
- Fluent.DropDownButton button = null;
|
|
|
+ Fluent.DropDownButton button;
|
|
|
if (action.OnExecute != null)
|
|
|
{
|
|
|
button = new Fluent.SplitButton();
|