Beispiel #1
0
      public void LoadConfigs() {
         
         DirectoryInfo di = new DirectoryInfo(this.baseDir);
         this.name = (this.isActive) ? "Active Configuration" : di.Name;
         try {

            string[] files = Directory.GetFiles(this.baseDir, "*.config");

            foreach (string file in files) {
               ConfigDescriptor cd = new ConfigDescriptor(file);
               // Check if this file has an associated schema
               if (Editor.Controller.IsSchemaExists(cd.SchemaUri)) {
                  cd.Load(Editor.Controller.GetSchemaByUri(cd.SchemaUri).ConcurentType);
                  cd.PropertyChanged += ConfigDescriptor_PropertyChanged;
                  this.configs.Add(cd);
               }

            }
         }catch{}
      }
Beispiel #2
0
 public void LoadObject(ConfigDescriptor client) {
    _client = client;
    xmlPropertyGrid.SelectedObject = client.ConcurrentObject;
    xmlPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(XmlGridControl_PropertyValueChanged);
 }