Exemple #1
0
        private void btnGeneratePOM_Click(object sender, RoutedEventArgs e)
        {
            JARBuilderEventArgs args = new JARBuilderEventArgs(RepositoryRoot, (LogLevel)cbLogLevel.SelectedValue);

            cts = new CancellationTokenSource();
            args.CancellationToken     = cts.Token;
            args.JDKFolder             = tbJDKFolder.Text;
            args.SourceFolder          = tbDestinationFolder.Text;
            args.JarDestinationFolder  = tbJarDestinationFolder.Text;
            args.SplitFolderByAssembly = cbEnableSplitFolder.IsChecked.Value;
            args.WithJARSource         = cbWithSource.IsChecked.Value;
            args.EmbeddingJCOBridge    = cbWithEmbedding.IsChecked.Value;
            args.GeneratePOM           = JARBuilderEventArgs.POMType.Release;
            args.AssembliesToUse       = AssemblyDataCollection.CreateList(AssemblyDataCollection);

            if (cbExportToFile.IsChecked.Value)
            {
                export(args);
                if (MessageBox.Show("Continue operation?", string.Empty, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.No)
                {
                    return;
                }
            }

            commandPanel.IsEnabled = false;
            btnStop.Visibility     = Visibility.Visible;
            Task.Factory.StartNew(JavaBuilder.CreatePOM, args);
        }
Exemple #2
0
        private void btnBuildDoc_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DocsBuilderEventArgs args = new DocsBuilderEventArgs(RepositoryRoot, (LogLevel)cbLogLevel.SelectedValue);
                cts = new CancellationTokenSource();
                args.CancellationToken     = cts.Token;
                args.JDKFolder             = tbJDKFolder.Text;
                args.JDKTarget             = (JDKVersion)cbTarget.SelectedValue;
                args.SourceFolder          = tbDestinationFolder.Text;
                args.SplitFolderByAssembly = cbEnableSplitFolder.IsChecked.Value;
                args.AssembliesToUse       = AssemblyDataCollection.CreateList(AssemblyDataCollection);
                args.CommitVersion         = tbCommitVersion.Text;

                if (cbExportToFile.IsChecked.Value)
                {
                    export(args);
                    if (MessageBox.Show("Continue operation?", string.Empty, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.No)
                    {
                        return;
                    }
                }

                commandPanel.IsEnabled = false;
                btnStop.Visibility     = Visibility.Visible;
                Task.Factory.StartNew(JavaBuilder.GenerateDocs, args);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        static string[] createList(FolderBuilderEventArgs args)
        {
            var result = JavaBuilder.CreateFolderList(args);

            foreach (var item in result)
            {
                item.IsSelected = true;
            }

            return(AssemblyDataCollection.CreateList(result));
        }