protected override void OnStart(string[] args)
        {
            //System.Diagnostics.Debugger.Launch();
            base.OnStart(args);
            if (args.Length > 0)
            {
                string _configPath = args[0];
                ft = new FileTransfer(true, _configPath);

                WindowsContextMenu.Add("Send To My Client");
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // test if this is the first instance and register receiver, if so.
            if (SingletonController.IamFirst(new SingletonController.ReceiveDelegate(SecondRun)))
            {
                WindowsContextMenu.Add("Send To Server");
                Application.Run(new frmMain(args, new FileTransfer(true)));
            }
            else
            {
                // send command line args to running app, then terminate
                SingletonController.Send(args);
            }
            SingletonController.Cleanup();
        }