Example #1
0
 public static void Register(ArrayList f, bool on)
 {
     if (Config.Default.IsRemovableDiskType)
     {
         return;
     }
     if ((f == null) || (f.Count <= 0))
     {
         return;
     }
     for (int i = 0; i < f.Count; i++)
     {
         FileAssoc fa = (FileAssoc)f[i];
         if (fa == null)
         {
             continue;
         }
         try
         {
             fa.Register(on);
         }
         catch (Exception xx) { Utils.OnError(xx); }
     }
     try
     {
         FileAssocWin.NotifyShell();
     }
     catch (Exception xx) { Utils.OnError(xx); }
 }
Example #2
0
 public void Register(bool on)
 {
     if (!Valid)
     {
         return;
     }
     if (on)
     {
         FileAssocWin.Register(this.extension, this.progId, this.desc, this.ExePath, this.IconPath, this.iconIdx);
     }
     else
     {
         FileAssocWin.UnRegister(this.extension, this.progId);
     }
 }