当前位置: 首页>>代码示例>>C#>>正文


C# WebBrowser.SaveToString方法代码示例

本文整理汇总了C#中System.Windows.Controls.WebBrowser.SaveToString方法的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser.SaveToString方法的具体用法?C# WebBrowser.SaveToString怎么用?C# WebBrowser.SaveToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.WebBrowser的用法示例。


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

示例1: User

        public User()
        {
            LogView = new WebBrowser();
            LogView.Navigate(new Uri(AppResources.Server + "League.aspx"));
            //LogView.Navigate(new Uri("/League.html", UriKind.Relative));
            int loadbrowser = 0;
            while (LogView.SaveToString().Length < 1) { loadbrowser++; }
            string x = LogView.SaveToString();
            MessageBox.Show("Done");

            InitializeComponent();
        }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:12,代码来源:User.xaml.cs

示例2: GoalB_Click

 private void GoalB_Click(object sender, RoutedEventArgs e)
 {
     WebBrowser browser1 = new WebBrowser();
     browser1.Navigate(new Uri(AppResources.Server + "Goal.aspx?teamScoring=" + "B" + "&MatchId=" + AppResources.GameId));
     int loadbrowser = 0;
     while (browser1.SaveToString().Length < 1) { loadbrowser++; }
     string Data = browser1.SaveToString();
     string[] RawHtmlSplit = Data.Split('`');
     string DataNeeded = RawHtmlSplit[1];
     if (DataNeeded.Contains("Score Updated"))
     {
         scoreB++;
         ScoreB.Text = String.Format("{0}", scoreB);
     }
     else MessageBox.Show("Action Failed");
 }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:16,代码来源:Ref.xaml.cs

示例3: signup_Click

        private void signup_Click(object sender, RoutedEventArgs e)
        {
            WebBrowser Browser12 = new WebBrowser();
            Browser12.Navigate(new Uri(AppResources.Server + "Login.aspx?Type=Register&Name=" + Name.Text + "&Password=" + Password.Text + "&email=" + e_mail.Text + "&team="+team.Text));
            //string Temp = Browser12.SaveToString();
            string Data = null;//
            int loadbrowser = 0;
            while (Browser12.SaveToString().Length < 1) { loadbrowser++; }

            Data = Browser12.SaveToString();

            string[] RawHtmlSplit = Data.Split('`');
            string DataNeeded = RawHtmlSplit[1];
            if(DataNeeded.Contains("User Added"))
            {
                string[] Clean = DataNeeded.Split(',');
                UserData.Text = Clean[0] + "\n" + "Your New Username is: " + Clean[1];
            }
        }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:19,代码来源:SignUp.xaml.cs

示例4: SaveImgMethod

        private void SaveImgMethod(System.Windows.Controls.TextBox textBox, WebBrowser webBrowser)
        {
            Match host = Regex.Match(textBox.Text, "http://[ a-z|A-Z|\\:\\.\\-_0-9]*(\\/|)");

            int i = 0;
            MatchCollection Mcoll = Regex.Matches(webBrowser.SaveToString(), "src=\"[ a-z|A-Z|\\:\\/\\.\\-_0-9]*(.jpg|.png)");

            string[] aux = new string[Mcoll.Count];
            foreach (Match m in Mcoll)
            {

                if (!Regex.IsMatch(m.Value, "http://"))
                {
                    aux[i] = host.ToString() + m.Value.Replace("src=\"", "");
                    aux[i] = aux[i].Replace("//", "/");
                }
                else
                {

                    aux[i] = m.Value.Replace("src=\"", "");
                }

                i++;
            }

            ((System.Windows.Controls.Frame)this.Parent).DataContext = aux;

            NavigationService.Navigate(new Uri("/SaveImg.xaml?url=" + textBox.Text, UriKind.RelativeOrAbsolute));
        }
开发者ID:jose-mendez,项目名称:EvolucionBrowser,代码行数:29,代码来源:MainPage.xaml.cs

示例5: YellowB_Click

 private void YellowB_Click(object sender, RoutedEventArgs e)
 {
     WebBrowser browser1 = new WebBrowser();
     browser1.Navigate(new Uri(AppResources.Server + "Card.aspx?Team=" + AppResources.TeamB + "&CardType=Yellow"));
     int loadbrowser = 0;
     while (browser1.SaveToString().Length < 1) { loadbrowser++; }
     string Data = browser1.SaveToString();
     string[] RawHtmlSplit = Data.Split('`');
     string DataNeeded = RawHtmlSplit[1];
     if (DataNeeded.Contains("Success!"))
     {
         yellowB++;
         YellowBtxt.Text = String.Format("{0}", yellowB);
     }
     else MessageBox.Show("Action Failed");
 }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:16,代码来源:Ref.xaml.cs

示例6: stop_Click

        private void stop_Click(object sender, RoutedEventArgs e)
        {
            WebBrowser browser1 = new WebBrowser();
            //browser1.Source = new Uri("http://mc:1482/aspx?UserId=Iz001&MatchId=1");
            browser1.Navigate(new Uri(AppResources.Server + "Stop.aspx?UserId=" + AppResources.UserID + "&MatchId=" + AppResources.GameId));
            int loadbrowser = 0;
            while (browser1.SaveToString().Length < 1) { loadbrowser++; }
            string Data = browser1.SaveToString();
            string[] RawHtmlSplit = Data.Split('`');
            string DataNeeded = RawHtmlSplit[1];
            string output = "";
            if (!DataNeeded.Contains("Has Started"))
            {
                string[] MatchInfo = DataNeeded.Split(',');
                AppResources.TeamA = MatchInfo[1];
                AppResources.TeamB = MatchInfo[2];
                //AppResources.GameId = MatchInfo[3];
                output = MatchInfo[0];
            }
            else output = DataNeeded;

            Commands.Text = output;
            mytimer.Stop();
        }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:24,代码来源:Ref.xaml.cs

示例7: PopulateFixtures

 private void PopulateFixtures()
 {
     WebBrowser browser1 = new WebBrowser();
     browser1.Navigate(new Uri(AppResources.Server + "Fixture.aspx"));
     int loadbrowser = 0;
     while (browser1.SaveToString().Length < 1) { loadbrowser++; }
     string Data = browser1.SaveToString();
     string[] RawHtmlSplit = Data.Split('`');
     string DataNeeded = RawHtmlSplit[1];
     string[] fixes = DataNeeded.Split('|');
     foreach (string fix in fixes)
     {
         if (fix.Length > 2)
         {
             string[] game = fix.Split(',');
             Fixture TGame = new Fixture();
             TGame.idfixture = game[0]; TGame.TeamA = game[1]; TGame.TeamB = game[2];
             Fixtures.Add(TGame);
         }
     }
 }
开发者ID:davidsamuel1610,项目名称:DDT,代码行数:21,代码来源:Ref.xaml.cs


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