コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: SeidChr/ScottPlot
        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;
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: SeidChr/ScottPlot
        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}";
        }