public override void ViewDidLoad() { base.ViewDidLoad(); liveInspectionRadioButton.State = NSCellStateValue.On; connectButton.KeyEquivalent = "\r"; locationTextField.Changed += (sender, e) => { if (ClientSessionUri.TryParse(locationTextField?.StringValue, out clientSessionUri)) { clientSessionUriTextField.StringValue = clientSessionUri.ToString(); } else { clientSessionUriTextField.StringValue = "Invalid Location"; } ValidateUserInterface(); }; ValidateUserInterface(); locationTextField.BecomeFirstResponder(); }
public static void ShouldNotEqual(this ClientSessionUri a, ClientSessionUri b) { ((object)a).ShouldNotEqual(b); ((object)new ClientSessionUri(new Uri(a.ToString()))) .ShouldNotEqual(new ClientSessionUri(new Uri(b.ToString()))); (a == b).ShouldBeFalse(); (a != b).ShouldBeTrue(); }
public void OpenWorkbook(string path) { var systemUri = new Uri(path); var uri = new ClientSessionUri(systemUri); uri.WorkbookPath.ShouldEqual(systemUri.LocalPath); uri.SessionKind.ShouldEqual(ClientSessionKind.Workbook); uri.ToString().ShouldEqual(systemUri.ToString()); }