Esempio n. 1
0
 public static void ShowAssociationUI()
 {
     try
     {
         IApplicationAssociationRegistrationUI aar;
         if ((aar = new ApplicationAssociationRegistrationUI() as IApplicationAssociationRegistrationUI) != null)
         {
             aar.LaunchAdvancedAssociationUI("QuuxPlayer");
         }
     }
     catch
     {
     }
 }
Esempio n. 2
0
        private void ManageFileAssociations_OnClick(object sender, RoutedEventArgs e)
        {
            var assocUi = new ApplicationAssociationRegistrationUI();

            try
            {
                assocUi.LaunchAdvancedAssociationUI(InstanceManager.Instance.ProgId);
            }
            catch
            {
                MessageBox.Show("Could not display the file association manager. Please repair the installation and try again.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            finally
            {
                Marshal.ReleaseComObject(assocUi);
            }
        }