示例#1
0
        public void NSPathControlShouldSetPathItems()
        {
            Asserts.EnsureYosemite();

            var control   = new NSPathControl();
            var pathItems = control.PathItems;

            control.PathItems = new [] { new NSPathControlItem() };

            Assert.IsTrue(control.PathItems != pathItems, "NSPathControlShouldSetPathItems - Failed to set PathItems property");
        }
示例#2
0
        public void NSPathControlShouldSetPlaceholderAttributedString()
        {
            Asserts.EnsureYosemite();

            var control = new NSPathControl();
            var placeholderAttributedString = control.PlaceholderAttributedString;

            control.PlaceholderAttributedString = new NSAttributedString("Test Placeholder");

            Assert.IsTrue(control.PlaceholderAttributedString != placeholderAttributedString, "NSPathControlShouldSetPlaceholderAttributedString - Failed to change PlaceholderAttributedString property");
        }
示例#3
0
        public void NSPathControlShouldSetEditable()
        {
            Asserts.EnsureYosemite();

            var control  = new NSPathControl();
            var editable = control.Editable;

            control.Editable = !editable;

            Assert.IsTrue(control.Editable != editable, "NSPathControlShouldSetEditable - Failed to change the Editable property");
        }
示例#4
0
        public void NSPathControlShouldSetAllowedTypes()
        {
            Asserts.EnsureYosemite();

            var control      = new NSPathControl();
            var allowedTypes = control.AllowedTypes;

            control.AllowedTypes = new [] { (NSString)"exe", (NSString)"jpg" };

            Assert.IsTrue(control.AllowedTypes != allowedTypes, "NSPathControlShouldSetAllowedTypes - Failed to change AllowedTypes property");
        }
        public DebugAssemblyController()
            : base(NSObject.AllocAndInitInstance("DebugAssemblyController"))
        {
            Unused.Value = NSBundle.loadNibNamed_owner(NSString.Create("debug-assembly"), this);

            m_assembly = new IBOutlet<NSPathControl>(this, "assembly").Value;
            m_workingDir = new IBOutlet<NSPathControl>(this, "workingDir").Value;
            m_args = new IBOutlet<NSTextField>(this, "args").Value;
            m_env = new IBOutlet<NSTextField>(this, "env").Value;
            m_tool = new IBOutlet<NSTextField>(this, "tool").Value;

            m_assembly.Call("setDoubleAction:", new Selector("changeAssembly:"));
            m_workingDir.Call("setDoubleAction:", new Selector("changeWorkingDir:"));

            DoLoadPrefs();
            ActiveObjects.Add(this);
        }