• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WebBrowser类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中WebBrowser的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser类的具体用法?C# WebBrowser怎么用?C# WebBrowser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WebBrowser类属于命名空间,在下文中一共展示了WebBrowser类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: WindowCollection

		public WindowCollection (WebBrowser control, nsIDOMWindowCollection windowCol) : base (control)
		{
			if (control.platform != control.enginePlatform)
				unmanagedWindows = nsDOMWindowCollection.GetProxy (control, windowCol);
			else
				unmanagedWindows = windowCol;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:7,代码来源:WindowCollection.cs


示例2: NativeExecution

        public NativeExecution(ref WebBrowser browser)
        {
            this.webBrowser = browser;

            this.commands = new Dictionary<string, PhoneGapCommand>
                                {
                                    // TODO: These need to be included based on plugin configuration
                                    { "Accelerometer.GetCurrentAcceleration", new Plugins.Accelerometer.GetCurrentAccelerationCommand() },
                                    { "Camera.GetPicture", new Plugins.Camera.GetPictureCommand() },
                                    { "DebugConsole.debug", new Plugins.DebugConsole.DebugCommand() },
                                    { "Device.GetAll", new Plugins.Device.GetAllCommand() },
                                    { "Geolocation.GetCurrentPosition", new Plugins.Geolocation.GetCurrentPositionCommand() },
                                    { "Network.IsReachable", new Plugins.Network.IsReachableCommand() },
                                    { "Notification.Alert", new Plugins.Notification.AlertCommand() },
                                    { "Notification.Beep", new Plugins.Notification.BeepCommand() },
                                    { "Notification.Vibrate", new Plugins.Notification.VibrateCommand() },
                                    { "Orientation.GetCurrentOrientation", new Plugins.Orientation.GetCurrentOrientationCommand() },
                                    { "Orientation.ClearWatch", new Plugins.Orientation.ClearWatchCommmand() },
                                    { "Orientation.WatchOrientation", new Plugins.Orientation.WatchOrientationCommmand() },
                                    { "Send.Sms", new Plugins.Sms.SendCommand() },
                                    { "Telephony.CallNumber", new Plugins.Telephony.CallCommand() }
                                };

            this.watchers = new Watchers();
        }
开发者ID:hermwong,项目名称:phonegap-wp7,代码行数:25,代码来源:NativeExecution.cs


示例3: AcquireToken

        /// <summary>
        /// Worker method to acquire, refresh a token
        /// this method will show a browser as needed to 
        /// complete the authentication flow
        /// </summary>
        /// <param name="browser"></param>
        /// <returns></returns>
        public Task<string> AcquireToken(WebBrowser browser)
        {

            _Browser = browser;

            _TCS = new TaskCompletionSource<string>();

            //Check if existing token has expired, if so try refresh
            if (_AuthContext.IsAccessTokenExpired())
            {
                //If expired and we have a refresh token, try that 
                if (_AuthContext.IsRefreshViable())
                {
                    GetRefreshToken();
                }
                else
                {
                    //Start the flow from the top with the user providing credentials
                    NavigateBrowserToAuthScreen();
                }
            }
            else
            {
                _TCS.SetResult(_AuthContext.AccessToken);
            }
            return _TCS.Task;
        }
开发者ID:ThomasHenckel,项目名称:OAuthDemo,代码行数:34,代码来源:CRMAuthenticationBroker.cs


示例4: btnGetBotToken_Click

 private void btnGetBotToken_Click(object sender, EventArgs e)
 {
     WebBrowser botBrowser = new WebBrowser();
     botBrowser.Show();
     botBrowser.Pattern = "tmi/#access_token(\\w+)";
     botBrowser.Browser.Navigate("https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&client_id=q6batx0epp608isickayubi39itsckt&redirect_uri=http%3A%2F%2Ftwitchapps.com%2Ftmi%2F&scope=chat_login");
 }
开发者ID:williamokano,项目名称:SimpleTwitchBot,代码行数:7,代码来源:MainBotForm.cs


示例5: Init

        public void Init(WebBrowser browser, PhoneApplicationPage appMainPage)
        {
            initAppUrls();
            RhoLogger.InitRhoLog();
            LOG.INFO("Init");

            CRhoFile.recursiveCreateDir(CFilePath.join(getBlobsDirPath()," "));

            m_webBrowser = browser;
            m_appMainPage = appMainPage;
            m_appMainPage.ApplicationBar = null;
            m_httpServer = new CHttpServer(CFilePath.join(getRhoRootPath(), "apps"));
            CRhoResourceMap.deployContent();
            RhoRuby.Init(m_webBrowser);

            DBAdapter.initAttrManager();

            LOG.INFO("Starting sync engine...");
            SyncThread sync = null;
            try{
	        	sync = SyncThread.Create();
	        	
	        }catch(Exception exc){
	        	LOG.ERROR("Create sync failed.", exc);
	        }
	        if (sync != null) {
	        	//sync.setStatusListener(this);
	        }
	        
	        RhoRuby.InitApp();
	        RhoRuby.call_config_conflicts();
            RHOCONF().conflictsResolved();
        }
开发者ID:artemk,项目名称:rhodes,代码行数:33,代码来源:RhodesApp.cs


示例6: SetupExitAppDispatcher

 private static void SetupExitAppDispatcher(WebBrowser browser) {
     browser.ScriptNotify += (sender, e) => {
         if(e.Value == "DevExpress.ExitApp") {
             Application.Current.Terminate();
         }
     };
 }
开发者ID:yanl6153,项目名称:DevExtreme-14.1-ApplicationTemplates,代码行数:7,代码来源:DevExtremeAddon.cs


示例7: MainWindow

        public MainWindow()
        {
            InitializeComponent();

            // Create instances of UserControls
            startScreen = new StartScreen();
            newsPage = new NewsPage();
            faculty = new Faculty();
            events = new Events();
            browser = new WebBrowser();

            faculty.loadXmlDoc();

            // Show the startScreen
            pageTransitionControl.ShowPage(startScreen);

            //pageTransitionControl.ShowPage(faculty);

            //Initialize the Kinect gesture engine
            GestureEngine gestEngine = new GestureEngine();

            gestEngine.reset();
            gestEngine.init();

            //adds an event handler to the event that a new gesture is done
            gestEngine.GestureChanged += new ElementFlowTest.GestureEngine.NewGestureEventHandler(gestEngine_GestureChanged);
        }
开发者ID:jpchiodini,项目名称:Gesture-Recognition-Interface,代码行数:27,代码来源:MainWindow.xaml.cs


示例8: NodeList

		public NodeList(WebBrowser control, nsIDOMNodeList nodeList) : base (control)
		{
			if (control.platform != control.enginePlatform)
				unmanagedNodes = nsDOMNodeList.GetProxy (control, nodeList);
			else
				unmanagedNodes = nodeList;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:7,代码来源:NodeList.cs


示例9: ChannelAPI

        // CONSTRUCTOR
        public ChannelAPI(CollabrifyClient c, LoadCompletedEventHandler del = null)
        {
            Debug.WriteLine(LOG_TAG + ": building ChannelAPI.");
              mChannelClosed = true;

              client = c;

              // Builds the browser object
              try
              {
            browser = new WebBrowser();
            browser.IsScriptEnabled = true;
            browser.ScriptNotify += ScriptCallback;
            browser.LoadCompleted += delegate { };
            if(del != null) browser.LoadCompleted += del;
              }
              catch( Exception ex)
              {
            Debug.WriteLine(LOG_TAG + ": " + ex.Source);
            Debug.WriteLine("\t" + ex.Message);
              }

              string html = null;
              using (var s = Assembly.GetExecutingAssembly().GetManifestResourceStream("Collabrify_wp8.Resources.home.html"))
              using (var r = new StreamReader(s))
              html = r.ReadToEnd();

              browser.NavigateToString(html);
        }
开发者ID:jessupjn,项目名称:collabrify-tests,代码行数:30,代码来源:ChannelAPI.cs


示例10: Capture

    protected void Capture(object sender, EventArgs e)
    {
        string url = txtUrl.Text.Trim();

        Thread thread = new Thread(delegate()
        {
            using (WebBrowser browser = new WebBrowser())
            {
                browser.ScrollBarsEnabled = false;
                browser.AllowNavigation = false;
                browser.AllowWebBrowserDrop = false;
                browser.ScriptErrorsSuppressed = true;
                browser.Navigate("www.cnn.com");
                //browser.Navigate((url, null, <data>, "Content-Type: application/x-www-form-urlencoded");)
                browser.Width = 1024;
                browser.Height = 768;
                browser.ClientSize = new Size(1024,768);
                browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(DownloadCompleted);
                while ((browser.IsBusy) |  (browser.ReadyState != WebBrowserReadyState.Complete))
                {
                    System.Windows.Forms.Application.DoEvents();
                }
                //Thread.Sleep(5000);
                //browser.Dispose();
            }
        });
        thread.SetApartmentState(ApartmentState.STA);
        thread.Start();
        thread.Join();
    }
开发者ID:hansparsons,项目名称:SharePage,代码行数:30,代码来源:MainPage.aspx.cs


示例11: Attribute

		public Attribute (WebBrowser control, nsIDOMAttr domAttribute)
			: base (control, domAttribute as nsIDOMNode)
		{
			if (control.platform != control.enginePlatform)
				this.attribute = nsDOMAttr.GetProxy (control, domAttribute);
			else
				this.attribute = domAttribute;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:Attribute.cs


示例12: DOMObject

		internal DOMObject (WebBrowser control)
		{
			this.control = control;
			IntPtr p = Base.StringInit ();
			storage = new HandleRef (this, p);
			resources = new Hashtable ();
			event_handlers = null;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:DOMObject.cs


示例13: DOMImplementation

		public DOMImplementation(WebBrowser control, nsIDOMDOMImplementation domImpl) : base (control)
		{
			if (control.platform != control.enginePlatform)
				unmanagedDomImpl = nsDOMDOMImplementation.GetProxy (control, domImpl);
			else
				unmanagedDomImpl = domImpl;
			hashcode = unmanagedDomImpl.GetHashCode ();				
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:DOMImplementation.cs


示例14: GetAppLinkFromUrlInBackground

 public void GetAppLinkFromUrlInBackground(Uri uri)
 {
     appLinkCrawlerBrowser = new WebBrowser();
     appLinkCrawlerBrowser.IsScriptEnabled = true;
     appLinkCrawlerBrowser.ScriptNotify += AppLinkCrawlerBrowserOnScriptNotify;
     appLinkCrawlerBrowser.LoadCompleted += AppLinkCrawlerBrowserOnLoadCompleted;
     appLinkCrawlerBrowser.Navigate(uri);
 }
开发者ID:RishabhHarit,项目名称:facebook-winclient-sdk,代码行数:8,代码来源:WebViewAppLinkResolver.cs


示例15: Stylesheet

		public Stylesheet(WebBrowser control, nsIDOMStyleSheet stylesheet) : base (control)
		{
			if (control.platform != control.enginePlatform)
				unmanagedStyle = nsDOMStyleSheet.GetProxy (control, stylesheet);
			else
				unmanagedStyle = stylesheet;
			hashcode = unmanagedStyle.GetHashCode ();			
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:Stylesheet.cs


示例16: NamedNodeMap

		public NamedNodeMap (WebBrowser control, nsIDOMNamedNodeMap nodeMap)
			: base (control, true)
		{
			if (control.platform != control.enginePlatform)
				unmanagedNodes = nsDOMNamedNodeMap.GetProxy (control, nodeMap);
			else
				unmanagedNodes = nodeMap;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:NamedNodeMap.cs


示例17: Document

		public Document (WebBrowser control, nsIDOMDocument document)
			: base (control, document)
		{
			if (control.platform != control.enginePlatform)
				this.node = nsDOMDocument.GetProxy (control, document);
			else
				this.node = document;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:Document.cs


示例18: from_10bet_1

 public BsonDocument from_10bet_1(ref WebBrowser browser, BsonDocument doc_result)
 {
     doc_result = Match100Helper.get_doc_result();
     BrowserHelper.invoke_click_by_id(ref browser, "tp_chk_br_999_l_1_1");
     doc_result["data"] = "Invoke Click!";
     doc_result["url"] = browser.Document.Url.ToString();
     return doc_result;
 }
开发者ID:topomondher,项目名称:web_helper,代码行数:8,代码来源:Match100Method.cs


示例19: DocumentType

		public DocumentType (WebBrowser control, nsIDOMDocumentType doctype)
			: base (control, doctype as nsIDOMNode)
		{
			if (control.platform != control.enginePlatform)
				this.doctype = nsDOMDocumentType.GetProxy (control, doctype);
			else
				this.doctype = doctype;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:DocumentType.cs


示例20: VKApiWrapper

        public VKApiWrapper(WebBrowser browser, int appId)
        {
            this.browser = browser;
            this.appId = appId;

            //this.browser.ClearCookiesAsync();
            //this.browser.ClearInternetCacheAsync();
        }
开发者ID:e-novikov,项目名称:VkontakteAudioDownloader_WP8,代码行数:8,代码来源:VKApiWrapper.cs



注:本文中的WebBrowser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebChannelFactory类代码示例发布时间:2022-05-24
下一篇:
C# Web类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap