Exemplo n.º 1
0
 public static void ActivateWindow(Process process = null)
 {
     if (process == null)
     {
         process = Process.GetCurrentProcess();
     }
     SingleInstance <App> .ActivateWindow(process);
 }
Exemplo n.º 2
0
        public bool SignalExternalCommandLineArgs(IList <string> args)
        {
            // handle command line arguments of second instance
            SingleInstance.ActivateWindow(Process.GetCurrentProcess());

            Trace.TraceInformation("Received args: {0}", String.Join(" ", args));

            return(true);
        }
Exemplo n.º 3
0
        public bool SignalExternalCommandLineArgs(IList <string> args)
        {
            // handle command line arguments of second instance
            SingleInstance <App> .ActivateWindow(Process.GetCurrentProcess());

            Current.MainWindow.WindowState = WindowState.Maximized;
            Current.MainWindow.Topmost     = true;
            return(true);
        }