Interaction logic for PreviewWindow.xaml
Наследование: Window
Пример #1
0
        internal void Preview(string preview)
        {
            var urls             = (from url in preview.Split('\n').ToList <string>() where url.Trim().Length > 0 select url).ToList <string>();
            var previewViewModel = new PreviewViewModel("Preview URL patterns:", urls);
            var previewWindow    = new PreviewWindow();

            previewWindow.DataContext = previewViewModel;
            previewWindow.Owner       = this;
            previewWindow.ShowDialog();
        }
Пример #2
0
 internal void ShowUrlList(List <string> urls, string caption, string message)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         var previewViewModel      = new PreviewViewModel(message, urls);
         var previewWindow         = new PreviewWindow();
         previewWindow.DataContext = previewViewModel;
         previewWindow.Owner       = this;
         previewWindow.Title       = caption;
         previewWindow.ShowDialog();
     });
 }