Example #1
0
        public Main()
        {
            Instance = this;
            trayIcon = new Class.TrayIcon();
            pointTrayIcon = trayIcon.trayIcon;

            Hook = new KeyboardHook();
            ReAttachKeyboardHook();

            if (!File.Exists(Path.GetTempPath() + "/UploadLog.xml"))
            {
                XDocument xmlFile = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
                xmlFile.Add(new XElement("UploadList"));
                xmlFile.Save(Path.GetTempPath() + "/UploadLog.xml");
            }
        }
Example #2
0
        static void Main()
        {
             //string[] args = Environment.GetCommandLineArgs();
             //MessageBox.Show(args[1]);

            bool createdNew;
            using (var mutex = new Mutex(true, "SnipUp", out createdNew))
            {
                if (createdNew)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.ThreadException += Application_ThreadException;
                    newMain = new Main();
                    Application.Run();
                }
            }
            
        }