Commit e899889cfa1fd8f75720924450f854674b744dab

Authored by wxy
1 parent 16433f72

更换按钮和点击进入浏览器bug

FRControl/App.config
@@ -50,13 +50,13 @@ @@ -50,13 +50,13 @@
50 <value>Resources/close.png</value> 50 <value>Resources/close.png</value>
51 </setting> 51 </setting>
52 <setting name="caseName" serializeAs="String"> 52 <setting name="caseName" serializeAs="String">
53 - <value>案件信息公开</value> 53 + <value>官网</value>
54 </setting> 54 </setting>
55 <setting name="lawyerName" serializeAs="String"> 55 <setting name="lawyerName" serializeAs="String">
56 - <value>预约律师接访</value> 56 + <value>案件信息公开</value>
57 </setting> 57 </setting>
58 <setting name="personName" serializeAs="String"> 58 <setting name="personName" serializeAs="String">
59 - <value>预约人民监督员接访</value> 59 + <value>律师阅卷</value>
60 </setting> 60 </setting>
61 </FRControl.Properties.Settings> 61 </FRControl.Properties.Settings>
62 </userSettings> 62 </userSettings>
FRControl/Properties/Settings.Designer.cs
@@ -184,7 +184,7 @@ namespace FRControl.Properties { @@ -184,7 +184,7 @@ namespace FRControl.Properties {
184 184
185 [global::System.Configuration.UserScopedSettingAttribute()] 185 [global::System.Configuration.UserScopedSettingAttribute()]
186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187 - [global::System.Configuration.DefaultSettingValueAttribute("案件信息公开")] 187 + [global::System.Configuration.DefaultSettingValueAttribute("官网")]
188 public string caseName { 188 public string caseName {
189 get { 189 get {
190 return ((string)(this["caseName"])); 190 return ((string)(this["caseName"]));
@@ -196,7 +196,7 @@ namespace FRControl.Properties { @@ -196,7 +196,7 @@ namespace FRControl.Properties {
196 196
197 [global::System.Configuration.UserScopedSettingAttribute()] 197 [global::System.Configuration.UserScopedSettingAttribute()]
198 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 198 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
199 - [global::System.Configuration.DefaultSettingValueAttribute("预约律师接访")] 199 + [global::System.Configuration.DefaultSettingValueAttribute("案件信息公开")]
200 public string lawyerName { 200 public string lawyerName {
201 get { 201 get {
202 return ((string)(this["lawyerName"])); 202 return ((string)(this["lawyerName"]));
@@ -208,7 +208,7 @@ namespace FRControl.Properties { @@ -208,7 +208,7 @@ namespace FRControl.Properties {
208 208
209 [global::System.Configuration.UserScopedSettingAttribute()] 209 [global::System.Configuration.UserScopedSettingAttribute()]
210 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 210 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
211 - [global::System.Configuration.DefaultSettingValueAttribute("预约人民监督员接访")] 211 + [global::System.Configuration.DefaultSettingValueAttribute("律师阅卷")]
212 public string personName { 212 public string personName {
213 get { 213 get {
214 return ((string)(this["personName"])); 214 return ((string)(this["personName"]));
FRControl/Properties/Settings.settings
@@ -42,13 +42,13 @@ @@ -42,13 +42,13 @@
42 <Value Profile="(Default)">Resources/close.png</Value> 42 <Value Profile="(Default)">Resources/close.png</Value>
43 </Setting> 43 </Setting>
44 <Setting Name="caseName" Type="System.String" Scope="User"> 44 <Setting Name="caseName" Type="System.String" Scope="User">
45 - <Value Profile="(Default)">案件信息公开</Value> 45 + <Value Profile="(Default)">官网</Value>
46 </Setting> 46 </Setting>
47 <Setting Name="lawyerName" Type="System.String" Scope="User"> 47 <Setting Name="lawyerName" Type="System.String" Scope="User">
48 - <Value Profile="(Default)">预约律师接访</Value> 48 + <Value Profile="(Default)">案件信息公开</Value>
49 </Setting> 49 </Setting>
50 <Setting Name="personName" Type="System.String" Scope="User"> 50 <Setting Name="personName" Type="System.String" Scope="User">
51 - <Value Profile="(Default)">预约人民监督员接访</Value> 51 + <Value Profile="(Default)">律师阅卷</Value>
52 </Setting> 52 </Setting>
53 </Settings> 53 </Settings>
54 </SettingsFile> 54 </SettingsFile>
55 \ No newline at end of file 55 \ No newline at end of file
FRControl/WebView.cs
@@ -45,9 +45,22 @@ namespace FRControl @@ -45,9 +45,22 @@ namespace FRControl
45 } 45 }
46 private void webBrowser1_DocumentCompleted_1(object sender, WebBrowserDocumentCompletedEventArgs e) 46 private void webBrowser1_DocumentCompleted_1(object sender, WebBrowserDocumentCompletedEventArgs e)
47 { 47 {
48 - 48 + //System.IO.StreamReader sr = new System.IO.StreamReader(webBrowser1.DocumentStream, Encoding.GetEncoding("gb2312"));
  49 + //string html = sr.ReadToEnd();//获取源文件
  50 + //sr.Close();
  51 + ///*截取table 的html源文件*/
  52 + //int start = html.IndexOf("<div class='indexnews clearfix'>");
  53 + //int end = html.IndexOf("</div>", start) + 8;
  54 + //string tbhtm = html.Substring(start, end - start);
  55 +
  56 + //webBrowser1.DocumentText = tbhtm;//设置为table的html代码
  57 + //将所有的链接的目标,指向本窗体
  58 + foreach (HtmlElement htmlElement in webBrowser1.Document.Links)
  59 + {
  60 + htmlElement.SetAttribute("target", "_self");
  61 + }
49 this.webBrowser1.Document.Window.Error += new HtmlElementErrorEventHandler(Window_Error); 62 this.webBrowser1.Document.Window.Error += new HtmlElementErrorEventHandler(Window_Error);
50 - //获取网页的最大size 63 + //获取网页的最大size
51 Size szba = new Size(webBrowser1.Document.Body.ScrollRectangle.Width, webBrowser1.Document.Body.ScrollRectangle.Height); 64 Size szba = new Size(webBrowser1.Document.Body.ScrollRectangle.Width, webBrowser1.Document.Body.ScrollRectangle.Height);
52 Size sz = webBrowser1.Size; 65 Size sz = webBrowser1.Size;
53 int xbili = (int)((float)sz.Width / (float)szba.Width * 100);//水平方向缩小比例 66 int xbili = (int)((float)sz.Width / (float)szba.Width * 100);//水平方向缩小比例