示例#1
0
        public static void Main(string[] args)
        {
            AppNameVer = Assembly.GetExecutingAssembly().GetName().Name + " " +
                         Assembly.GetExecutingAssembly().GetName().Version.ToString(3);

            // check for help request
            if (new List <string>(args).Contains("--help"))
            {
                Console.WriteLine(GetHelpMsg());
                return;
            }

            Application.Init();

            retStr = GlobalObj.Initialize(args);

            // check for problems detected
            if (retStr != "")
            {
                // check for problem type
                if (!retStr.Contains("SCARD_"))
                {
                    // error detected (not scard problem)
                    ShowMessage("ERROR", retStr, MessageType.Error);
                    return;
                }
                else
                {
                    // warning (scard problem, can use serial reader)
                    ShowMessage("WARNING", retStr, MessageType.Warning);
                }
            }

            // create new Gtk Gui for application and show it
            MainWindowClass mwc = new MainWindowClass();

            mwc.Show();
            Application.Run();
        }
示例#2
0
        public static void Main(string[] args)
        {
            AppNameVer = Assembly.GetExecutingAssembly().GetName().Name + " " +
                         Assembly.GetExecutingAssembly().GetName().Version.ToString(3);

            // check for help request
            if (new List<string>(args).Contains("--help"))
            {
                Console.WriteLine(GetHelpMsg());
                return;
            }

            Application.Init();

            retStr = GlobalObj.Initialize(args);

            // check for problems detected
            if (retStr != "")
            {
                // check for problem type
                if (!retStr.Contains("SCARD_"))
                {
                    // error detected (not scard problem)
                    ShowMessage("ERROR", retStr, MessageType.Error);
                    return;
                }
                else
                {
                    // warning (scard problem, can use serial reader)
                    ShowMessage("WARNING", retStr, MessageType.Warning);
                }

            }

            // create new Gtk Gui for application and show it
            MainWindowClass mwc = new MainWindowClass();
            mwc.Show();
            Application.Run ();
        }