예제 #1
0
        public override void OnCreate()
        {
            base.OnCreate();

            Options = new ApplicationOptions();
            Runner.Instance.Options.TimeoutMessage = Resources.GetString(Resource.String.TimeoutMessage);
            Runner.Instance.Options.UsingMessage   = Resources.GetString(Resource.String.UsingMessage);
            Runner.Instance.Options.ClassMessage   = Resources.GetString(Resource.String.ClassMessage);

            _preferenceChangeListener = new SharedPreferenceChangeListener(this);

            var preferences = PreferenceManager.GetDefaultSharedPreferences(this);

            preferences.RegisterOnSharedPreferenceChangeListener(_preferenceChangeListener);

            if (preferences.GetBoolean(PreferenceKeys.SaveNamespaces, false))
            {
                string namespaces = preferences.GetString(PreferenceKeys.SavedNamespaces, "");

                if (!string.IsNullOrEmpty(namespaces))
                {
                    Runner.Instance.Options.DefaultNamespaces = new List <string>(namespaces.Split(','));
                }
            }
        }
예제 #2
0
        public override void OnCreate()
        {
            base.OnCreate();

            Options = new ApplicationOptions();
            Runner.Instance.Options.TimeoutMessage = Resources.GetString(Resource.String.TimeoutMessage);
            Runner.Instance.Options.UsingMessage = Resources.GetString(Resource.String.UsingMessage);
            Runner.Instance.Options.ClassMessage = Resources.GetString(Resource.String.ClassMessage);

            _preferenceChangeListener = new SharedPreferenceChangeListener(this);

            var preferences = PreferenceManager.GetDefaultSharedPreferences(this);
            preferences.RegisterOnSharedPreferenceChangeListener(_preferenceChangeListener);

            if (preferences.GetBoolean(PreferenceKeys.SaveNamespaces, false))
            {
                string namespaces = preferences.GetString(PreferenceKeys.SavedNamespaces, "");

                if (!string.IsNullOrEmpty(namespaces))
                    Runner.Instance.Options.DefaultNamespaces = new List<string>(namespaces.Split(','));
            }
        }