public void Fill(PackageBuilder builder)
        {
            if (context != null)
            {
                context.Dispose();
            }

            this.builder = builder;
            this.context = builder.CreateDeployContext();

            store.Clear();

            string[] configs = builder.GetSupportedConfigurations();

            string currentActive = comboConfigs.Active != -1 ? comboConfigs.ActiveText : null;
            int    i             = Array.IndexOf(configs, currentActive);

            if (i == -1)
            {
                i = 0;
            }

            ((Gtk.ListStore)comboConfigs.Model).Clear();
            foreach (string conf in configs)
            {
                comboConfigs.AppendText(conf);
            }

            if (configs.Length <= 1)
            {
                labelFiles.Text      = GettextCatalog.GetString("The following files will be included in the package:");
                comboConfigs.Visible = false;
                if (configs.Length == 0)
                {
                    return;
                }
            }
            else if (configs.Length > 0)
            {
                comboConfigs.Visible = true;
                labelFiles.Text      = GettextCatalog.GetString("The following files will be included in the package for the configuration:");
            }

            comboConfigs.Active = i;
        }
Пример #2
0
		public void Fill (PackageBuilder builder)
		{
			if (context != null)
				context.Dispose ();
			
			this.builder = builder;
			this.context = builder.CreateDeployContext ();
			
			store.Clear ();
			
			string[] configs = builder.GetSupportedConfigurations ();
			
			string currentActive = comboConfigs.Active != -1 ? comboConfigs.ActiveText : null;
			int i = Array.IndexOf (configs, currentActive);
			if (i == -1) i = 0;
			
			((Gtk.ListStore)comboConfigs.Model).Clear ();
			foreach (string conf in configs)
				comboConfigs.AppendText (conf);
			
			if (configs.Length <= 1) {
				labelFiles.Text = GettextCatalog.GetString ("The following files will be included in the package:");
				comboConfigs.Visible = false;
				if (configs.Length == 0)
					return;
			}
			else if (configs.Length > 0) {
				comboConfigs.Visible = true;
				labelFiles.Text = GettextCatalog.GetString ("The following files will be included in the package for the configuration:");
			}
			
			comboConfigs.Active = i;
		}