コード例 #1
0
ファイル: HomeViewModel.cs プロジェクト: gatm50/PopCornOne
 void EditContact_Execute(object parameters)
 {
     if (parameters == null)
         return;
     EditorWindow dialog = new EditorWindow();
     EditorViewModel editorViewModel = new EditorViewModel((parameters as OriginReference.Origin));
     _modalDialogService.ShowDialog<EditorViewModel>(dialog,
         editorViewModel,
         returnedViewModelInstance =>
         {
             if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
             {
                 OriginReference.Origin result = editorViewModel.ObjectResult;
                 _originClient.EditOriginAsync(result);
             }
         });
 }
コード例 #2
0
ファイル: HomeViewModel.cs プロジェクト: gatm50/PopCornOne
 void AddContact_Execute(object parameters)
 {
     OriginReference.Origin temporalLanguage = new OriginReference.Origin { OriginId = 0, OriginName = "", OriginUrl = "" };
     EditorWindow dialog = new EditorWindow();
     EditorViewModel editorViewModel = new EditorViewModel(temporalLanguage);
     _modalDialogService.ShowDialog<EditorViewModel>(dialog,
         editorViewModel,
         returnedViewModelInstance =>
         {
             if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
             {
                 OriginReference.Origin result = editorViewModel.ObjectResult;
                 _originClient.CreateOriginAsync(result);
             }
         });
 }