コード例 #1
0
        public CombineOptionsDialog(Gtk.Window parentWindow, Combine combine, IAddInTreeNode node, IAddInTreeNode configurationNode)
            : base(parentWindow, null, null)
        {
            this.combine = combine;
            this.configurationNode = configurationNode;
            this.Title = GettextCatalog.GetString ("Combine Options");

            configData = ConfigurationData.Build (combine);
            configData.ConfigurationsChanged += new EventHandler (OnConfigChanged);

            properties = new DefaultProperties();
            properties.SetProperty ("Combine", combine);
            properties.SetProperty ("CombineConfigData", configData);

            AddNodes (properties, Gtk.TreeIter.Zero, node.BuildChildItems (this));

            SelectFirstNode ();
        }
コード例 #2
0
        public static ConfigurationData Build(CombineEntry entry)
        {
            ConfigurationData data = new ConfigurationData (entry);
            foreach (IConfiguration conf in entry.Configurations) {
                IConfiguration copy = entry.CreateConfiguration (conf.Name);
                copy.CopyFrom (conf);
                data.Configurations.Add (copy);
            }

            if (entry is Combine) {
                foreach (CombineEntry e in ((Combine)entry).Entries)
                    data.Children.Add (ConfigurationData.Build (e));
            }
            return data;
        }