public WebKitFrom(IMainFrm mainFrm, Iot_FunctionDefine funcDefine) : base(mainFrm) { InitializeComponent(); this.mainFrm = mainFrm; this.funName = funcDefine; this.Text = funcDefine.FunName; //登陆检查 if (LoginChecker.getInstance().Login(mainFrm)) { //登录成功 string strURL = string.Format("{0}/{1}", LoginChecker.getInstance().CompanyAccount.ServiceURL, funcDefine.URI); Uri url = new System.Uri(strURL, System.UriKind.Absolute); this.webKitBrowser1.Url = url; //加载 CreateDefineBar(); if (this.DefineBar != null) { this.DefineBar.BarName = "bar_" + funcDefine.FunName; this.DefineBar.Text = funcDefine.FunName; this.SetDock(); } } else { this.webKitBrowser1.Url = new System.Uri(string.Format("{0}/{1}", LoginChecker.getInstance().CompanyAccount.ServiceURL, "Fail.html"), System.UriKind.Absolute);; } //下面加载自定义bar工具条 }
public bool Login(IMainFrm mainFrm) { this.mainFrm = mainFrm; if (isLogin) { return(true); } else { //登陆 string strURL = string.Format("{0}/Login.aspx", this.companyAccount.ServiceURL); Uri url = new System.Uri(strURL, System.UriKind.Absolute); LoginCheck lc = new LoginCheck(url, true); lc.ShowDialog(); isLogin = lc.OK; if (lc.OK) { this._timer.Start(); } else { this._timer.Stop(); } return(lc.OK); } }
public RePrintNote(IMainFrm mainFrm, User user, TicketPrinter printer) { InitializeComponent(); this.mainFrm = mainFrm; this._user = user; this.printer = printer; strURL = string.Format("{0}/IotM/SFXT/Payment.html", LoginChecker.getInstance().CompanyAccount.ServiceURL); this.webKitBrowser1.Url = new System.Uri(strURL, System.UriKind.Absolute); }
public static async Task <T> RunBusyWork <T>(this IMainFrm manager, Func <T> func, string title = "系统正忙", string message = "正在处理长时间操作") { var dock = manager as IDockableManager; ControlExtended.UIInvoke(() => dock?.SetBusy(ProgressBarState.Indeterminate, title, message)); var item = await Task.Run(func); ControlExtended.UIInvoke(() => dock?.SetBusy(ProgressBarState.NoProgress)); return(item); }
public static async Task <T> RunBusyWork <T>(this IMainFrm manager, Func <T> func, string title = "系统正忙", string message = "Processing long running task") { var dock = manager as IDockableManager; ControlExtended.UIInvoke(() => dock.SetBusy(true, title, message)); T item = await Task.Run(func); ControlExtended.UIInvoke(() => dock.SetBusy(false)); return(item); }
public Payment(IMainFrm mainFrm, User user) { InitializeComponent(); this._user = user; this.mainFrm = mainFrm; if (this._user != null) { this.txtUserId.Text = this._user.UserID; this.txtUserName.Text = this._user.UserName; this.txtMeterNo.Text = this._user.MeterNo; this.txtAddress.Text = this._user.Address; } this.txtAmount.Select(0, 1); strURL = string.Format("{0}/IotM/SFXT/Payment.html", LoginChecker.getInstance().CompanyAccount.ServiceURL); this.webKitBrowser1.Url = new System.Uri(strURL, System.UriKind.Absolute); }
public BarWebKitFrom(IMainFrm mainFrm, Iot_ChildFunctionBar functionBar) { InitializeComponent(); this.mainFrm = mainFrm; this.functionBar = functionBar; this.Text = functionBar.FunName; //登陆检查 if (LoginChecker.getInstance().Login(mainFrm)) { //登录成功 string strURL = string.Format("{0}/{1}", LoginChecker.getInstance().CompanyAccount.ServiceURL, functionBar.URI); Uri url = new System.Uri(strURL, System.UriKind.Absolute); this.webKitBrowser1.Url = url; } else { this.webKitBrowser1.Url = new System.Uri(string.Format("{0}/{1}", LoginChecker.getInstance().CompanyAccount.ServiceURL, "Fail.html"), System.UriKind.Absolute);; } }
public PayManageForm(IMainFrm mainFrm) { InitializeComponent(); this.mainFrm = mainFrm; this.btnPrinterSelect.Visible = mainFrm.IsExist(1024); if (LoginChecker.getInstance().Login(mainFrm)) { //登录成功 string strURL = string.Format("{0}/IotM/SFXT/Payment.html", LoginChecker.getInstance().CompanyAccount.ServiceURL); Uri url = new System.Uri(strURL, System.UriKind.Absolute); this.webKitBrowser1.Url = url; } else { this.webKitBrowser1.Url = new System.Uri(string.Format("{0}/{1}", LoginChecker.getInstance().CompanyAccount.ServiceURL, "Fail.html"), System.UriKind.Absolute);; } //需要增加票据模版定义功能 using (CompanyAccountServiceBF bf = new CompanyAccountServiceBF()) { this.printer = new TicketPrinter(bf.ICompanyAccount.GetIotPayTicketTemplate()); } }
public LocalFunction(IMainFrm mainFrm, Iot_FunctionDefine funcDefine) { this.mainFrm = mainFrm; this.funName = funcDefine; this.OnEventHandler = new EventHandler(itemMenu_OnClicked); }
public BarFunction(IMainFrm mainFrm, Iot_ChildFunctionBar barFunction) { this.mainFrm = mainFrm; this.barFunction = barFunction; this.OnEventHandler = new EventHandler(itemMenu_OnClicked); }
public IotMeterSystemPlus(IMainFrm mainFrm) : base(mainFrm) { }