Example #1
0
 private void ItmCreateAssociations_Click(object sender, EventArgs e)
 {
     try
     {
         if (UIMessages.Question(
                 "You are about to create PlexDL file associations for:\n\n*.pxz\n*.pmxml\n*.prof\n\nProceed?"))
         {
             FileAssociationsManager.EnsureAssociationsSet();
             UIMessages.Info(@"Done!");
         }
     }
     catch (Exception ex)
     {
         LoggingHelpers.RecordException(ex.Message, @"FileAssociationError");
         UIMessages.Error($"Error whilst trying to set PlexDL file associations:\n\n{ex}");
     }
 }
Example #2
0
        private static void DoCreateAssociations()
        {
            try
            {
                //query user
                if (UIMessages.Question(
                        "You are about to create PlexDL file associations for:\n\n*.pxz\n*.pmxml\n*.prof\n\nProceed?"))
                {
                    //create the file associations
                    FileAssociationsManager.EnsureAssociationsSet();

                    //alert user to success
                    UIMessages.Info(@"Done!");
                }
            }
            catch (Exception ex)
            {
                //record error
                LoggingHelpers.RecordException(ex.Message, @"FileAssociationError");

                //alert user
                UIMessages.Error($"Error whilst trying to set PlexDL file associations:\n\n{ex}");
            }
        }