Beispiel #1
0
        private void AuthWebBrowser_Navigating(object sender, NavigatingCancelEventArgs e)
        {
            // Suppress script errors
            dynamic activeX = AuthWebBrowser.GetType().InvokeMember("ActiveXInstance",
                                                                    BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                                                    null, AuthWebBrowser, new object[] { });

            activeX.Silent = true;
        }
Beispiel #2
0
        // callback action?! > onclose event to return retrieved oauth?!!
        public AuthenticationWindow(string username, bool isBot)
        {
            // Initialize
            InitializeComponent();
            SetInternetOption();

            // Set username to prefill field
            _username = username;

            // Navigate
            if (isBot)
            {
                AuthWebBrowser.Navigate(TwitchAuthBot);
            }
            else
            {
                AuthWebBrowser.Navigate(TwitchAuthStreamer);
            }
        }