コード例 #1
0
ファイル: MyDocument.cs プロジェクト: vijeshrpillai/BNR
        public void ChangeKeyPathOfObjectToValue(NSObject o)
        {
            NSString keyPath  = ((NSArray)o).GetItem <NSString>(0);
            NSObject obj      = ((NSArray)o).GetItem <NSObject>(1);
            NSObject newValue = ((NSArray)o).GetItem <NSObject>(2);

            // setValue:forKeyPath: will cause the key-value observing method
            // to be called, which takes care of the undo stuff
            if (newValue.DebugDescription != "<null>")
            {
                obj.SetValueForKeyPath(newValue, keyPath);
            }
            else
            {
                obj.SetValueForKeyPath(new NSString("New Person"), keyPath);
            }
        }
コード例 #2
0
        public static void SetStyleMode(NSObject obj, PXStylingMode mode)
        {
            var modeNum = new NSNumber((int)mode);

            obj.SetValueForKeyPath(modeNum, new NSString("styleMode"));
        }
コード例 #3
0
 public static void SetStyleCSS(NSObject obj, string id)
 {
     obj.SetValueForKeyPath(new NSString(id), new NSString("styleCSS"));
 }
コード例 #4
0
ファイル: extra.cs プロジェクト: h2oman/MonoTouch-Pixate
 public static void SetStyleMode(NSObject obj, PXStylingMode mode)
 {
     var modeNum = new NSNumber ((int)mode);
     obj.SetValueForKeyPath (modeNum, new NSString ("styleMode"));
 }
コード例 #5
0
ファイル: extra.cs プロジェクト: h2oman/MonoTouch-Pixate
 public static void SetStyleId(NSObject obj, string id)
 {
     obj.SetValueForKeyPath (new NSString (id), new NSString ("styleId"));
 }