Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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());
        }