private void Navigator_ItemMoved(object sender, ObjectMoveIndexEventArgs e) { Iocomp.Classes.CollectionBase collectionBase = base.WorkingInstance as Iocomp.Classes.CollectionBase; object value = ((IList)collectionBase)[e.OldIndex]; ((IList)collectionBase).RemoveAt(e.OldIndex); ((IList)collectionBase).Insert(e.NewIndex, value); base.Master.ForceDirtyUpdate(null); }
private void Navigator_ItemAdd(object sender, TypeEventArgs e) { this.m_SelectLast = true; Iocomp.Classes.CollectionBase collectionBase = base.WorkingInstance as Iocomp.Classes.CollectionBase; object value = GPFunctions.CreateInstance(e.Type, e.Type.FullName); ((IList)collectionBase).Add(value); base.Master.ForceDirtyUpdate(null); }
public override void TransferAmbient() { Iocomp.Classes.CollectionBase collectionBase = base.Source as Iocomp.Classes.CollectionBase; Iocomp.Classes.CollectionBase collectionBase2 = base.Destination as Iocomp.Classes.CollectionBase; collectionBase2.Clear(); for (int i = 0; i < collectionBase.Count; i++) { object obj = ((IList)collectionBase)[i]; object obj2 = ((ICollectionBase)collectionBase2).CreateInstance(obj.GetType()); (obj2 as ISubClassBase).ControlBase = (base.Master as IControlBase); PlugInStandard classPlugIn = this.GetClassPlugIn(obj); classPlugIn.Source = obj; classPlugIn.Destination = obj2; classPlugIn.TransferAmbient(); } }
public override bool GetIsDirty() { try { Iocomp.Classes.CollectionBase collectionBase = base.OriginalInstance as Iocomp.Classes.CollectionBase; Iocomp.Classes.CollectionBase collectionBase2 = base.WorkingInstance as Iocomp.Classes.CollectionBase; if (collectionBase.Count != collectionBase2.Count) { return(true); } int num = 0; while (true) { if (num < collectionBase2.Count) { object obj = ((IList)collectionBase)[num]; object obj2 = ((IList)collectionBase2)[num]; if (!(obj.GetType() != obj2.GetType())) { PlugInStandard classPlugIn = this.GetClassPlugIn(obj2); classPlugIn.WorkingInstance = obj2; classPlugIn.OriginalInstance = obj; classPlugIn.UploadDisplay(); if (classPlugIn.GetIsDirty()) { break; } num++; continue; } return(true); } return(false); } return(true); } finally { if (this.Navigator.SelectedObject != null) { PlugInStandard classPlugIn = this.GetClassPlugIn(this.Navigator.SelectedObject); classPlugIn.WorkingInstance = this.Navigator.SelectedObject; classPlugIn.UploadDisplay(); } } }
public override void UploadDisplay() { Iocomp.Classes.CollectionBase collectionBase = base.WorkingInstance as Iocomp.Classes.CollectionBase; this.Navigator.AllowEdit = ((ICollectionBase)collectionBase).AllowEdit; this.Navigator.BeginUpdate(); int selectedIndex = this.Navigator.SelectedIndex; object selectedObject = this.Navigator.SelectedObject; this.Navigator.Items.Clear(); for (int i = 0; i < collectionBase.Count; i++) { object item = ((IList)collectionBase)[i]; this.Navigator.Items.Add(item); } if (this.m_SelectLast) { this.Navigator.SelectLast(); this.m_SelectLast = false; } else if (selectedObject != null) { int num = this.Navigator.Items.IndexOf(selectedObject); if (num != -1) { this.Navigator.SelectedIndex = num; } else { this.Navigator.SelectLast(); } } if (this.Navigator.Items.Count == 0) { TabControl[] classTabControls = this.m_ClassTabControls; foreach (TabControl tabControl in classTabControls) { tabControl.Visible = false; } } else if (this.Navigator.SelectedIndex == -1) { this.Navigator.SelectFirst(); } this.Navigator.EndUpdate(); }
private void Navigator_ItemRemove(object sender, EventArgs e) { Iocomp.Classes.CollectionBase collectionBase = base.WorkingInstance as Iocomp.Classes.CollectionBase; collectionBase.RemoveAt(this.Navigator.SelectedIndex); base.Master.ForceDirtyUpdate(null); }