コード例 #1
0
ファイル: Options.cs プロジェクト: TimeIncOSS/Andr.Unit
		// Options are not as useful as under iOS since re-installing the
		// application deletes the file containing them.
		internal Options (Activity activity)
		{
			ISharedPreferences prefs = activity.GetSharedPreferences ("options", FileCreationMode.Private);
			EnableNetwork = prefs.GetBoolean ("remote", false);
			HostName = prefs.GetString ("hostName", "0.0.0.0");
			HostPort = prefs.GetInt ("hostPort", -1);
		}
コード例 #2
0
ファイル: Options.cs プロジェクト: TimeIncOSS/Andr.Unit
		public void Save (Activity activity)
		{
			ISharedPreferences prefs = activity.GetSharedPreferences ("options", FileCreationMode.Private);
			var edit = prefs.Edit ();
			edit.PutBoolean ("remote", EnableNetwork);
			edit.PutString ("hostName", HostName);
			edit.PutInt ("hostPort", HostPort);
			edit.Commit ();
		}
コード例 #3
0
 public void Save(Activity activity)
 {
     var prefs = activity.GetSharedPreferences("options", FileCreationMode.Private);
     var edit = prefs.Edit();
     edit.PutBoolean("remote", EnableNetwork);
     edit.PutString("hostName", HostName);
     edit.PutInt("hostPort", HostPort);
     edit.PutInt("nameDisplay", (int)NameDisplay);
     edit.PutBoolean("parallel", ParallelizeAssemblies);
     edit.Commit();
 }
コード例 #4
0
        // Options are not as useful as under iOS since re-installing the
        // application deletes the file containing them.
        internal RunnerOptions(Activity activity)
        {
            var prefs = activity.GetSharedPreferences("options", FileCreationMode.Private);
            EnableNetwork = prefs.GetBoolean("remote", false);
            HostName = prefs.GetString("hostName", "0.0.0.0");
            HostPort = prefs.GetInt("hostPort", -1);
            NameDisplay = (NameDisplay)prefs.GetInt("nameDisplay", 1);
            ParallelizeAssemblies = prefs.GetBoolean("parallel", false);

            current = this;
        }
コード例 #5
0
 private static void SavePreferences(string api_key, Activity context)
 {
     var prefs = context.GetSharedPreferences("Challonger.preferences", FileCreationMode.Private);
     var editor = prefs.Edit();
     editor.PutString("api_key", api_key).Commit();
    
 }