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;
		}
示例#3
0
        public void Customize(ExecutionCommand cmd, object data)
        {
            DotNetExecutionCommand  command = (DotNetExecutionCommand)cmd;
            MonoExecutionParameters config  = (MonoExecutionParameters)data;

            string opts;

            config.GenerateOptions(command.EnvironmentVariables, out opts);
            command.RuntimeArguments = opts;
        }
 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 Gtk.Widget Load (CommandExecutionContext ctx, object data)
		{
			config = (MonoExecutionParameters) data;
			if (config != null)
				config = config.Clone ();
			else
				config = new MonoExecutionParameters ();
			propertyGrid.CurrentObject = config;
			
			return this;
		}
        public Gtk.Widget Load(CommandExecutionContext ctx, object data)
        {
            config = (MonoExecutionParameters)data;
            if (config != null)
            {
                config = config.Clone();
            }
            else
            {
                config = new MonoExecutionParameters();
            }
            propertyGrid.CurrentObject = config;

            return(this);
        }
        public MonoExecutionParametersPreview(MonoExecutionParameters options)
        {
            this.Build();

            string cmd;
            Dictionary <string, string> vars = new Dictionary <string, string> ();

            options.GenerateOptions(vars, out cmd);

            StringBuilder sb = StringBuilderCache.Allocate();

            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 = StringBuilderCache.ReturnAndFree(sb);
        }
 public void Load(MonoExecutionParameters config)
 {
     this.config = config;
     propertyGrid.CurrentObject = config;
 }