Exemplo n.º 1
0
        public async Task <string> LoadLayout(LoadLayoutRequest request)
        {
            Console.WriteLine("__________________");
            Console.WriteLine($"New layout loading({request.Layout.Name})");

            if (request.OnlyThisLayout)
            {
                ProcessManager.CloseAllVisibleProcesses(GetAppsNames(request.Layout.Apps));
            }

            List <Task> layoutTasks = new List <Task>();


            OpenApps(request.Layout.Apps);

            AppsPosition.ResetWindows();
            foreach (AppModel app in request.Layout.Apps)
            {
                layoutTasks.Add(Task.Run(() => LoadApp(request, app)));
            }

            await Task.WhenAll(layoutTasks);

            return("All done");
        }
Exemplo n.º 2
0
 public void CloseAllVisibleProcesses()
 {
     ProcessManager.CloseAllVisibleProcesses();
 }