Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
        void OnRenamed(string newPath)
        {
            AddonHostForm masterForm = FindForm() as AddonHostForm;

            if (masterForm != null)
            {
                SelectFileEventArgs args = new SelectFileEventArgs();
                args.m_strPath = newPath;
                OnSelectFile(this, args);
            }
        }
Ejemplo n.º 3
0
 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 { }
 }