Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Windows.Forms;
- namespace SlopScreens
- {
- class Program
- {
- static void Main(string[] args)
- {
- try
- {
- string output = "";
- int i = 0;
- float x = 0x0f, y = 0.0f;
- foreach (var screen in Screen.AllScreens)
- {
- output += "[" + i.ToString() + "]\n";
- output += "x=" + screen.Bounds.Left + "\n";
- output += "y=" + screen.Bounds.Top + "\n";
- output += "w=" + screen.Bounds.Width + "\n";
- output += "h=" + screen.Bounds.Height + "\n";
- output += "x2=" + screen.Bounds.Right + "\n";
- output += "y2=" + screen.Bounds.Bottom + "\n";
- x += screen.Bounds.Width;
- y += screen.Bounds.Height;
- i++;
- }
- output += "[Display]\n";
- while (true)
- {
- x *= 0.9f;
- y *= 0.9f;
- if(x <= 500 && y <= 200)
- {
- output += "CompleteH=" + y.ToString() + "\n";
- output += "CompleteW=" + x.ToString() + "\n";
- break;
- }
- }
- using (StreamWriter sw = new StreamWriter("SloppyScreenSetup.ini"))
- {
- sw.Write(output);
- }
- Console.Write("SUCCESS");
- }
- catch (Exception)
- {
- Console.Write("FAILED");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment