/// <summary> /// Loads the store. /// </summary> /// <param name="parameters">Parameters to load the store with.</param> public void LoadWithParameters(StoreParameters parameters) { StoreHost = null; IsLoading = true; ExpandUserAgent("FSEmbeddedStore/1.0"); ResetCookies(); WebBrowserHelper.ClearCache(); WebView.Navigate(parameters.ToURL); }
public MainWindow() { InitializeComponent(); // set parameters _parameters = new StoreParameters(); _parameters.OrderProcessType = OrderProcessType.Detail; _parameters.StoreId = "your_store"; _parameters.ProductId = "your_product"; _parameters.Mode = Mode.Test; _parameters.Language = CultureInfo.CurrentCulture.TwoLetterISOLanguageName; // configure controller and provide it as DataContext to // access IsLoading property from XAML _controller = new Controller(); _controller.DidLoadStore += DidLoadStore; _controller.DidReceiveOrder += DidReceiveOrder; _controller.WebView = webBrowser; DataContext = _controller; // load store _controller.LoadWithParameters(_parameters); }
/// <summary> /// Loads the store. /// </summary> /// <param name="parameters">Parameters to load the store with.</param> public void LoadWithParameters(StoreParameters parameters) { StoreHost = null; IsLoading = true; ExpandUserAgent("FSEmbeddedStore/1.0"); ResetCookies(); WebBrowserHelper.ClearCache(); WebView.Navigate(parameters.ToURL); }