SetAllowWebBrowserDrop() public static method

public static SetAllowWebBrowserDrop ( DependencyObject element, bool value ) : void
element System.Windows.DependencyObject
value bool
return void
Exemplo n.º 1
0
        private static void WebBrowserPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var instance   = (KanColleHost)d;
            var newBrowser = (WebBrowser)e.NewValue;
            var oldBrowser = (WebBrowser)e.OldValue;

            if (oldBrowser != null)
            {
                oldBrowser.LoadCompleted -= instance.HandleLoadCompleted;
            }
            if (newBrowser != null)
            {
                newBrowser.LoadCompleted += instance.HandleLoadCompleted;
                var events = WebBrowserHelper.GetAxWebbrowser2(newBrowser) as DWebBrowserEvents_Event;
                if (events != null)
                {
                    events.NewWindow += instance.HandleWebBrowserNewWindow;
                }
            }
            if (instance.scrollViewer != null)
            {
                instance.scrollViewer.Content = newBrowser;
            }

            WebBrowserHelper.SetAllowWebBrowserDrop(newBrowser, false);
        }
Exemplo n.º 2
0
        private static void WebBrowserPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var instance   = (KanColleHost)d;
            var newBrowser = (WebBrowser)e.NewValue;
            var oldBrowser = (WebBrowser)e.OldValue;

            if (oldBrowser != null)
            {
                oldBrowser.LoadCompleted -= instance.HandleLoadCompleted;
                oldBrowser.LoadCompleted -= instance.ApplyFlashQualityScript;
            }
            if (newBrowser != null)
            {
                newBrowser.LoadCompleted += instance.HandleLoadCompleted;
                newBrowser.LoadCompleted += instance.ApplyFlashQualityScript;
            }
            if (instance.scrollViewer != null)
            {
                instance.scrollViewer.Content = newBrowser;
            }

            WebBrowserHelper.SetAllowWebBrowserDrop(newBrowser, false);
        }
Exemplo n.º 3
0
        private static void WebBrowserPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var instance   = (KanColleHost)d;
            var newBrowser = (WebBrowser)e.NewValue;
            var oldBrowser = (WebBrowser)e.OldValue;

            if (oldBrowser != null)
            {
                oldBrowser.LoadCompleted -= instance.HandleLoadCompleted;
                newBrowser.Navigating    -= NoTouchActionStylesheet_BrowserNavigating;
            }
            if (newBrowser != null)
            {
                newBrowser.LoadCompleted += instance.HandleLoadCompleted;
                newBrowser.Navigating    += NoTouchActionStylesheet_BrowserNavigating;
            }
            if (instance.scrollViewer != null)
            {
                instance.scrollViewer.Content = newBrowser;
            }

            WebBrowserHelper.SetAllowWebBrowserDrop(newBrowser, false);
        }