基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Control;
|
||||
|
||||
namespace Lskj.PubBrower2
|
||||
{
|
||||
public partial class previewFrm : UserControl
|
||||
{
|
||||
public previewFrm()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.SizeChanged += OnSizeChanged;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:窗口加载</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2019-06-28 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
public void OnLoad(string url, int RightKeyFlag)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isPostFlag = this.moduleWebView.PubBrowerModel.isPostFlag == 1;
|
||||
if (isPostFlag)
|
||||
{
|
||||
this.moduleWebView.FrmLoad("");
|
||||
this.moduleWebView.LoadRequest(url, this.moduleWebView.PubBrowerModel.postData);
|
||||
}
|
||||
else
|
||||
this.moduleWebView.FrmLoad(url);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体大小改变时
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnSizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.moduleWebView.cefBrowserSettings != null)
|
||||
{
|
||||
var handle = this.moduleWebView.cefBrowserSettings.GetHost().GetWindowHandle();
|
||||
this.moduleWebView.ResizeWindow(handle, this.Width, this.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user