Exemplo n.º 1
0
        private void VersionApply(object sender, RoutedEventArgs e)
        {
            string[] projectPaths = new string[]
            {
                @"../../../../../../src/ScottPlot/ScottPlot.csproj",
                @"../../../../../../src/ScottPlot.WinForms/ScottPlot.WinForms.csproj",
                @"../../../../../../src/ScottPlot.WPF/ScottPlot.WPF.csproj",
            };

            foreach (string projectPath in projectPaths)
            {
                var thisProjVersion = new ProjectFileVersion(projectPath);
                thisProjVersion.version = projVersion.version;
                thisProjVersion.Save();
            }

            ApplyButton.IsEnabled = false;
        }
Exemplo n.º 2
0
        private void VersionReset(object sender, RoutedEventArgs e)
        {
            if (versionAtStart is null)
            {
                // this gets called when the program actually loads
                projVersion    = new ProjectFileVersion(projectFilePath);
                versionAtStart = new Version(projVersion.version.ToString());

                VersionNugetText.Text = $"nuget.org: searching...";
                BackgroundWorker worker = new BackgroundWorker();
                worker.WorkerReportsProgress = true;
                worker.DoWork             += NuGetWorker_DoWork;
                worker.RunWorkerCompleted += NuGetWorker_Completed;
                worker.RunWorkerAsync();
            }
            else
            {
                projVersion.version   = versionAtStart;
                ApplyButton.IsEnabled = true;
            }

            VersionStartedText.Text = $"initial: {projVersion}";
            VersionCurrentText.Text = $"current: {projVersion}";
        }