예제 #1
0
 void ModManagement_Downloaded(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
 {
     if (_log.IsDebugEnabled)
     {
         _log.DebugFormat("Starting {0}", MethodBase.GetCurrentMethod().ToString());
     }
     CleanupDownload();
     if (e != null)
     {
         ModConfiguration mod = e.UserState as ModConfiguration;
         ModManagement.InstallComplete += new EventHandler <ProcessEventArgs>(ModManagement_InstallComplete);
         ModManagement.BeginInstall(mod, mod.PackagePath);
     }
     if (_log.IsDebugEnabled)
     {
         _log.DebugFormat("Ending {0}", MethodBase.GetCurrentMethod().ToString());
     }
 }
예제 #2
0
        void BrowseForPackage(ModConfiguration mod)
        {
            if (_log.IsDebugEnabled)
            {
                _log.DebugFormat("Starting {0}", MethodBase.GetCurrentMethod().ToString());
            }
            OpenFileDialog diag = new OpenFileDialog();

            diag.Filter = AMLResources.Properties.Resources.SupportedCompressedFiles + DataStrings.SupportedCompressedFilesFilter
                          + "|" + AMLResources.Properties.Resources.AllFiles + DataStrings.AllFilesFilter;
            diag.Title = GeneralHelper.AssemblyTitle;
            if (diag.ShowDialog() == true)
            {
                ModManagement.InstallComplete += new EventHandler <ProcessEventArgs>(ModManagement_InstallComplete2);
                ModManagement.BeginInstall(mod, diag.FileName);
            }
            if (_log.IsDebugEnabled)
            {
                _log.DebugFormat("Ending {0}", MethodBase.GetCurrentMethod().ToString());
            }
        }