Пример #1
0
 public static NFCHelper getInstance()
 {
     if (singleton == null) {
     singleton = new NFCHelper();
       }
       return singleton;
 }
Пример #2
0
 public static NFCHelper getInstance()
 {
     if (singleton == null)
     {
         singleton = new NFCHelper();
     }
     return(singleton);
 }
Пример #3
0
        void WriteURL_Click(object sender, EventArgs e)
        {
            String prompt = Microsoft.VisualBasic.Interaction.InputBox("Enter URL to write: ", "NFC Writer", "http://");

            if (prompt != null && prompt != "")
            {
                NFCHelper.getInstance().WriteURIRecord(prompt);
            }
        }
Пример #4
0
        static void Main(string[] args)
        {
            // ------------------------------------------
            //  OPTIONS
            // ------------------------------------------

            bool   help     = false;
            String language = "fr-FR";

            var p = new OptionSet()
            {
                { "l|lang=", "the {LANGUAGE} Culture. Default is fr-FR", v => language = v },
                { "h|help", "show this message and exit", v => help = v != null },
            };

            List <string> extra;

            try { extra = p.Parse(args); }
            catch (OptionException e) {
                Console.Write("NFCHelper: ");
                Console.WriteLine(e.Message);
                Console.WriteLine("Try `NFCHelper --help' for more information.");
                Application.Exit();
            }

            if (help)
            {
                ShowHelp(p);
                Application.Exit();
            }


            // ------------------------------------------
            //  STARTING
            // ------------------------------------------

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

            // Show the system tray icon.
            using (ProcessIcon pi = new ProcessIcon()) {
                pi.Display();

                // Start NFCHelper
                NFCHelper.getInstance();

                // Make sure the application runs!
                Application.Run();
            }
        }