public void OpenComparatorWindow(ComparatorViewModel vm) { bool?result = null; Window activeWindow = ActiveWindow; if (activeWindow == null) { throw new NullReferenceException("ActiveWindow"); } _viewComparator = new ComparatorWindow(); _viewComparator.Owner = activeWindow; _viewComparator.DataContext = vm; _viewComparator.WindowStartupLocation = WindowStartupLocation.CenterOwner; ApplyEffect(_viewComparator.Owner); result = _viewComparator.ShowDialog(); ClearEffect(_viewComparator.Owner); }
public IActionResult Compare(ComparatorViewModel urls) { if (!ModelState.IsValid) { return(View("Comparator", urls)); } ViewData["result"] = true; var model = new ComparatorViewModel() { Price = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Amazon", 1), new KeyValuePair <string, int>("Asos", 1), new KeyValuePair <string, int>("Pccomponentes", 2) }, Delivery = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Amazon", 1), new KeyValuePair <string, int>("Asos", 2) }, Refund = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Asos", 1), new KeyValuePair <string, int>("Amazon", 2), new KeyValuePair <string, int>("Pccomponentes", 2) }, Cancelation = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Amazon", 1), new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Asos", 2) }, Guarantee = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Amazon", 1), new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Asos", 3) }, Jurisdiction = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Amazon", 1), new KeyValuePair <string, int>("Asos", 4) }, ApplicableLaw = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Asos", 1), new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Amazon", 3) }, Responsibility = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Asos", 3), new KeyValuePair <string, int>("Amazon", 3) }, DataProtection = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Asos", 1), new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Amazon", 2) }, CookiesPolicy = new List <KeyValuePair <string, int> >() { new KeyValuePair <string, int>("Pccomponentes", 1), new KeyValuePair <string, int>("Asos", 2), new KeyValuePair <string, int>("Amazon", 2) } }; return(View("Comparator", model)); }