using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Schema;

namespace QFPT;

public class ComponentEditor : Form
{
	private QFPT qfpt = new QFPT();

	private string Qdart_Install_Path = "";

	private string ComponentXmlFile = "";

	private List<QDARTComponent> QdartComponentList = new List<QDARTComponent>();

	private Dictionary<string, RegFileAttr> RegFilesList = new Dictionary<string, RegFileAttr>();

	private Dictionary<string, string> NoOverwrittenFilesList = new Dictionary<string, string>();

	private IContainer components;

	private TabControl QDARTComponentTab;

	private TabPage FilesTab;

	private TabPage RegistrationTab;

	private TabPage NoOverwrittenTab;

	private TreeView FileTreeView;

	private ContextMenuStrip FileView_contextMenuStrip;

	private ToolStripMenuItem createComponentToolStripMenuItem;

	private ToolStripMenuItem addOptionToolStripMenuItem;

	private ToolStripMenuItem optionToolStripMenuItem;

	private ToolStripMenuItem deleteToolStripMenuItem;

	private MenuStrip menuStrip;

	private ToolStripMenuItem fileToolStripMenuItem;

	private ToolStripMenuItem openContainingFolderToolStripMenuItem;

	private ToolStripMenuItem saveToolStripMenuItem;

	private ToolStripMenuItem saveAsToolStripMenuItem;

	private ToolStripMenuItem exitToolStripMenuItem;

	private TreeView RegisterFileTreeView;

	private TreeView NoOverwrittenFileTreeView;

	private ToolStripMenuItem openToolStripMenuItem;

	private Label FilePath;

	private ToolStripMenuItem renameToolStripMenuItem;

	public ComponentEditor()
	{
		InitializeComponent();
	}

	private void ComponentEditor_Load(object sender, EventArgs e)
	{
		base.MaximizeBox = false;
		CenterToParent();
	}

	public void SetQDARTInstallPath(string QDART_Install_Path)
	{
		Qdart_Install_Path = QDART_Install_Path;
	}

	public void SetCurrentComponentFile(string compoentXmlFile)
	{
		FilePath.Text = compoentXmlFile;
		ComponentXmlFile = compoentXmlFile;
		LoadComponentXmlFile(compoentXmlFile, ref QdartComponentList, ref RegFilesList, ref NoOverwrittenFilesList);
		UpdateComponentViewToTabPages();
	}

