Beispiel #1
0
        private static void Main(string[] args)
        {
            // get the command line info.
            var ci = new CommandLineInfo(args);

            // is it help?
            if (ci.DisplayHelp())
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var databasePath = ci.GetDatabasePath();

            if (null == databasePath)
            {
                MessageBox.Show(@"Unknown or missing database path.", @"Help", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            var directoryName = ci.GetEnginePath();

            if (null == directoryName)
            {
                MessageBox.Show(@"Unknown or missing engines path.", @"Help", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            // the text
            const string text = @"meh";
            string       lastError;
            var          engine = InitialiseEngine(directoryName, databasePath, out lastError);

            Application.Run(new DetailsForm(engine, text));

            // release it then.
            engine?.Release();
        }
Beispiel #2
0
    private static void Main(string[] args)
    {
      // get the command line info.
      var ci = new CommandLineInfo(args);

      // is it help?
      if (ci.DisplayHelp())
      {
        return;
      }

      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      var databasePath = ci.GetDatabasePath();
      if (null == databasePath)
      {
        MessageBox.Show("Unknown or missing database path.", "Help", MessageBoxButtons.OK, MessageBoxIcon.Error);
        return;
      }
      var directoryName = ci.GetEnginePath();
      if (null == directoryName)
      {
        MessageBox.Show("Unknown or missing engines path.", "Help", MessageBoxButtons.OK, MessageBoxIcon.Error);
        return;
      }

      // the text
      const string text = @"Blah";
      string lastError;
      var engine = InitialiseEngine(directoryName, databasePath, out lastError);
      Application.Run(new DetailsForm( engine, text ));

      // release it then.
      engine?.Release();
    }