void OnCellEndEdit(object sender, LabelEditEventArgs e) { string newName = e.Label; if (e.CancelEdit || string.IsNullOrEmpty(newName)) { return; } ListViewItem row = this.Items[e.Item]; // rename code here CatalogItem ci = row.Tag as CatalogItem; if (ci != null) { if (String.Equals(ci.Name, newName, StringComparison.InvariantCultureIgnoreCase)) { return; } ci.Name = newName; ci.Save(); AddonHostForm masterForm = FindForm() as AddonHostForm; if (masterForm != null) { masterForm.ReloadNavigation(ci); } } }
void OnRenamed(string newPath) { AddonHostForm masterForm = FindForm() as AddonHostForm; if (masterForm != null) { SelectFileEventArgs args = new SelectFileEventArgs(); args.m_strPath = newPath; OnSelectFile(this, args); } }
private void pgProperties_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) { try { if (e.ChangedItem.Label.StartsWith(Translator.Translate("TXT_NAME"))) { AddonHostForm masterForm = FindForm() as AddonHostForm; if (masterForm != null) { masterForm.ReloadNavigation(pgProperties.SelectedObject as CatalogItem); } } } catch { } }