public BaseTagLibraryNodeHelper(string name, ITagLibrary library) : base(name, library) { Bitmap[] images = SharedControls.Utility.CreateImagesFromResourcePaths( "Prometheus.Icons.App_Basics._16.document.png"); this.NodeDefinitions.Add(new NodeDefinition("object", images[0])); }
public ArchiveLibraryNodeHelper(string name, ITagLibrary library) { this.Name = name; this.Library = library; Bitmap[] images = SharedControls.Utility.CreateImagesFromResourcePaths( "Prometheus.Icons.App_Basics._16.folder.png", "Prometheus.Icons.App_Basics._16.folder_closed.png", "Prometheus.Icons.App_Basics._16.document.png"); this.NodeDefinitions.Add(new NodeDefinition("container", images[0], images[1])); this.NodeDefinitions.Add(new NodeDefinition("object", images[2])); }
internal TagSource WhichSource(ITagLibrary library) { if (this.ActiveLibrary == this.archiveLibrary) { return(TagSource.Archive); } if (this.ActiveLibrary == this.userLibrary) { return(TagSource.LocalShared); } if (this.ActiveLibrary == this.projectLibrary) { return(TagSource.LocalProject); } throw new Exception("Could not determine the source of the specified library: " + library.Name); }
public TagBrowserDialog(MapfileVersion ver) { InitializeComponent(); if (!DesignMode) { mapfileVersion = ver; switch (mapfileVersion) { case MapfileVersion.HALOPC: this.archiveLibrary = TagLibraryManager.HaloPC; break; case MapfileVersion.HALOCE: this.archiveLibrary = TagLibraryManager.HaloPC; break; case MapfileVersion.XHALO1: this.archiveLibrary = TagLibraryManager.HaloXbox; break; case MapfileVersion.XHALO2: this.archiveLibrary = TagLibraryManager.Halo2Xbox; break; } this.treeViewComboBox1.PathChanged += new TreeViewComboBox.PathChangedEventHandler(treeViewComboBox1_PathChanged); this.navBarControl1.SelectedLink = this.navBarControl1.Items[0].Links[0]; this.tagArchiveFileListView1.ItemDoubleClicked += new EventHandler(tagArchiveFileListView1_ItemDoubleClicked); this.tagArchiveFileListView1.SelectedIndexChanged += new EventHandler(tagArchiveFileListView1_SelectedIndexChanged); this.tagArchiveFileListView1.MultiSelect = false; //Initialize Project Section state navBarGroup1.ItemLinks[2].Item.Enabled = ProjectManager.ProjectLoaded; if (ProjectManager.ProjectLoaded) { this.projectLibrary = new DiskFolderTagLibrary(OptionsManager.ActiveProjectTagsPath, "Project Tags"); } //Initialize User Library section navBarGroup1.ItemLinks[1].Item.Enabled = false; this.userLibrary = null;//TagLibraryManager.Halo2Xbox; } }
public MasterLibraryArchive(XmlDocument tagDocument, ITagLibrary extractedTags) { XmlNodeList tagNodes = tagDocument.SelectNodes("//tag"); foreach (XmlNode tagNode in tagNodes) { TagInformation tagInfo = new TagInformation(); tagInfo.Filename = tagNode.Attributes["filename"].InnerText; XmlNodeList mapNodes = tagNode.SelectNodes("map"); tagInfo.Maps = new string[mapNodes.Count]; int x = 0; foreach (XmlNode mapNode in mapNodes) { tagInfo.Maps[x] = mapNode.InnerText; x++; } tagList.Add(tagInfo); } this.extractedTags = extractedTags; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.cboSelectedNodeText = new DevExpress.XtraEditors.ImageComboBoxEdit(); this.popupContainer = new DevExpress.XtraEditors.PopupContainerControl(); this.tagTree = new Prometheus.Controls.TagArchiveTree(); this.popupContainerEdit1 = new DevExpress.XtraEditors.PopupContainerEdit(); ((System.ComponentModel.ISupportInitialize)(this.cboSelectedNodeText.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.popupContainer)).BeginInit(); this.popupContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.popupContainerEdit1.Properties)).BeginInit(); this.SuspendLayout(); // // cboSelectedNodeText // this.cboSelectedNodeText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboSelectedNodeText.EditValue = ""; this.cboSelectedNodeText.Location = new System.Drawing.Point(0, 0); this.cboSelectedNodeText.Name = "cboSelectedNodeText"; // // cboSelectedNodeText.Properties // this.cboSelectedNodeText.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.cboSelectedNodeText.Properties.ReadOnly = true; this.cboSelectedNodeText.Properties.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.Never; this.cboSelectedNodeText.Size = new System.Drawing.Size(336, 20); this.cboSelectedNodeText.TabIndex = 0; this.cboSelectedNodeText.ButtonPressed += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.cboSelectedNodeText_ButtonPressed); // // popupContainer // this.popupContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.popupContainer.Appearance.BackColor = System.Drawing.SystemColors.Control; this.popupContainer.Appearance.Options.UseBackColor = true; this.popupContainer.Controls.Add(this.tagTree); this.popupContainer.Location = new System.Drawing.Point(0, 24); this.popupContainer.Name = "popupContainer"; this.popupContainer.Size = new System.Drawing.Size(328, 216); this.popupContainer.TabIndex = 1; // // tagTree // this.tagTree.ActiveTagSource = Prometheus.Controls.FileSource.TagLibrary; this.tagTree.Dock = System.Windows.Forms.DockStyle.Fill; this.tagTree.HotTracking = true; this.tagTree.Location = new System.Drawing.Point(0, 0); this.tagTree.MasterArchive = null; this.tagTree.Name = "tagTree"; this.tagTree.PopupMenu = null; this.tagTree.ShowFiles = false; this.tagTree.Size = new System.Drawing.Size(328, 216); this.tagTree.TabIndex = 0; this.tagTree.TagLibrary = null; this.tagTree.NodeSelected += new System.Windows.Forms.TreeViewEventHandler(this.tagTree_NodeSelected); // // popupContainerEdit1 // this.popupContainerEdit1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.popupContainerEdit1.EditValue = ""; this.popupContainerEdit1.Location = new System.Drawing.Point(0, 0); this.popupContainerEdit1.Name = "popupContainerEdit1"; // // popupContainerEdit1.Properties // this.popupContainerEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.popupContainerEdit1.Properties.PopupControl = this.popupContainer; this.popupContainerEdit1.Properties.ShowPopupCloseButton = false; this.popupContainerEdit1.Size = new System.Drawing.Size(336, 20); this.popupContainerEdit1.TabIndex = 2; // // TreeViewComboBox // this.Controls.Add(this.popupContainer); this.Controls.Add(this.cboSelectedNodeText); this.Controls.Add(this.popupContainerEdit1); this.Name = "TreeViewComboBox"; this.Size = new System.Drawing.Size(336, 248); ((System.ComponentModel.ISupportInitialize)(this.cboSelectedNodeText.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.popupContainer)).EndInit(); this.popupContainer.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.popupContainerEdit1.Properties)).EndInit(); this.ResumeLayout(false); }
public TagGenerator(ITagLibrary library, ActiveProfile profile, Func<Type, object> serviceLocator) { _library = library; _profile = profile; _serviceLocator = serviceLocator; }
public static void AddTagSet(string tagSetName, string masterLibraryFilename, ITagLibrary tagLibrary) { //TagSet tagSet = new TagSet(); XmlDocument masterDoc = new XmlDocument(); masterDoc.Load(masterLibraryFilename); XmlNodeList fileNodes = masterDoc.SelectNodes("//tag"); MasterTagList masterList = new MasterTagList(); foreach (XmlNode node in fileNodes) { TagInformation info = new TagInformation(); info.Filename = node.Attributes["filename"].InnerText; XmlNodeList mapNodes = node.SelectNodes("map"); info.Maps = new string[mapNodes.Count]; int count = 0; foreach (XmlNode mapNode in mapNodes) { info.Maps[count] = mapNode.InnerText; count++; } masterList.Add(info); } // tagSet.MasterList = masterList; // tagSet.tagLibrary = tagLibrary; // this.tagSets.Add(tagSet); // // this.repositoryItemComboBox1.Items.Add(tagSetName); // this.repositoryItemComboBox1.SelectedIndexChanged += new EventHandler(repositoryItemComboBox1_SelectedIndexChanged); // //this.comboFilter.ItemClick += new ItemClickEventHandler(comboFilter_ItemClick); }
public TagGenerator(ITagLibrary <T> library, ITagRequestBuilder tagRequestBuilder, ActiveProfile profile) { _library = library; _tagRequestBuilder = tagRequestBuilder; _profile = profile; }
public TagGenerator(ITagLibrary <T> library, IEnumerable <ITagRequestActivator> activators, ActiveProfile profile) { _library = library; _profile = profile; _activators = activators.Where(x => x.Matches(typeof(T))).ToList(); }
public void SetOutputArchive(ITagLibrary OutputArchive) { m_OutputArchive = OutputArchive; }
public TagGenerator(ITagLibrary library, ActiveProfile profile, Func <Type, object> serviceLocator) { _library = library; _profile = profile; _serviceLocator = serviceLocator; }
public TagGenerator(ITagLibrary <T> library, IEnumerable <ITagRequestActivator> activators) { ActiveProfile = TagConstants.Default; _library = library; _activators = activators.Where(x => x.Matches(typeof(T))).ToList(); }