	public void LoadComponentXmlFile(string xmlFile, ref List<QDARTComponent> outQdartComponentList, ref Dictionary<string, RegFileAttr> outRegFilesList, ref Dictionary<string, string> outNoOverwrittenFilesList)
	{
		try
		{
			XmlDocument xmlDocument = new XmlDocument();
			xmlDocument.Load(xmlFile);
			string error = "";
			XmlSchemaSet xmlSchemaSet = new XmlSchemaSet();
			xmlSchemaSet.Add("", "..\\Databases\\Schema\\Packager.xsd");
			xmlDocument.Schemas = xmlSchemaSet;
			ValidationEventHandler validationEventHandler = delegate(object sender, ValidationEventArgs e)
			{
				switch (e.Severity)
				{
				case XmlSeverityType.Error:
					error += e.Message;
					break;
				case XmlSeverityType.Warning:
					break;
				}
			};
			xmlDocument.Validate(validationEventHandler);
			if (error != "")
			{
				throw new Exception("xml validation exception: \r\n" + error);
			}
			XmlElement documentElement = xmlDocument.DocumentElement;
			XmlNodeList elementsByTagName = documentElement.GetElementsByTagName("QDARTComponent");
			List<QDARTComponent> list = new List<QDARTComponent>();
			QDARTComponent item = default(QDARTComponent);
			QDARTComponent.Option item2 = default(QDARTComponent.Option);
			QDARTComponent.Option.FileAttr item3 = default(QDARTComponent.Option.FileAttr);
			foreach (XmlNode item4 in elementsByTagName)
			{
				item.option_list = new List<QDARTComponent.Option>();
				item.file = xmlFile;
				string attribute = ((XmlElement)item4).GetAttribute("Name");
				item.componentName = attribute;
				XmlNodeList elementsByTagName2 = ((XmlElement)item4).GetElementsByTagName("Option");
				foreach (XmlNode item5 in elementsByTagName2)
				{
					item2.fileAttr_list = new List<QDARTComponent.Option.FileAttr>();
					string attribute2 = ((XmlElement)item5).GetAttribute("Name");
					item2.optionName = attribute2;
					XmlNodeList elementsByTagName3 = ((XmlElement)item5).GetElementsByTagName("FileAttribute");
					foreach (XmlNode item6 in elementsByTagName3)
					{
						item3.path = ((XmlElement)item6).GetAttribute("Path");
						item3.name = ((XmlElement)item6).GetAttribute("Name");
						if (!(item3.path == "") && !(item3.name == ""))
						{
							item2.fileAttr_list.Add(item3);
						}
					}
					item.option_list.Add(item2);
				}
				list.Add(item);
			}
			outQdartComponentList = list;
			Dictionary<string, RegFileAttr> dictionary = new Dictionary<string, RegFileAttr>();
			XmlNodeList elementsByTagName4 = documentElement.GetElementsByTagName("Registration");
			RegFileAttr value = default(RegFileAttr);
			foreach (XmlNode item7 in elementsByTagName4)
			{
				XmlNodeList elementsByTagName5 = ((XmlElement)item7).GetElementsByTagName("RegFile");
				foreach (XmlNode item8 in elementsByTagName5)
				{
					string attribute3 = ((XmlElement)item8).GetAttribute("Name");
					string attribute4 = ((XmlElement)item8).GetAttribute("Cmd");
					string attribute5 = ((XmlElement)item8).GetAttribute("Comment");
					if (!(attribute3 == "") && !(attribute4 == "") && !dictionary.ContainsKey(attribute3))
					{
						value.cmd = attribute4;
						value.comment = attribute5;
						dictionary.Add(attribute3, value);
					}
				}
			}
			outRegFilesList = dictionary;
			Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
			XmlNodeList elementsByTagName6 = documentElement.GetElementsByTagName("NoOverwritten");
			foreach (XmlNode item9 in elementsByTagName6)
			{
				XmlNodeList elementsByTagName7 = ((XmlElement)item9).GetElementsByTagName("NoOverwrittenFile");
				foreach (XmlNode item10 in elementsByTagName7)
				{
					string attribute6 = ((XmlElement)item10).GetAttribute("Path");
					string attribute7 = ((XmlElement)item10).GetAttribute("Name");
					if (!(attribute6 == "") && !(attribute7 == "") && !dictionary2.ContainsKey(attribute7))
					{
						dictionary2.Add(attribute7, attribute6);
					}
				}
			}
			outNoOverwrittenFilesList = dictionary2;
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void UpdateComponentViewToTabPages()
	{
		FileTreeView.Nodes.Clear();
		foreach (QDARTComponent qdartComponent in QdartComponentList)
		{
			TreeNode treeNode = FileTreeView.Nodes.Add(qdartComponent.componentName);
			foreach (QDARTComponent.Option item in qdartComponent.option_list)
			{
				TreeNode treeNode2 = treeNode.Nodes.Add(item.optionName);
				foreach (QDARTComponent.Option.FileAttr item2 in item.fileAttr_list)
				{
					TreeNode treeNode3 = treeNode2.Nodes.Add(RemoveBackSlash(item2.path + "\\" + item2.name));
					treeNode3.BackColor = Color.LightGray;
					TreeNode treeNode4 = treeNode3.Nodes.Add(item2.path);
					treeNode4.BackColor = Color.LightGray;
					treeNode4 = treeNode3.Nodes.Add(item2.name);
					treeNode4.BackColor = Color.LightGray;
				}
			}
		}
		RegisterFileTreeView.Nodes.Clear();
		foreach (KeyValuePair<string, RegFileAttr> regFiles in RegFilesList)
		{
			TreeNode treeNode5 = RegisterFileTreeView.Nodes.Add(regFiles.Key);
			treeNode5.Nodes.Add(regFiles.Value.cmd);
			treeNode5.Nodes.Add(regFiles.Value.comment);
		}
		NoOverwrittenFileTreeView.Nodes.Clear();
		foreach (KeyValuePair<string, string> noOverwrittenFiles in NoOverwrittenFilesList)
		{
			TreeNode treeNode6 = NoOverwrittenFileTreeView.Nodes.Add(noOverwrittenFiles.Key);
			treeNode6.Nodes.Add(noOverwrittenFiles.Key);
			treeNode6.Nodes.Add(noOverwrittenFiles.Value);
		}
	}

	private string RemoveBackSlash(string param)
	{
		while (param.Contains("\\\\"))
		{
			param = param.Replace("\\\\", "\\");
		}
		return param;
	}

	private void exitToolStripMenuItem_Click(object sender, EventArgs e)
	{
		Close();
	}

	private void openToolStripMenuItem_Click(object sender, EventArgs e)
	{
		OpenFileDialog openFileDialog = new OpenFileDialog();
		openFileDialog.Filter = "Component XML File(*.xml)|*.xml";
		if (openFileDialog.ShowDialog() == DialogResult.OK)
		{
			ComponentXmlFile = openFileDialog.FileName;
			FilePath.Text = openFileDialog.FileName;
			QdartComponentList.Clear();
			RegFilesList.Clear();
			NoOverwrittenFilesList.Clear();
			LoadComponentXmlFile(openFileDialog.FileName, ref QdartComponentList, ref RegFilesList, ref NoOverwrittenFilesList);
			UpdateComponentViewToTabPages();
		}
	}

	private void openContainingFolderToolStripMenuItem_Click(object sender, EventArgs e)
	{
		string directoryName = Path.GetDirectoryName(ComponentXmlFile);
		if (directoryName != null)
		{
			Process.Start(directoryName);
		}
	}

	private void saveToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (ComponentXmlFile == null)
		{
			saveAsToolStripMenuItem_Click(sender, e);
			return;
		}
		SaveToQDARTComponentList(ComponentXmlFile);
		SaveComponentXmlFile(ComponentXmlFile);
		qfpt.UpdateQDARTComponentList(QdartComponentList);
	}

	private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
	{
		SaveFileDialog saveFileDialog = new SaveFileDialog();
		saveFileDialog.Filter = "Component XML File(*.xml)|*.xml";
		if (saveFileDialog.ShowDialog() == DialogResult.OK)
		{
			ComponentXmlFile = saveFileDialog.FileName;
			FilePath.Text = saveFileDialog.FileName;
			SaveToQDARTComponentList(saveFileDialog.FileName);
			SaveComponentXmlFile(saveFileDialog.FileName);
			qfpt.UpdateQDARTComponentList(QdartComponentList);
		}
	}

	private void SaveToQDARTComponentList(string fileName)
	{
		QdartComponentList.Clear();
		RegFilesList.Clear();
		NoOverwrittenFilesList.Clear();
		TreeNodeCollection nodes = FileTreeView.Nodes;
		QDARTComponent item = default(QDARTComponent);
		QDARTComponent.Option item2 = default(QDARTComponent.Option);
		QDARTComponent.Option.FileAttr item3 = default(QDARTComponent.Option.FileAttr);
		foreach (TreeNode item4 in nodes)
		{
			item.option_list = new List<QDARTComponent.Option>();
			item.file = fileName;
			item.componentName = item4.Text;
			TreeNodeCollection nodes2 = item4.Nodes;
			foreach (TreeNode item5 in nodes2)
			{
				item2.fileAttr_list = new List<QDARTComponent.Option.FileAttr>();
				item2.optionName = item5.Text;
				TreeNodeCollection nodes3 = item5.Nodes;
				foreach (TreeNode item6 in nodes3)
				{
					TreeNodeCollection nodes4 = item6.Nodes;
					item3.path = nodes4[0].Text;
					item3.name = nodes4[1].Text;
					item2.fileAttr_list.Add(item3);
				}
				item.option_list.Add(item2);
			}
			QdartComponentList.Add(item);
		}
		TreeNodeCollection nodes5 = RegisterFileTreeView.Nodes;
		RegFileAttr value = default(RegFileAttr);
		foreach (TreeNode item7 in nodes5)
		{
			TreeNodeCollection nodes6 = item7.Nodes;
			value.cmd = nodes6[0].Text;
			value.comment = nodes6[1].Text;
			RegFilesList.Add(item7.Text, value);
		}
		TreeNodeCollection nodes7 = NoOverwrittenFileTreeView.Nodes;
		foreach (TreeNode item8 in nodes7)
		{
			TreeNodeCollection nodes8 = item8.Nodes;
			NoOverwrittenFilesList.Add(nodes8[0].Text, nodes8[1].Text);
		}
	}

	private void SaveComponentXmlFile(string fileName)
	{
		try
		{
			XmlDocument xmlDocument = new XmlDocument();
			XmlDeclaration newChild = xmlDocument.CreateXmlDeclaration("1.0", "utf-8", null);
			xmlDocument.AppendChild(newChild);
			XmlElement xmlElement = xmlDocument.CreateElement("Root");
			xmlDocument.AppendChild(xmlElement);
			foreach (QDARTComponent qdartComponent in QdartComponentList)
			{
				XmlElement xmlElement2 = xmlDocument.CreateElement("QDARTComponent");
				XmlAttribute xmlAttribute = xmlDocument.CreateAttribute("Name");
				xmlAttribute.Value = qdartComponent.componentName;
				xmlElement2.Attributes.Append(xmlAttribute);
				foreach (QDARTComponent.Option item in qdartComponent.option_list)
				{
					XmlElement xmlElement3 = xmlDocument.CreateElement("Option");
					xmlAttribute = xmlDocument.CreateAttribute("Name");
					xmlAttribute.Value = item.optionName;
					xmlElement3.Attributes.Append(xmlAttribute);
					foreach (QDARTComponent.Option.FileAttr item2 in item.fileAttr_list)
					{
						XmlElement xmlElement4 = xmlDocument.CreateElement("FileAttribute");
						xmlAttribute = xmlDocument.CreateAttribute("Path");
						xmlAttribute.Value = item2.path;
						xmlElement4.Attributes.Append(xmlAttribute);
						xmlAttribute = xmlDocument.CreateAttribute("Name");
						xmlAttribute.Value = item2.name;
						xmlElement4.Attributes.Append(xmlAttribute);
						xmlElement3.AppendChild(xmlElement4);
					}
					xmlElement2.AppendChild(xmlElement3);
				}
				xmlElement.AppendChild(xmlElement2);
			}
			XmlElement xmlElement5 = xmlDocument.CreateElement("Registration");
			foreach (KeyValuePair<string, RegFileAttr> regFiles in RegFilesList)
			{
				XmlElement xmlElement6 = xmlDocument.CreateElement("RegFile");
				XmlAttribute xmlAttribute2 = xmlDocument.CreateAttribute("Name");
				xmlAttribute2.Value = regFiles.Key;
				xmlElement6.Attributes.Append(xmlAttribute2);
				xmlAttribute2 = xmlDocument.CreateAttribute("Cmd");
				xmlAttribute2.Value = regFiles.Value.cmd;
				xmlElement6.Attributes.Append(xmlAttribute2);
				xmlAttribute2 = xmlDocument.CreateAttribute("Comment");
				xmlAttribute2.Value = regFiles.Value.comment;
				xmlElement6.Attributes.Append(xmlAttribute2);
				xmlElement5.AppendChild(xmlElement6);
			}
			xmlElement.AppendChild(xmlElement5);
			XmlElement xmlElement7 = xmlDocument.CreateElement("NoOverwritten");
			foreach (KeyValuePair<string, string> noOverwrittenFiles in NoOverwrittenFilesList)
			{
				XmlElement xmlElement8 = xmlDocument.CreateElement("NoOverwrittenFile");
				XmlAttribute xmlAttribute3 = xmlDocument.CreateAttribute("Path");
				xmlAttribute3.Value = noOverwrittenFiles.Key;
				xmlElement8.Attributes.Append(xmlAttribute3);
				xmlAttribute3 = xmlDocument.CreateAttribute("Name");
				xmlAttribute3.Value = noOverwrittenFiles.Value;
				xmlElement8.Attributes.Append(xmlAttribute3);
				xmlElement7.AppendChild(xmlElement8);
			}
			xmlElement.AppendChild(xmlElement7);
			string error = "";
			XmlSchemaSet xmlSchemaSet = new XmlSchemaSet();
			xmlSchemaSet.Add("", "..\\Databases\\Schema\\Packager.xsd");
			xmlDocument.Schemas = xmlSchemaSet;
			ValidationEventHandler validationEventHandler = delegate(object sender, ValidationEventArgs e)
			{
				switch (e.Severity)
				{
				case XmlSeverityType.Error:
					error += e.Message;
					break;
				case XmlSeverityType.Warning:
					break;
				}
			};
			xmlDocument.Validate(validationEventHandler);
			if (error != "")
			{
				throw new Exception(error);
			}
			xmlDocument.Save(fileName);
		}
		catch (Exception ex)
		{
			MessageBox.Show("Exception: " + ex.Message);
		}
	}

	private void createComponentToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (FileTreeView.Nodes.Count <= 0)
		{
			FileTreeView.Nodes.Add("Component name");
		}
	}

