1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Services.Dialogs;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace LogoForceTestApp.Modules.MainModule.ViewModels
- {
- internal class ChartPage3ViewModel : BindableBase, IDialogAware
- {
- public string Title => "chart3";
- public event Action<IDialogResult> RequestClose;
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
- }
- public string C1 { get; set; }
- public string C2 { get; set; }
- public string C3 { get; set; }
- public string C4 { get; set; }
- public string C5 { get; set; }
- public DelegateCommand CloseCmd { get; set; }
- public ChartPage3ViewModel()
- {
- CloseCmd = new DelegateCommand(Close);
- }
- private void Close()
- {
- if (C1 == null && C2 == null && C3 == null && C4 == null && C5 == null)
- {
- return;
- }
- else
- {
- var dialog = new DialogResult();
- dialog.Parameters.Add("c1", C1);
- dialog.Parameters.Add("c2", C2);
- dialog.Parameters.Add("c3", C3);
- dialog.Parameters.Add("c4", C4);
- dialog.Parameters.Add("c5", C5);
- RequestClose?.Invoke(dialog);
- }
- }
- }
- }
|