public static SettingsProvider MySetting()
 {
     return(new SettingsProvider("Project/MySetting", SettingsScope.Project)
     {
         activateHandler = (s, element) =>
         {
             mySetting = MyFramework.GetOrCreateSetting();
             mS_Setting = new SerializedObject(mySetting);
             if (mS_Setting != null)
             {
                 m_Str = mS_Setting.FindProperty("str");
                 m_Num = mS_Setting.FindProperty("number");
             }
         },
         guiHandler = (s) =>
         {
             EditorGUILayout.BeginVertical(GUILayout.MaxWidth(500));
             EditorGUILayout.PropertyField(m_Str, new GUIContent("字符串测试"));
             EditorGUILayout.PropertyField(m_Num, new GUIContent("数字测试"));
             EditorGUILayout.EndVertical();
             mS_Setting.ApplyModifiedProperties();
         },
         deactivateHandler = () => {},
     });
 }
Example #2
0
        public override void ViewDidLoad()
        {
            View.BackgroundColor = UIColor.FromRGB(204, 255, 255);              // light blue

            var view = new UILabel(new CGRect(0, 50, View.Bounds.Width, View.Bounds.Height));

            view.Text          = MyFramework.CallFunction();
            view.TextAlignment = UITextAlignment.Center;
            View.Add(view);

            base.ViewDidLoad();
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            vc = new UIViewController();
            vc.View.BackgroundColor = UIColor.FromRGB(204, 255, 255);              // light blue

            var view = new UILabel(new CGRect(0, 0, window.Bounds.Width, window.Bounds.Height));

            view.Text          = MyFramework.CallFunction();
            view.TextAlignment = UITextAlignment.Center;
            vc.View.Add(view);

            window.RootViewController = vc;
            window.MakeKeyAndVisible();
            return(true);
        }
        public override void ViewDidLoad()
        {
            var view = new UILabel(new CGRect(0, 50, View.Bounds.Width, View.Bounds.Height));

            view.Text          = MyFramework.CallFunction();
            view.TextAlignment = UITextAlignment.Center;
            View.Add(view);

            var view2 = new UILabel(new CGRect(0, 100, View.Bounds.Width, View.Bounds.Height));

            view2.Text          = SimpleFrameworkBinding.MyObjectiveCClass.CallMethod();
            view2.TextAlignment = UITextAlignment.Center;
            View.Add(view2);

            view.BackgroundColor = UIColor.FromRGB(229, 255, 204);              // light green

            base.ViewDidLoad();
        }