示例#1
0
 // Show the Options dialog
 private void optionsButton_Click(object sender, System.EventArgs e)
 {
     Options o = new Options();
     o.ShowDialog();
 }
示例#2
0
 private static void ShowUsage(JobType? jobType, Options options)
 {
     var jobFactory = jobType == null ? null : SelectFactory(jobType.Value);
     var codeBase = Bootstrap.GetEntryAssemblyUri().LocalPath;
     if (jobFactory == null)
     {
         Console.Error.WriteLine($"Usage: {Path.GetFileName(codeBase)} <mode> [options]");
         Console.Error.WriteLine("  where mode is one of: dumpstacks, dumpheap");
     }
     else
     {
         var convenientJobTypeString = jobType.ToString().ToLower();
         Console.Error.WriteLine($"Usage: {Path.GetFileName(codeBase)} {convenientJobTypeString} [options]");
         jobFactory.AddOptionDefinitions(options);
     }
     options.WriteOptionDescriptions(Console.Error);
 }