public static Window CreateWebPageDialog(string absoluteUriString, IPropertyEditorWizard callbackHandler, double width = 800, double height = 600, string leftTitle = "", string rightTitle = "") { Browser.CallbackHandler.PropertyEditorViewModel = callbackHandler; var window = new WebBrowserWindow { Width = width, Height = height }; var viewModel = new WebBrowserViewModel { RightTitle = rightTitle, LeftTitle = leftTitle }; window.DataContext = viewModel; if (callbackHandler != null) { callbackHandler.NavigateRequested += uri => window.Browser.LoadSafe(uri); callbackHandler.Owner = window; } window.Browser.LoadSafe(absoluteUriString); return window; }
public static Window CreateWebPageDialog(string absoluteUriString, IPropertyEditorWizard callbackHandler, double width = 800, double height = 600, string leftTitle = "", string rightTitle = "") { Browser.CallbackHandler.PropertyEditorViewModel = callbackHandler; var window = new WebBrowserWindow { Width = width, Height = height }; var viewModel = new WebBrowserViewModel { RightTitle = rightTitle, LeftTitle = leftTitle }; window.DataContext = viewModel; callbackHandler.NavigateRequested += uri => window.Browser.LoadSafe(uri); callbackHandler.Owner = window; window.Browser.LoadSafe(absoluteUriString); return(window); }
public static bool? ShowWebPageDialog(this IEnvironmentModel environment, string website, string relativeUriString, IPropertyEditorWizard callbackHandler, double width, double height, string leftTitle = "", string rightTitle = "") { var window = CreateWebPageDialog(environment, website, relativeUriString, callbackHandler, width, height, leftTitle, rightTitle); return window.ShowDialog(); }
public static Window CreateWebPageDialog(this IEnvironmentModel environment, string website, string relativeUriString, IPropertyEditorWizard callbackHandler, double width = 800, double height = 600, string leftTitle = "", string rightTitle = "") { var uriString = string.Format("{0}{1}/{2}", environment.Connection.WebServerUri, website.Trim('/'), relativeUriString.Trim('/')); return CreateWebPageDialog(uriString, callbackHandler, width, height, leftTitle, rightTitle); }
public static bool?ShowWebPageDialog(this IEnvironmentModel environment, string website, string relativeUriString, IPropertyEditorWizard callbackHandler, double width, double height, string leftTitle = "", string rightTitle = "") { var window = CreateWebPageDialog(environment, website, relativeUriString, callbackHandler, width, height, leftTitle, rightTitle); return(window.ShowDialog()); }
public static Window CreateWebPageDialog(this IEnvironmentModel environment, string website, string relativeUriString, IPropertyEditorWizard callbackHandler, double width = 800, double height = 600, string leftTitle = "", string rightTitle = "") { var uriString = string.Format("{0}{1}/{2}", environment.Connection.WebServerUri, website.Trim('/'), relativeUriString.Trim('/')); return(CreateWebPageDialog(uriString, callbackHandler, width, height, leftTitle, rightTitle)); }
public static void Initialize(this WebView browser, string homeUrl = null, IPropertyEditorWizard propertyEditorViewModel = null) { //browser.ShowDevTools(); // Remove CallbackHandler.PropertyEditorViewModel = propertyEditorViewModel; browser.LoadSafe(homeUrl); }
// Travis.Frisinger - 13.08.2012 : Changed to use POST request instead of fetched HTML injection ;) internal void ShowWebpartWizard(IPropertyEditorWizard layoutObjectToOpenWizardFor) { if (layoutObjectToOpenWizardFor != null && layoutObjectToOpenWizardFor.SelectedLayoutObject != null && layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid != null && layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid.ResourceModel != null && layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid.ResourceModel.Environment != null) { IEnvironmentModel environment = layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid.ResourceModel.Environment; string relativeUri = string.Format("services/{0}.wiz", layoutObjectToOpenWizardFor.SelectedLayoutObject.WebpartServiceName); Uri requestUri; if (!Uri.TryCreate(environment.WebServerAddress, relativeUri, out requestUri)) { requestUri = new Uri(environment.WebServerAddress, relativeUri); } try { string xmlConfig = layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid == null ? layoutObjectToOpenWizardFor.SelectedLayoutObject.XmlConfiguration : layoutObjectToOpenWizardFor.SelectedLayoutObject.LayoutObjectGrid .XmlConfiguration; string elementNames = ResourceHelper.GetWebPageElementNames(xmlConfig); // Travis.Frisinger : 06-07-2012 - Remove junk in the config string xmlOutput = ResourceHelper.MergeXmlConfig( layoutObjectToOpenWizardFor.SelectedLayoutObject.XmlConfiguration, elementNames); ErrorResultTO errors; Guid dataListID = environment.UploadToDataList(xmlOutput, out errors); if (errors.HasErrors()) //BUG 8796, Added this if to handle errors { // Bad things happened... Tell the user PopupProvider.Show(errors.MakeDisplayReady(), "Webpart Wizard Error", MessageBoxButton.OK, MessageBoxImage.Error); // Stop configuring!!! return; } string uriString = Browser.FormatUrl(requestUri.AbsoluteUri, dataListID); _win = new WebPropertyEditorWindow(layoutObjectToOpenWizardFor, uriString) { Width = 850, Height = 600 }; _win.ShowDialog(); } catch { } } }
public static bool?ShowWebPageDialog(string absoluteUriString, IPropertyEditorWizard callbackHandler, double width = 800, double height = 600, string leftTitle = "", string rightTitle = "") { var window = CreateWebPageDialog(absoluteUriString, callbackHandler, width, height, leftTitle, rightTitle); return(window.ShowDialog()); }
public ShowWebpartWizardMessage(IPropertyEditorWizard layoutObjectViewModel) { LayoutObjectViewModel = layoutObjectViewModel; }