コード例 #1
0
		public static void SetAuthorInformation (string name = null, string email = null , string copyright = null,
			string company = null, string trademark = null, Action<string> takeScreenshot = null)
		{
			takeScreenshot = takeScreenshot ?? new Action<string> (delegate {});

			if (name == null && email == null && copyright == null && company == null && trademark == null)
				throw new ArgumentNullException ("Atleast one of these arguments need to be not null: name, email, copyright, company, trademark");

			var prefs = new PreferencesController ();
			prefs.Open ();
			prefs.SelectPane ("Author Information");
			prefs.SetEntry ("nameEntry", name, "Name", takeScreenshot);
			prefs.SetEntry ("emailEntry", email, "Email", takeScreenshot);
			prefs.SetEntry ("copyrightEntry", copyright, "Copyright", takeScreenshot);
			prefs.SetEntry ("companyEntry", company, "Company", takeScreenshot);
			prefs.SetEntry ("trademarkEntry", trademark, "Trademark", takeScreenshot);
			prefs.ClickOK ();
		}
コード例 #2
0
        public static void SetAuthorInformation(string name    = null, string email     = null, string copyright = null,
                                                string company = null, string trademark = null, Action <string> takeScreenshot = null)
        {
            takeScreenshot = takeScreenshot ?? new Action <string> (delegate {});

            if (name == null && email == null && copyright == null && company == null && trademark == null)
            {
                throw new ArgumentNullException("Atleast one of these arguments need to be not null: name, email, copyright, company, trademark");
            }

            var prefs = new PreferencesController();

            prefs.Open();
            prefs.SelectPane("Author Information");
            prefs.SetEntry("nameEntry", name, "Name", takeScreenshot);
            prefs.SetEntry("emailEntry", email, "Email", takeScreenshot);
            prefs.SetEntry("copyrightEntry", copyright, "Copyright", takeScreenshot);
            prefs.SetEntry("companyEntry", company, "Company", takeScreenshot);
            prefs.SetEntry("trademarkEntry", trademark, "Trademark", takeScreenshot);
            prefs.ClickOK();
        }