Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using WinFormsApp1.ext;
- namespace WinFormsApp1
- {
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- public static List<Window> AllWindows = new List<Window>();
- public static PyHelper pyHelper = new PyHelper();
- [STAThread]
- static void Main()
- {
- ApplicationConfiguration.Initialize();
- Window tg = new Window("Google - Desktop", "https://www.google.com/");
- int NextMove = 0;
- // For Screen in Screen.AllScreens
- foreach(Screen screen in Screen.AllScreens)
- {
- if(NextMove == 0)
- {
- WinAPI.MoveWindow(tg.Handle, NextMove, 0, screen.Bounds.Width, screen.Bounds.Height, true);
- tg.WindowState = FormWindowState.Maximized;
- AllWindows.Add(tg);
- } else
- {
- Window CurrentWindow = new Window("Bing - Desktop", "https://www.bing.com/");
- WinAPI.MoveWindow(CurrentWindow.Handle, NextMove, 0, screen.Bounds.Width, screen.Bounds.Height, true);
- CurrentWindow.WindowState = FormWindowState.Maximized;
- CurrentWindow.Show();
- AllWindows.Add(CurrentWindow);
- }
- NextMove += screen.Bounds.Width;
- }
- Thread SocketServer = new Thread(pyHelper.SocketServer);
- SocketServer.Start();
- Application.Run(tg);
- }
- public static List<Window> GetWindows() {
- return AllWindows;
- }
- public static void SetUrl(string url)
- {
- foreach(Window win in AllWindows)
- {
- win.webView21.NavigateToString(url);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement