Files
Alexander Mikhailov c9fc96eaac #Outlook - 19.1
2019-05-06 09:45:48 +03:00

35 lines
1.3 KiB
C#

using System;
using DevExpress.DevAV.ViewModels;
using DevExpress.XtraReports.UI;
using DevExpress.Mvvm;
namespace DevExpress.DevAV.Modules {
public partial class OrderRevenueView : BaseModuleControl, IRibbonModule {
public OrderRevenueView() : base(typeof(OrderRevenueViewModel)) {
InitializeComponent();
}
public OrderRevenueViewModel ViewModel {
get { return GetViewModel<OrderRevenueViewModel>(); }
}
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
documentViewer1.DocumentSource = ViewModel.Report;
}
#region
XtraBars.Ribbon.RibbonControl IRibbonModule.Ribbon {
get {
if(string.IsNullOrEmpty(ribbonControl.ApplicationDocumentCaption))
ribbonControl.ApplicationDocumentCaption = (string)(ViewModel as IDocumentContent).Title;
return ribbonControl;
}
}
#endregion
private void showDesignerBarItem_ItemClick(object sender, XtraBars.ItemClickEventArgs e) {
//using(var tool = new ReportDesignTool(ViewModel.Report)) {
// tool.ShowRibbonDesignerDialog();
//}
}
}
}