public static DrawDialog ShowDrawDialog(int countDown, Action <int> afterHideCallback) { DrawDialogViewModel viewModel = new DrawDialogViewModel(countDown, afterHideCallback); ///viewModel.DrawCount = 20; ApplicationContext context = Context.GetApplicationContext(); IUIViewLocator locator = context.GetService <IUIViewLocator>(); if (locator == null) { if (log.IsWarnEnabled) { log.Warn("Not found the \"IUIViewLocator\"."); } throw new NotFoundException("Not found the \"IUIViewLocator\"."); } DrawDialogWindow window = locator.LoadView <DrawDialogWindow>(ViewName); if (window == null) { if (log.IsWarnEnabled) { log.WarnFormat("Not found the dialog window named \"{0}\".", viewName); } throw new NotFoundException(string.Format("Not found the dialog window named \"{0}\".", viewName)); } DrawDialog drawDialog = new DrawDialog(window, viewModel); drawDialog.Show(); return(drawDialog); }
private DrawDialog(DrawDialogWindow window, DrawDialogViewModel viewModel) { this.window = window; this.viewModel = viewModel; }