public BindableUIAlertView(string title, string message, UIAlertViewDelegate del, string cancelButtonTitle, params string[] otherButtons) #pragma warning disable CS0618 // Type or member is obsolete : base(title, message, del, cancelButtonTitle, otherButtons) #pragma warning restore CS0618 // Type or member is obsolete { InitializeBinder(); }
// This method is invoked when the application has loaded its UI and its ready to run public override bool FinishedLaunching(UIApplication app, NSDictionary options) { dataSource = new EmployeeDataSource(this); @delegate = new EmployeeListDelegate(this); tableviewEmployee.DataSource = dataSource; tableviewEmployee.Delegate = @delegate; alertDelegate = new CallAlert(this); //System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of CorporateDirectory1.Employee'. var e = new Employee(); e.Firstname = "a"; e.Work = 1; e.Mobile = 2; e.Lastname = "b"; e.Department = "c"; e.Email = "@"; var f = e.Firstname; var g = e.Work; var h = e.Mobile; var i = e.Lastname; var j = e.Department; var k = e.Email; using (var db = new SQLiteClient.SQLiteConnection("phonebook")) { // Perform strongly typed queries var users = db.Query <Employee>("SELECT Firstname, Lastname, Work, Mobile, Department, Email FROM Phonebook ORDER BY Lastname", 1000); listData = users.ToList(); } window.MakeKeyAndVisible(); return(true); }
public override void ViewDidLoad() { base.ViewDidLoad(); this.NavigationItem.HidesBackButton = true; this.NavigationItem.SetRightBarButtonItem( new UIBarButtonItem(UIBarButtonSystemItem.Action, (sender, args) => { NSString state = (NSString)ShowKit.ShowKit.GetStateForKey(ShowKit.Constants.SHKConnectionStatusKey); switch (state) { case ShowKit.Constants.SHKConnectionStatusLoggedIn: ShowKit.ShowKit.Logout(); break; case ShowKit.Constants.SHKConnectionStatusInCall: ShowKit.ShowKit.HangupCall(); break; default: this.NavigationController.PopViewControllerAnimated(true); Console.WriteLine("default here"); break; } }) , true); this.dashboardViewController = this; this.alertDelegate = new AlertDelegate(this); this.alertGestureDelegate = new AlertGestureDelegate(this); }
public void AskForPassword() { string title, message; if (alertViewDelegate == null) { alertViewDelegate = new UIAlertViewOkCancelDelegate(InvokeDone, Cancelled); title = Path.GetFileNameWithoutExtension(path); message = "Enter passphrase"; } else { title = "The passphrase you entered could not be used to open file"; message = "Try again?"; } if (alertView == null) { alertView = new UIAlertView(title, message, alertViewDelegate, "Cancel", new string[] { "OK" }); alertView.AlertViewStyle = UIAlertViewStyle.SecureTextInput; } else { alertView.Title = title; alertView.Message = message; } alertView.Show(); }
// This method is invoked when the application has loaded its UI and its ready to run public override bool FinishedLaunching (UIApplication app, NSDictionary options) { dataSource = new EmployeeDataSource(this); @delegate = new EmployeeListDelegate(this); tableviewEmployee.DataSource = dataSource; tableviewEmployee.Delegate = @delegate; alertDelegate = new CallAlert (this); //System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of CorporateDirectory1.Employee'. var e = new Employee(); e.Firstname = "a"; e.Work=1; e.Mobile=2; e.Lastname="b";e.Department="c";e.Email="@"; var f = e.Firstname; var g = e.Work; var h=e.Mobile; var i=e.Lastname; var j=e.Department; var k=e.Email; using (var db = new SQLiteClient.SQLiteConnection("phonebook")) { // Perform strongly typed queries var users = db.Query<Employee>("SELECT Firstname, Lastname, Work, Mobile, Department, Email FROM Phonebook ORDER BY Lastname", 1000); listData = users.ToList(); } window.MakeKeyAndVisible (); return true; }
public Task <int> ShowMessage(string message) { IUIAlertViewDelegate uiAlertViewDelegate = new UIAlertViewDelegate(); UIAlertView error = new UIAlertView(message, "", uiAlertViewDelegate, "OK"); error.Show(); return(Task.FromResult(1)); }
public UIAlertView(string title, string message, UIAlertViewDelegate del, string cancelButtonTitle, params string [] otherButtons) : this(title, message, del, cancelButtonTitle, otherButtons == null || otherButtons.Length == 0 ? IntPtr.Zero : new NSString (otherButtons [0]).Handle, IntPtr.Zero, IntPtr.Zero) { if (otherButtons == null) return; // first button, if present, was already added for (int i = 1; i < otherButtons.Length; i++) AddButton (otherButtons [i]); }
public AlertView (string title, string message,UIAlertViewDelegate del, string cancelButtonTitle, params string[] otherButtons) : base () { Title = title; Message = message; Delegate = del; // add buttons CancelButtonIndex = AddButton (cancelButtonTitle); foreach (string s in otherButtons) AddButton (s); }
public TextAlertView(string title, UIAlertViewDelegate del, string defaultText) : base(title, " ", del, LocalisationManager.GetString(OsuString.Cancel), LocalisationManager.GetString(OsuString.Okay)) { textField = new UITextField(new RectangleF(12, 45, 260, 25)); textField.BackgroundColor = UIColor.White; textField.AutocorrectionType = UITextAutocorrectionType.No; textField.Text = defaultText; AddSubview(textField); //Transform = CGAffineTransform.MakeTranslation(0,130); }
public void Dispose () { if (this.alertViewDelegate != null) { this.alertViewDelegate.Dispose (); this.alertViewDelegate = null; } if (this.alertView != null) { this.alertView.Delegate = null; this.alertView.DismissWithClickedButtonIndex (alertView.CancelButtonIndex, false); this.alertView.Dispose (); this.alertView = null; } }
public UIAlertView(string title, string message, UIAlertViewDelegate del, string cancelButtonTitle, params string [] otherButtons) : this(title, message, del, cancelButtonTitle, otherButtons == null || otherButtons.Length == 0 ? IntPtr.Zero : new NSString(otherButtons [0]).Handle, IntPtr.Zero, IntPtr.Zero) { if (otherButtons == null) { return; } // first button, if present, was already added for (int i = 1; i < otherButtons.Length; i++) { AddButton(otherButtons [i]); } }
public void Dispose() { if (this.alertViewDelegate != null) { this.alertViewDelegate.Dispose(); this.alertViewDelegate = null; } if (this.alertView != null) { this.alertView.Delegate = null; this.alertView.DismissWithClickedButtonIndex(alertView.CancelButtonIndex, false); this.alertView.Dispose(); this.alertView = null; } }
public void AskForPassword () { string title, message; if (alertViewDelegate == null) { alertViewDelegate = new UIAlertViewOkCancelDelegate(InvokeDone, Cancelled); title = Path.GetFileNameWithoutExtension(path); message = "Enter passphrase"; } else { title = "The passphrase you entered could not be used to open file"; message = "Try again?"; } if (alertView == null) { alertView = new UIAlertView (title, message, alertViewDelegate, "Cancel", new string[] { "OK" }); alertView.AlertViewStyle = UIAlertViewStyle.SecureTextInput; } else { alertView.Title = title; alertView.Message = message; } alertView.Show (); }
void ShowCrossCountryAlert(Aircraft aircraft, string origin, HashSet<string> missing, double minimum) { var message = new StringBuilder (); string title = "Cross-Country Alert"; int i = 0; if (aircraft == null) { message.AppendLine ("The classification of the aircraft you referenced is unknown."); message.AppendLine (); message.AppendLine ("Are you sure that this was a Cross-Country flight according to FAA regulations?"); } else if (missing.Count > 0) { message.Append ("Could not verify that this flight was Cross-Country according to FAA regulations because "); if (missing.Count > 1) message.Append ("the following airports are unknown: "); else message.Append ("the following airport is unknown: "); foreach (var airport in missing) { if (i > 0) { if (i + 1 == missing.Count) message.Append (" and "); else message.Append (", "); } message.Append (airport); i++; } message.AppendLine ("."); message.AppendLine (); if (missing.Count > 1) message.AppendFormat ("Are any of these airports greater than {0} nautical miles from {1}?", minimum, origin); else message.AppendFormat ("Is this airport greater than {0} nautical miles from {1}?", minimum, origin); message.AppendLine (); } else { message.AppendFormat ("None of the airports listed are greater than {0} nautical miles from {1}", minimum, origin); message.AppendLine (); message.AppendLine (); message.AppendLine ("Are you sure that this was a Cross-Country flight according to FAA regulations?"); } del = new CrossCountryAlertDelegate (this); alert = new UIAlertView (title, message.ToString (), del, "No", "Yes"); alert.Show (); }
public void Default() { using (var d = new UIAlertViewDelegate()) { Assert.That(d.Handle, Is.EqualTo(IntPtr.Zero), "Handle"); } }
void ShowCrossCountryAlert(List<string> missing) { string title = missing.Count > 1 ? "Missing Airports" : "Missing Airport"; StringBuilder message = new StringBuilder (); if (missing.Count > 1) message.Append ("The following airports are unknown: "); else message.Append ("The following airport is unknown: "); for (int i = 0; i < missing.Count; i++) { if (i > 0) { if (i + 1 == missing.Count) message.Append (" and "); else message.Append (", "); } message.Append (missing[i]); } message.AppendLine ("."); message.AppendLine (); message.AppendLine ("Was this flight a Cross-Country flight?"); del = new CrossCountryAlertDelegate (this); alert = new UIAlertView (title, message.ToString (), del, "No", "Yes"); alert.Show (); }
public UIAlertView(string title, string message, UIAlertViewDelegate del, string cancelButtonTitle, params string [] otherButtons) : this(title, message, (IUIAlertViewDelegate)del, cancelButtonTitle, otherButtons) { }
public TextFieldAlertView(bool secureTextEntry, string title, string message, UIAlertViewDelegate alertViewDelegate, string cancelBtnTitle, params string[] otherButtons) : base(title, message, alertViewDelegate, cancelBtnTitle, otherButtons) { InitializeControl(secureTextEntry); }
void ShowCrossCountryAlert(Aircraft aircraft, string origin, HashSet <string> missing, double minimum) { var message = new StringBuilder(); string title = "Cross-Country Alert"; int i = 0; if (aircraft == null) { message.AppendLine("The classification of the aircraft you referenced is unknown."); message.AppendLine(); message.AppendLine("Are you sure that this was a Cross-Country flight according to FAA regulations?"); } else if (missing.Count > 0) { message.Append("Could not verify that this flight was Cross-Country according to FAA regulations because "); if (missing.Count > 1) { message.Append("the following airports are unknown: "); } else { message.Append("the following airport is unknown: "); } foreach (var airport in missing) { if (i > 0) { if (i + 1 == missing.Count) { message.Append(" and "); } else { message.Append(", "); } } message.Append(airport); i++; } message.AppendLine("."); message.AppendLine(); if (missing.Count > 1) { message.AppendFormat("Are any of these airports greater than {0} nautical miles from {1}?", minimum, origin); } else { message.AppendFormat("Is this airport greater than {0} nautical miles from {1}?", minimum, origin); } message.AppendLine(); } else { message.AppendFormat("None of the airports listed are greater than {0} nautical miles from {1}", minimum, origin); message.AppendLine(); message.AppendLine(); message.AppendLine("Are you sure that this was a Cross-Country flight according to FAA regulations?"); } del = new CrossCountryAlertDelegate(this); alert = new UIAlertView(title, message.ToString(), del, "No", "Yes"); alert.Show(); }
public void ShowPopUp(string title, string message, UIAlertViewDelegate del, string cancelButtonTitle, string[] otherButton) { alert = new UIAlertView(title, message, del, cancelButtonTitle, otherButton); alert.Show(); }
public UIPopupLoginView (string title, string message, UIAlertViewDelegate alertViewDelegate, string cancelBtnTitle, params string[] otherButtons) : base(title, message, alertViewDelegate, cancelBtnTitle, otherButtons) { InitializeControl (); }