public bool ShowExternalUI()
 {
     using (var fa = FileAssociatorFactory.GetFileAssociator(DocTypePrefix, ProgramName))
     {
         return(fa.ShowExternalUI());
     }
 }
 public void SetStatus(IEnumerable <FileTypeItem> items)
 {
     using (var fa = FileAssociatorFactory.GetFileAssociator(DocTypePrefix, ProgramName))
     {
         foreach (var item in items)
         {
             item.Selected = fa.IsAssociated(Normalize(item.Extension));
         }
     }
 }
        public void Associate(IEnumerable <FileTypeItem> items)
        {
            using (var fa = FileAssociatorFactory.GetFileAssociator(DocTypePrefix, ProgramName))
            {
                foreach (var item in items)
                {
                    var ext = Normalize(item.Extension);
                    if (item.Selected)
                    {
                        fa.Associate(ext);
                    }
                    else
                    {
                        fa.UnAssociate(ext);
                    }
                }

                fa.NotifyShell();
            }
        }