private void ShowInput(CallbackMessage <InputVM> msg) { WinInput win = new WinInput(); win.Owner = this; win.SetValue(DataContextProperty, msg.Message); var result = win.ShowDialog(); if (result.HasValue && result.Value) { msg.Callback(msg.Message); } }
private void ReportSaveAs(CallbackMessage <ReportVM> msg) { InputVM inputVM = new InputVM { Title = "请输入模板名称" }; WinInput win = new WinInput(); win.Owner = this; win.SetValue(DataContextProperty, inputVM); var result = win.ShowDialog(); if (result.HasValue && result.Value) { var id = Guid.NewGuid().ToString(); _designer.Report.Save($"{Funs.ReportsFolder}/{id}.frx"); reoGrid.Save($"{Funs.ReportsFolder}/{id}.xlsx"); msg.Callback(new ReportVM { Id = id, ReportName = inputVM.Text }); } }