	private void addOptionToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (FileTreeView.Nodes.Count <= 0)
		{
			TreeNode treeNode = FileTreeView.Nodes.Add("Component name");
			treeNode.Nodes.Add("Option name");
		}
		else
		{
			TreeNode treeNode2 = FileTreeView.Nodes[0];
			treeNode2.Nodes.Add("Option name");
		}
	}

	private void renameToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (FileTreeView.SelectedNode != null)
		{
			TreeNode selectedNode = FileTreeView.SelectedNode;
			if (selectedNode.Level < 2)
			{
				selectedNode.BeginEdit();
			}
		}
	}

	private void addFilesToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (FileTreeView.SelectedNode == null || (FileTreeView.SelectedNode.Level != 1 && FileTreeView.SelectedNode.Level != 2))
		{
			return;
		}
		OpenFileDialog openFileDialog = new OpenFileDialog();
		openFileDialog.Filter = "Files(*.*)|*.*";
		openFileDialog.Multiselect = true;
		if (openFileDialog.ShowDialog() == DialogResult.OK)
		{
			string[] fileNames = openFileDialog.FileNames;
			for (int i = 0; i < fileNames.Length; i++)
			{
				string text = (fileNames[i].Contains(Qdart_Install_Path) ? fileNames[i].Replace(Qdart_Install_Path, "") : fileNames[i]);
				string fileName = Path.GetFileName(fileNames[i]);
				TreeNode treeNode = ((FileTreeView.SelectedNode.Level == 1) ? FileTreeView.SelectedNode : FileTreeView.SelectedNode.Parent);
				TreeNode treeNode2 = treeNode.Nodes.Add(text);
				treeNode2.BackColor = Color.LightGray;
				TreeNode treeNode3 = treeNode2.Nodes.Add(text.Replace(fileName, ""));
				treeNode3.BackColor = Color.LightGray;
				treeNode3 = treeNode2.Nodes.Add(fileName);
				treeNode3.BackColor = Color.LightGray;
			}
		}
	}

	private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
	{
		if (FileTreeView.SelectedNode != null && FileTreeView.SelectedNode.Level != 3)
		{
			FileTreeView.SelectedNode.Remove();
		}
	}

	private void FileTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
	{
		if (e.Button == MouseButtons.Right && e.Node != null)
		{
			FileTreeView.SelectedNode = e.Node;
			FileView_contextMenuStrip.Show(FileTreeView, e.X, e.Y);
		}
	}

	private void FileTreeView_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e)
	{
		if (e.Node.Level >= 2)
		{
			e.CancelEdit = true;
		}
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.components = new System.ComponentModel.Container();
		System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QFPT.ComponentEditor));
		this.QDARTComponentTab = new System.Windows.Forms.TabControl();
		this.FilesTab = new System.Windows.Forms.TabPage();
		this.FileTreeView = new System.Windows.Forms.TreeView();
		this.FileView_contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
		this.createComponentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.addOptionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.optionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.RegistrationTab = new System.Windows.Forms.TabPage();
		this.RegisterFileTreeView = new System.Windows.Forms.TreeView();
		this.NoOverwrittenTab = new System.Windows.Forms.TabPage();
		this.NoOverwrittenFileTreeView = new System.Windows.Forms.TreeView();
		this.menuStrip = new System.Windows.Forms.MenuStrip();
		this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.openContainingFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
		this.FilePath = new System.Windows.Forms.Label();
		this.QDARTComponentTab.SuspendLayout();
		this.FilesTab.SuspendLayout();
		this.FileView_contextMenuStrip.SuspendLayout();
		this.RegistrationTab.SuspendLayout();
		this.NoOverwrittenTab.SuspendLayout();
		this.menuStrip.SuspendLayout();
		base.SuspendLayout();
		this.QDARTComponentTab.Controls.Add(this.FilesTab);
		this.QDARTComponentTab.Controls.Add(this.RegistrationTab);
		this.QDARTComponentTab.Controls.Add(this.NoOverwrittenTab);
		this.QDARTComponentTab.Font = new System.Drawing.Font("Arial", 10f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.QDARTComponentTab.Location = new System.Drawing.Point(12, 50);
		this.QDARTComponentTab.Name = "QDARTComponentTab";
		this.QDARTComponentTab.SelectedIndex = 0;
		this.QDARTComponentTab.Size = new System.Drawing.Size(932, 507);
		this.QDARTComponentTab.TabIndex = 0;
		this.FilesTab.Controls.Add(this.FileTreeView);
		this.FilesTab.Location = new System.Drawing.Point(4, 25);
		this.FilesTab.Name = "FilesTab";
		this.FilesTab.Padding = new System.Windows.Forms.Padding(3);
		this.FilesTab.Size = new System.Drawing.Size(924, 478);
		this.FilesTab.TabIndex = 0;
		this.FilesTab.Text = "Files";
		this.FilesTab.UseVisualStyleBackColor = true;
		this.FileTreeView.ContextMenuStrip = this.FileView_contextMenuStrip;
		this.FileTreeView.LabelEdit = true;
		this.FileTreeView.Location = new System.Drawing.Point(6, 6);
		this.FileTreeView.Name = "FileTreeView";
		this.FileTreeView.Size = new System.Drawing.Size(912, 466);
		this.FileTreeView.TabIndex = 0;
		this.FileTreeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(FileTreeView_BeforeLabelEdit);
		this.FileTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(FileTreeView_NodeMouseClick);
		this.FileView_contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[5] { this.createComponentToolStripMenuItem, this.addOptionToolStripMenuItem, this.renameToolStripMenuItem, this.optionToolStripMenuItem, this.deleteToolStripMenuItem });
		this.FileView_contextMenuStrip.Name = "FileView_contextMenuStrip";
		this.FileView_contextMenuStrip.Size = new System.Drawing.Size(176, 114);
		this.createComponentToolStripMenuItem.Name = "createComponentToolStripMenuItem";
		this.createComponentToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
		this.createComponentToolStripMenuItem.Text = "Create Component";
		this.createComponentToolStripMenuItem.Click += new System.EventHandler(createComponentToolStripMenuItem_Click);
		this.addOptionToolStripMenuItem.Name = "addOptionToolStripMenuItem";
		this.addOptionToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
		this.addOptionToolStripMenuItem.Text = "Add Option";
		this.addOptionToolStripMenuItem.Click += new System.EventHandler(addOptionToolStripMenuItem_Click);
		this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
		this.renameToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
		this.renameToolStripMenuItem.Text = "Rename";
		this.renameToolStripMenuItem.Click += new System.EventHandler(renameToolStripMenuItem_Click);
		this.optionToolStripMenuItem.Name = "optionToolStripMenuItem";
		this.optionToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
		this.optionToolStripMenuItem.Text = "Add Files";
		this.optionToolStripMenuItem.Click += new System.EventHandler(addFilesToolStripMenuItem_Click);
		this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
		this.deleteToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
		this.deleteToolStripMenuItem.Text = "Delete";
		this.deleteToolStripMenuItem.Click += new System.EventHandler(deleteToolStripMenuItem_Click);
		this.RegistrationTab.Controls.Add(this.RegisterFileTreeView);
		this.RegistrationTab.Location = new System.Drawing.Point(4, 25);
		this.RegistrationTab.Name = "RegistrationTab";
		this.RegistrationTab.Padding = new System.Windows.Forms.Padding(3);
		this.RegistrationTab.Size = new System.Drawing.Size(924, 478);
		this.RegistrationTab.TabIndex = 1;
		this.RegistrationTab.Text = "Registration";
		this.RegistrationTab.UseVisualStyleBackColor = true;
		this.RegisterFileTreeView.Location = new System.Drawing.Point(6, 6);
		this.RegisterFileTreeView.Name = "RegisterFileTreeView";
		this.RegisterFileTreeView.Size = new System.Drawing.Size(912, 466);
		this.RegisterFileTreeView.TabIndex = 1;
		this.NoOverwrittenTab.Controls.Add(this.NoOverwrittenFileTreeView);
		this.NoOverwrittenTab.Location = new System.Drawing.Point(4, 25);
		this.NoOverwrittenTab.Name = "NoOverwrittenTab";
		this.NoOverwrittenTab.Padding = new System.Windows.Forms.Padding(3);
		this.NoOverwrittenTab.Size = new System.Drawing.Size(924, 478);
		this.NoOverwrittenTab.TabIndex = 2;
		this.NoOverwrittenTab.Text = "NoOverwritten";
		this.NoOverwrittenTab.UseVisualStyleBackColor = true;
		this.NoOverwrittenFileTreeView.Location = new System.Drawing.Point(6, 6);
		this.NoOverwrittenFileTreeView.Name = "NoOverwrittenFileTreeView";
		this.NoOverwrittenFileTreeView.Size = new System.Drawing.Size(912, 466);
		this.NoOverwrittenFileTreeView.TabIndex = 1;
		this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[1] { this.fileToolStripMenuItem });
		this.menuStrip.Location = new System.Drawing.Point(0, 0);
		this.menuStrip.Name = "menuStrip";
		this.menuStrip.Size = new System.Drawing.Size(956, 24);
		this.menuStrip.TabIndex = 2;
		this.menuStrip.Text = "menuStrip";
		this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[5] { this.openToolStripMenuItem, this.openContainingFolderToolStripMenuItem, this.saveToolStripMenuItem, this.saveAsToolStripMenuItem, this.exitToolStripMenuItem });
		this.fileToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9f);
		this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
		this.fileToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F";
		this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
		this.fileToolStripMenuItem.Text = "&File";
		this.openToolStripMenuItem.Name = "openToolStripMenuItem";
		this.openToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
		this.openToolStripMenuItem.Text = "Open";
		this.openToolStripMenuItem.Click += new System.EventHandler(openToolStripMenuItem_Click);
		this.openContainingFolderToolStripMenuItem.Name = "openContainingFolderToolStripMenuItem";
		this.openContainingFolderToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
		this.openContainingFolderToolStripMenuItem.Text = "Open Containing Folder";
		this.openContainingFolderToolStripMenuItem.Click += new System.EventHandler(openContainingFolderToolStripMenuItem_Click);
		this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
		this.saveToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
		this.saveToolStripMenuItem.Text = "Save";
		this.saveToolStripMenuItem.Click += new System.EventHandler(saveToolStripMenuItem_Click);
		this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
		this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
		this.saveAsToolStripMenuItem.Text = "Save As";
		this.saveAsToolStripMenuItem.Click += new System.EventHandler(saveAsToolStripMenuItem_Click);
		this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
		this.exitToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
		this.exitToolStripMenuItem.Text = "Exit";
		this.exitToolStripMenuItem.Click += new System.EventHandler(exitToolStripMenuItem_Click);
		this.FilePath.AutoSize = true;
		this.FilePath.Font = new System.Drawing.Font("Arial", 10f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.FilePath.Location = new System.Drawing.Point(13, 27);
		this.FilePath.Name = "FilePath";
		this.FilePath.Size = new System.Drawing.Size(68, 16);
		this.FilePath.TabIndex = 3;
		this.FilePath.Text = "File Path:";
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(956, 568);
		base.Controls.Add(this.FilePath);
		base.Controls.Add(this.menuStrip);
		base.Controls.Add(this.QDARTComponentTab);
		base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
		base.MainMenuStrip = this.menuStrip;
		base.Name = "ComponentEditor";
		this.Text = "Component Editor";
		base.Load += new System.EventHandler(ComponentEditor_Load);
		this.QDARTComponentTab.ResumeLayout(false);
		this.FilesTab.ResumeLayout(false);
		this.FileView_contextMenuStrip.ResumeLayout(false);
		this.RegistrationTab.ResumeLayout(false);
		this.NoOverwrittenTab.ResumeLayout(false);
		this.menuStrip.ResumeLayout(false);
		this.menuStrip.PerformLayout();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
