Пример #1
0
        /// <summary>
        /// Load the issue filing web browser in a blocking window and return the issue number (null or id)
        /// Change the configuration zoom level for the embedded browser
        /// </summary>
        /// <param name="url"></param>
        private static int?FileIssueWindow(Uri url, bool onTop, int zoomLevel, Action <int> updateZoom)
        {
            System.Diagnostics.Trace.WriteLine(Invariant($"Url is {url.AbsoluteUri.Length} long: {url}"));
            IEBrowserEmulation.SetFeatureControls();
            var dlg = new IssueFileForm(url, onTop, zoomLevel, updateZoom);

            dlg.ScriptToRun = "window.onerror = function(msg,url,line) { window.external.Log(msg); return true; };";

            dlg.ShowDialog();

            return(dlg.IssueId);
        }
Пример #2
0
        /// <summary>
        /// Load the issue filing web browser in a blocking window and return the issue number (null or id)
        /// Change the configuration zoom level for the embedded browser
        /// </summary>
        /// <param name="url"></param>
        private static int?FileIssueWindow(Uri url, bool onTop, int zoomLevel, Action <int> updateZoom, string configurationPath)
        {
            if (!IsWebView2RuntimeInstalled())
            {
                var webView = new WebviewRuntimeNotInstalled(onTop);
                webView.ShowDialog();
                return(null);
            }

            Trace.WriteLine(Invariant($"Url is {url.AbsoluteUri.Length} long: {url}"));
            var dlg = new IssueFileForm(url, onTop, zoomLevel, updateZoom, configurationPath);

            dlg.ScriptToRun = "window.onerror = function(msg,url,line) { window.external.Log(msg); return true; };";

            dlg.ShowDialog();

            return(dlg.IssueId);
        }
Пример #3
0
 public ScriptInterface(IssueFileForm owner)
 {
     this.Owner = owner;
 }