| | |
| | | { |
| | | |
| | | |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] |
| | | public partial class Resource |
| | | { |
| | | |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.UI.UI2; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.Entity |
| | | { |
| | | |
| | | public class Inverter |
| | | { |
| | | static Inverter _control; |
| | | public static Inverter Ins |
| | | { |
| | | get |
| | | { |
| | | if (_control == null) |
| | | { |
| | | _control = new Inverter(); |
| | | } |
| | | return _control; |
| | | } |
| | | } |
| | | |
| | | |
| | | WebView _h5Page; |
| | | |
| | | string showPageUrl = ""; |
| | | |
| | | public WebView H5Page |
| | | { |
| | | get |
| | | { |
| | | if(_h5Page == null) |
| | | { |
| | | _h5Page = new WebView(); |
| | | //_h5Page.CallJS("action('back')"); |
| | | } |
| | | return _h5Page; |
| | | } |
| | | set |
| | | { |
| | | _h5Page = value; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 加载指定Url的webview |
| | | /// </summary> |
| | | /// <param name="showUrl"></param> |
| | | public void ShowWebviewFormUrl(string showUrl) |
| | | { |
| | | if(showUrl == showPageUrl) |
| | | { |
| | | return; |
| | | } |
| | | showPageUrl = showUrl; |
| | | _h5Page.LoadFileUrl(showPageUrl); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光伏数据 |
| | | /// </summary> |
| | |
| | | }; |
| | | inverterListView.AddChidren(btnOperationDataTotalData); |
| | | |
| | | var clickButton = new Button(); |
| | | inverterListView.AddChidren(clickButton); |
| | | |
| | | clickButton.MouseUpEventHandler = (sender2, e2) => { |
| | | var h5BasePage = new FrameLayout(); |
| | | MainPage.BasePageView.AddChidren(h5BasePage); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | h5BasePage.AddChidren(Inverter.Ins.H5Page); |
| | | Inverter.Ins.ShowWebviewFormUrl("h5/index"); |
| | | }; |
| | | |
| | | |
| | | index++; |
| | | } |
| | |
| | | this.AddChidren(webView); |
| | | webView.LoadFileUrl("h5/index"); |
| | | |
| | | Button button = new Button { Width = 200, Height = 200, Text = "Hello", Y = 300, BackgroundColor = 0xFFFF0012 }; |
| | | button.MouseUpEventHandler += (s, e) => |
| | | { |
| | | webView.CallJS("uniAppAndroidFun(" + "'hello world'" + ")"); |
| | | }; |
| | | this.AddChidren(button); |
| | | //Button button = new Button { Width = 200, Height = 200, Text = "Hello", Y = 300, BackgroundColor = 0xFFFF0012 }; |
| | | //button.MouseUpEventHandler += (s, e) => |
| | | //{ |
| | | // webView.CallJS("uniAppAndroidFun(" + "'hello world'" + ")"); |
| | | //}; |
| | | //this.AddChidren(button); |
| | | |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public void ChoosePersonalCenter() |
| | | { |
| | | ContextView.RemoveAll(); |
| | | var h5Page = new HDL_ON.UI.UI2.H5Page(); |
| | | ContextView.AddChidren(h5Page); |
| | | h5Page.LoadView(); |
| | | return; |
| | | if (MainPage.CurPageIndex == 3) |
| | | { |
| | | return; |