Exemple #1
0
		private static int Main(string[] args)
		{
			int result;
			try
			{
				result = new ProgramInstance().Main(args);
			}
			catch (Exception ex)
			{
				string text;
				if (ex is UsageException)
				{
					text = "Usage:";
				}
				else
				{
					text = string.Format("Error starting MapCruncher: {0}", ex.Message);
				}
				if (args.Length > 0)
				{
					Program.EmitUsage(text);
				}
				else
				{
					MessageBox.Show(text, "Error starting MapCruncher");
				}
				result = 1;
			}
			return result;
		}
Exemple #2
0
        private static int Main(string[] args)
        {
            int result;

            try
            {
                result = new ProgramInstance().Main(args);
            }
            catch (Exception ex)
            {
                string text;
                if (ex is UsageException)
                {
                    text = "Usage:";
                }
                else
                {
                    text = string.Format("Error starting MapCruncher: {0}", ex.Message);
                }

                if (args.Length > 0)
                {
                    EmitUsage(text);
                }
                else
                {
                    MessageBox.Show(text, "Error starting MapCruncher");
                }

                result = 1;
            }

            return(result);
        }