public MonoExecutionParametersPreview (MonoExecutionParameters options)
		{
			this.Build ();
			
			string cmd;
			Dictionary<string,string> vars = new Dictionary<string, string> ();
			options.GenerateOptions (vars, out cmd);
			
			StringBuilder sb = new StringBuilder ();
			
			if (cmd.Length == 0 && vars.Count == 0) {
				sb.AppendLine (GLib.Markup.EscapeText (GettextCatalog.GetString ("No options have been specified.")));
			}
			
			if (cmd.Length > 0) {
				sb.Append ("<b>").Append (GettextCatalog.GetString ("Command Line Options")).Append ("</b>\n");
				sb.AppendLine ();
				sb.AppendLine (GLib.Markup.EscapeText (cmd));
				sb.AppendLine ();
			}
			
			if (vars.Count > 0) {
				sb.Append ("<b>").Append (GettextCatalog.GetString ("Environment Variables")).Append ("</b>\n");
				sb.AppendLine ();
				List<string> svars = new List<string> ();
				foreach (KeyValuePair<string,string> var in vars)
					svars.Add (GLib.Markup.EscapeText (var.Key) + " = " + GLib.Markup.EscapeText (var.Value));
				svars.Sort ();
				foreach (string svar in svars)
					sb.AppendLine (svar);
			}
			
			labelOps.Markup = sb.ToString ();
		}
		protected virtual void OnButtonResetClicked (object sender, System.EventArgs e)
		{
			propertyGrid.CommitPendingChanges ();
			if (!MessageService.Confirm (GettextCatalog.GetString ("Are you sure you want to clear all specified options?"), AlertButton.Clear))
				return;
			config = new MonoExecutionParameters ();
			propertyGrid.CurrentObject = config;
		}
        public void CheckWeTrimString(MonoExecutionParameters par)
        {
            string ops;

            par.GenerateOptions(new Dictionary <string, string> (), out ops);

            Assert.AreEqual(ops.Trim(), ops);
        }
		public void Load (MonoExecutionParameters config)
		{
			this.config = config;
			propertyGrid.CurrentObject = config;
		}