public MainPage(IWifiManagerOperations mgr, MainPageVM vm) { InitializeComponent(); this.mgr = mgr; vm.AddMgr(mgr); this.BindingContext = vm; }
public App(IWifiManagerOperations mgr) { InitializeComponent(); //DisplayMetrics displayMetrics = new DisplayMetrics(); //WindowManager.DefaultDisplay.GetRealMetrics(displayMetrics); // displayMetrics.WidthPixels // displayMetrics.HeightPixels var vm = this.Resources["MainPageVM"] as MainPageVM; MainPage = new MainPage(mgr, vm); }
public void AddMgr(IWifiManagerOperations mgr) { this.mgr = mgr; IsConnected = mgr.IsConnected(); }