Example #1
0
        void App_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args == null || e.Args.Length < 1)
            {
                return;
            }
            Instance = this;
            if (e.Args[0].Equals("c"))//clip
            {
                this.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
                if (e.Args.Length > 1)
                {
                    this.infoPath = e.Args[1];
                }
                ClipWindow clipWindow = new ClipWindow();
                System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(clipWindow);
                clipWindow.Show();

                //clipWindow.Activate();
                SetForegroundWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle);
            }
            else if (e.Args[0].Equals("s"))//settings
            {
                if (e.Args.Length > 1)
                {
                    this.ClipoffPath = e.Args[1];
                }
                (new SettingWindow()).Show();
            }
            else if (e.Args[0].Equals("a"))//about
            {
            }
        }
Example #2
0
 public ToolBar(ClipWindow clipWindow)
 {
     this.clipWindow = clipWindow;
     InitializeComponent();
     InitializeButtons();
 }
Example #3
0
 public void BeginClip()
 {
     ClipWindow clipWindow = new ClipWindow();
     clipWindow.Topmost = true;
     System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(clipWindow);
     clipWindow.Show();
     clipWindow.Activate();
 }