コード例 #1
0
        public IEnumerable <IResult> Reset()
        {
            var dialog = resultFactory.ShowDialog <NewCurveViewModel>().Configure(m => m.Init(Curve));

            yield return(dialog);

            var newCurve = dialog.Model.NewCurve;

            if (newCurve != null)
            {
                var message = resultFactory.ShowMessageBox(string.Format("Reset {0}?", Curve.Name), "Curve will be reset, continue?", MessageBoxButton.OKCancel);
                yield return(message);

                if (message.Result == System.Windows.MessageBoxResult.OK)
                {
                    Curve.Reset(newCurve);
                    InitCurve();
                    Name          = newCurve.Name;
                    ValidateCurve = true;
                }
            }
        }
コード例 #2
0
 public IEnumerable <IResult> ShowAbout()
 {
     yield return(resultFactory.ShowDialog <AboutViewModel>());
 }