Наследование: System.EventArgs
Пример #1
0
        static async void Installed(object sender, InstallEventArgs e)
        {
            var project = ProjectHelpers.GetActiveProject();

            foreach (var file in e.Package.Files)
            {
                string absolute = Path.Combine(e.Path, file);

                try
                {
                    var info = new FileInfo(absolute);
                    await project.AddFileToProjectAsync(info.FullName);
                }
                catch (Exception ex)
                {
                    Logger.Log(ex);
                }
            }

            string msg = $"Installed package {e.Package.Name} {e.Package.Version} successfully";
            Logger.Log(msg + Environment.NewLine);
            VSPackage.DTE.StatusBar.Text = msg;
        }
Пример #2
0
 static void Installing(object sender, InstallEventArgs e)
 {
     string msg = $"Installing {e.Package.Name} {e.Package.Version}...";
     Logger.Log(msg);
     VSPackage.DTE.StatusBar.Text = msg;
 }
Пример #3
0
 static void Downloading(object sender, InstallEventArgs e)
 {
     string file = e.Package.AllFiles.Count() == 1 ? "file" : "files";
     Logger.Log($"Downloading {e.Package.Name} {e.Package.Version} ({e.Package.Files.Count()} {file})");
 }
Пример #4
0
 static void DownloadingRemainingFiles(object sender, InstallEventArgs e)
 {
     int count = e.Package.AllFiles.Count() - e.Package.Files.Count();
     string file = count == 1 ? "file" : "files";
     Logger.Log($"Downloading remaining {e.Package.Name} {e.Package.Version} ({count} {file})");
 }
Пример #5
0
 static void Installed(object sender, InstallEventArgs e)
 {
     string msg = $"Installed {e.Package.Name} successfully";
     Logger.Log(msg);
     VSPackage.DTE.StatusBar.Text = msg;
 }
Пример #6
0
 static void Downloaded(object sender, InstallEventArgs e)
 {
     Logger.Log($"  Downloaded {e.Package.Name} {e.Package.Version} successfully");
 }