示例#1
0
文件: MainForm.cs 项目: rsdn/janus
		private void OpenFile()
		{
			if (_openFileDialog.ShowDialog() == DialogResult.OK)
			{
				CultureInfo[] loadedCultures;
				DateTime lwt;
				_rootCategory = Loader.Load(_openFileDialog.FileName, out loadedCultures, out lwt);
				IEditContext ec = (IEditContext)Site.GetService(typeof(IEditContext));
				ec.AvailableCultures = loadedCultures;
				_directory = Path.GetDirectoryName(_openFileDialog.FileName);
				FakeNodeCollection fnc = new FakeNodeCollection();
				fnc.Add(_rootCategory);
				_rootCategory.TreeParent = fnc;
				ClearSelection();
				_categoryTree.Nodes = fnc;
				EnableCommandItems();
			}
		}
示例#2
0
 private void OpenFile()
 {
     if (_openFileDialog.ShowDialog() == DialogResult.OK)
     {
         CultureInfo[] loadedCultures;
         DateTime      lwt;
         _rootCategory = Loader.Load(_openFileDialog.FileName, out loadedCultures, out lwt);
         IEditContext ec = (IEditContext)Site.GetService(typeof(IEditContext));
         ec.AvailableCultures = loadedCultures;
         _directory           = Path.GetDirectoryName(_openFileDialog.FileName);
         FakeNodeCollection fnc = new FakeNodeCollection();
         fnc.Add(_rootCategory);
         _rootCategory.TreeParent = fnc;
         ClearSelection();
         _categoryTree.Nodes = fnc;
         EnableCommandItems();
     }
 }
 public FakeNode()
 {
     Nodes = new FakeNodeCollection();
 }