Exemplo n.º 1
0
 static void Main()
 {
     PicesSipperVariables.InitializeEnvironment();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new GetRunTimeParameters());
 }
Exemplo n.º 2
0
        static void Main()
        {
#if DEBUG
            PicesMethods.StartMemoryLeakDetection();
#endif
            PicesSipperVariables.InitializeEnvironment();
            PicesDataBase.Initialization();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new PicesCommander());
            GC.Collect();
        }
Exemplo n.º 3
0
        static void Main(string[]  args)
        {
#if DEBUG
            PicesMethods.StartMemoryLeakDetection();
#endif
            PicesSipperVariables.InitializeEnvironment();

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

            String fileName = null;
            if ((args.Length == 1) && (args[0][0] != '-'))
            {
                fileName = args[0];
            }

            else
            {
                int x = 0;
                while (x < args.Length)
                {
                    String fieldName  = "";
                    String fieldValue = "";

                    if (args[x][0] != '-')
                    {
                        if (String.IsNullOrEmpty(fileName))
                        {
                            fileName = args[x];
                        }
                        x++;
                    }
                    else
                    {
                        fieldName = args[x];
                        x++;

                        if ((x < args.Length) && (args[x][0] != '-'))
                        {
                            fieldValue = args[x];
                            x++;
                        }

                        fieldName = fieldName.ToUpper();

                        if ((fieldName == "-NAME") || (fieldName == "-FILENAME"))
                        {
                            fileName = fieldValue;
                        }

                        else
                        {
                            System.Console.WriteLine("Invalid Parameter[" + fieldName + "]");
                            return;
                        }
                    }
                }
            }


            if (String.IsNullOrEmpty(fileName))
            {
                try
                {
                    Application.Run(new SipperFileViewer());
                }
                catch (Exception e)
                {
                    MessageBox.Show("Exception Starting SipperFileViewer" + "\n\n" +
                                    e.ToString()
                                    );
                }
            }
            else
            {
                try
                {
                    Application.Run(new SipperFileViewer(fileName));
                }
                catch (Exception e2)
                {
                    MessageBox.Show("Exception Starting SipperFileViewer" + "\n\n" + e2.ToString());
                }
            }
        }