static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); RB_Tools.Shared.Cli.Options commandLineOptions = new RB_Tools.Shared.Cli.Options(); if (CommandLine.Parser.Default.ParseArguments(args, commandLineOptions)) { // Create our logger Logging.Type loggingType = (commandLineOptions.Logging == true ? Logging.Type.File : Logging.Type.Null); Logging logger = Logging.Create("Create Review", loggingType, Logging.Threading.MultiThread); // Copy user settings from previous version if necessary UpdateVersionSettings(); // Build up the content we've been asked to review // If we don't have any, we've already complained Review.Review.Content requestContent = Review.Review.ExtractContent(commandLineOptions.SkipReviews, commandLineOptions.FileList, commandLineOptions.InjectPaths, logger); if (requestContent == null) { return; } // Run the dialog Application.Run(new CreateReview(commandLineOptions.FileList, requestContent, logger)); } }
// // Constructor // public CreateReview(string originalRequest, Review.Review.Content reviewSource, Logging logger) { // Save our log m_logger = logger; // Save our properties m_reviewSource = reviewSource; m_requestDirectory = ExtractSourceDirectory(); m_originalRequest = originalRequest; InitializeComponent(); InitialiseDialogElements(); InitialiseReviewGroups(); UpdateCreateReviewDialogState(State.Idle); // If this is a patch review, disable the list files option if (reviewSource.Source == Review.Review.Source.Patch) { filesForReviewToolStripMenuItem.Enabled = false; filesForReviewToolStripMenuItem.ToolTipText = "Unable to view the individual files of a review\nwhen reviewing a manually created patch file"; } else if (reviewSource.Source == Review.Review.Source.None) { filesForReviewToolStripMenuItem.Enabled = false; filesForReviewToolStripMenuItem.ToolTipText = "Unable to review the individual files of a review\nwhen skipping the review process"; reviewDiffToolStripMenuItem.Enabled = false; reviewDiffToolStripMenuItem.ToolTipText = "Unable to view the diff content\nwhen skipping the review process"; // Disable a few other options button_RefreshGroups.Enabled = false; checkedListBox_ReviewGroups.Enabled = false; textBox_ReviewId.Enabled = false; checkBox_CopiesAsAdds.Enabled = false; checkBox_KeepArtifacts.Enabled = false; } }