This class contains methods to allow the user to see the results of changing the current threads CultureInfo and the automatic loading of the correct satellite assembly.
示例#1
0
        public static void ExamPrep()
        {
            var manager = new UseResources();

            ((IFile)manager).Open();
            ((IDatabase)manager).Open();
        }
    /// <summary>
    /// Entry point for sample application.
    /// The Main method gets the current command-line options by calling GetArgs().
    /// It then uses the current options to determine which method to call.
    /// </summary>
    /// <param name="args"></param>
    public static void Main(string [] args)
    {
        //Get arguments.
        Options currentOptions = GetArgs(args);

        //Execute relevant portion of program depending on arguments.
        switch (currentOptions)
        {
        case Options.GenerateResourceFiles:
            GenerateResources gr = new GenerateResources();
            gr.ResourceFileUsage();
            gr.GenerateResourceFiles();
            gr.BuildSatelliteAssemblies();
            return;

        case Options.GenerateTextFiles:
            GenerateText g = new GenerateText();
            g.TextFileUsage();
            g.GenerateTextFiles();
            return;

        case Options.UseResources:
            UseResources u = new UseResources();
            u.Run();
            return;

        case Options.Help:
            Usage();
            return;

        case Options.None:
            goto case Options.Help;

        case Options.Invalid: //Prompt for
            Console.WriteLine("Invalid option, please try again.");
            Usage();
            break;

        default:
            //Should not get here.
            Console.WriteLine("Invalid option in Main()");
            return;
        } //switch
    }     //Main()
示例#3
0
  /// <summary>
  /// Entry point for sample application.
  /// The Main method gets the current command-line options by calling GetArgs().
  /// It then uses the current options to determine which method to call.
  /// </summary>
  /// <param name="args"></param>
  public static void Main(string [] args) 
  {
    //Get arguments.
    Options currentOptions = GetArgs(args);
    //Execute relevant portion of program depending on arguments.
    switch (currentOptions)
    {
      case Options.GenerateResourceFiles:
        GenerateResources gr = new GenerateResources();
        gr.ResourceFileUsage();
        gr.GenerateResourceFiles();
        gr.BuildSatelliteAssemblies();
        return;

      case Options.GenerateTextFiles:
        GenerateText g = new GenerateText();
        g.TextFileUsage();
        g.GenerateTextFiles();
        return;

      case Options.UseResources:
        UseResources u = new UseResources();
        u.Run();
        return;

      case Options.Help:
        Usage();
        return;

      case Options.None:
        goto case Options.Help;

      case Options.Invalid:  //Prompt for 
        Console.WriteLine("Invalid option, please try again.");
        Usage();
        break;

      default:
        //Should not get here.
        Console.WriteLine("Invalid option in Main()");
        return;
    }//switch
  }//Main()