protected override async void OnCreate (Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); PreferenceManager.SetDefaultValues(this, Resource.Xml.Preferences, false); _remote = new PTZRemote(); AttachHandlers(); await ConnectToRelay(); }
public override async void ViewDidLoad () { base.ViewDidLoad(); Title = "PTZ Remote"; View.BackgroundColor = UIColor.LightGray; _remote = new PTZRemote(); AttachHandlers(); RefreshButton = new UIBarButtonItem(UIBarButtonSystemItem.Refresh); RefreshButton.Clicked += HandleRefreshButtonClicked; NavigationItem.RightBarButtonItem = RefreshButton; await ConnectToRelay(); }