static void Main(string[] args)
        {
            //ESRI License Initializer generated code.
            m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeAdvanced },
                                                         new esriLicenseExtensionCode[] { });
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string standard = "APP6"; // "2525";

            if (args.Length < 1)
            {
                ///////////////////////////////////////////////////////////////////////////////////////
                // WORKAROUND: Somewhat Kludgey way to get a Windows App also to work as a console app
                // Set it to Console App in project settings, but then hide the Command Window here:
                IntPtr h = Process.GetCurrentProcess().MainWindowHandle;
                ShowWindow(h, 0);
                ///////////////////////////////////////////////////////////////////////////////////////

                // if no command line arguments, run as Form App
                Application.Run(new Form1(standard));
            }
            else
            {
                // if command line arguments, run as Consolse App
                Console.WriteLine("Usage: TestSymbolCreator.exe [Symbol ID Code] {[2525 | APP6]}");

                string sic = args[0];

                if (args.Length > 1)
                {
                    standard = args[1];
                }

                string exportFilename = sic + ".png";
                exportFilename = exportFilename.Replace('*', '-'); // just in case some *'s in sic

                const int size = 256;

                SymbolExporter symbolExporter = new SymbolExporter(standard);
                symbolExporter.CreateImageFileFromSic(sic, size, exportFilename);
            }

            //ESRI License Initializer generated code.
            //Do not make any call to ArcObjects after ShutDownApplication()
            m_AOLicenseInitializer.ShutdownApplication();
        }
        static void Main(string[] args)
        {
            //ESRI License Initializer generated code.
            m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeAdvanced },
            new esriLicenseExtensionCode[] { });
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string standard = "APP6"; // "2525";

            if (args.Length < 1)
            {
                ///////////////////////////////////////////////////////////////////////////////////////
                // WORKAROUND: Somewhat Kludgey way to get a Windows App also to work as a console app
                // Set it to Console App in project settings, but then hide the Command Window here:
                IntPtr h = Process.GetCurrentProcess().MainWindowHandle;
                ShowWindow(h, 0);
                ///////////////////////////////////////////////////////////////////////////////////////

                // if no command line arguments, run as Form App
                Application.Run(new Form1(standard));
            }
            else
            {
                // if command line arguments, run as Consolse App
                Console.WriteLine("Usage: TestSymbolCreator.exe [Symbol ID Code] {[2525 | APP6]}");

                string sic = args[0];

                if (args.Length > 1)
                    standard = args[1];

                string exportFilename = sic + ".png";
                exportFilename = exportFilename.Replace('*', '-'); // just in case some *'s in sic

                const int size = 256;

                SymbolExporter symbolExporter = new SymbolExporter(standard);
                symbolExporter.CreateImageFileFromSic(sic, size, exportFilename);
            }

            //ESRI License Initializer generated code.
            //Do not make any call to ArcObjects after ShutDownApplication()
            m_AOLicenseInitializer.ShutdownApplication();
        }
        public Form1(string standard)
        {
            InitializeComponent();

            symbolExporter = new SymbolExporter(standard);
        }
        public Form1(string standard)
        {
            InitializeComponent();

            symbolExporter = new SymbolExporter(standard);
        }