Exemplo n.º 1
0
        public void UpdateInfo(int row, int col)
        {
            Rect bounds = DisplayConfiguration.GetCorrectedCellBounds(row, col, SelectedApp.HWND);

            txtInfo.Content = "Expected: " + bounds.Width.ToString("0") + "x" + bounds.Height.ToString("0") + ", ";
            if (imagePreview.Source != null)
            {
                txtInfo.Content += "Snapshot Size: " + imagePreview.Source.Width + "x" + imagePreview.Source.Height;
            }
            else
            {
                txtInfo.Content += "No Snaphot";
            }
        }
        private void ApplyLayout(AppChooserUserControl chooser, int row, int col)
        {
            if (chooser.SelectedApp == null || !chooser.SelectedApp.IsActive)
            {
                return;
            }

            LayoutConfiguration layout = this.LayoutConfiguration; // AppContext.Configuration.Displays[0];

            layout.GridSize.UpdateCellSizes(gridApps);

            Rect bounds = layout.GetCorrectedCellBounds(row, col, chooser.SelectedApp.HWND);

            Logic.MoveWindow(chooser.SelectedApp.HWND, bounds.Left, bounds.Top, bounds.Width, bounds.Height);
        }