예제 #1
0
파일: Project.cs 프로젝트: zcnet4/lua-tilde
		public Project(IManager manager)
		{
			mManager = manager;
			mRootItem = new RootItem(this);

			mProjectName = "New Project";
			mUserDocument = CreateEmptyUserDocument();
			mUserOptionsDatabase = new XmlOptionsDatabase((XmlElement) mUserDocument.SelectSingleNode("UserConfiguration"));
		}
예제 #2
0
파일: Project.cs 프로젝트: zcnet4/lua-tilde
		public Project(IManager manager, string fileName)
		{
			mManager = manager;
			mRootItem = new RootItem(this);

			mProjectName = Path.GetFileName(fileName);
			mUserDocument = LoadUserConfig(fileName);
			mUserOptionsDatabase = new XmlOptionsDatabase((XmlElement)mUserDocument.SelectSingleNode("UserConfiguration"));

			XmlElement vcsConfig = GetUserConfigurationXML("VersionControl");
			if (vcsConfig != null)
			{
				Type vcsType = ReflectionUtils.FindType(vcsConfig.GetAttribute("type"));
				if (vcsType != null)
				{
					XmlSerializer serializer = new XmlSerializer(vcsType);
					XmlReader reader = new XmlNodeReader(vcsConfig.FirstChild);
					VCS = (IVersionController)serializer.Deserialize(reader);
				}
			}

// 			XmlElement vcsConfig = GetUserConfigurationXML("VersionControl");
// 			Type vcsType = null;
// 			if (vcsConfig != null)
// 				vcsType = ReflectionUtils.FindType(vcsConfig.GetAttribute("type"));
// 
// 			if (vcsType != null)
// 			{
// 				XmlSerializer serializer = new XmlSerializer(vcsType);
// 				XmlReader reader = new XmlNodeReader(vcsConfig.FirstChild);
// 				VCS = (IVersionController) serializer.Deserialize(reader);
// 			}
// 			else
// 			{
// 				System.Windows.Forms.MessageBox.Show("Would you like to configure source control for this project?");
// 			}
		}