// установка рандомных размеров окна и инстанса
Random rnd = new Random();
string[] monitorSizeArr = {"1366|768", "1920|1080", "1280|1024", "1024|768", "1600|900"};
string monitorSize = monitorSizeArr[rnd.Next(0,5)];
string[] split = monitorSize.Split(new[] {"|"}, StringSplitOptions.None);
int ScrSizeWidth = Convert.ToInt16(split[0]);
int ScrSizeHeight = Convert.ToInt16(split[1]);
int AvailScrWidth = ScrSizeWidth;
int AvailScrHeight = ScrSizeHeight - 30;
int WindowSizeWidth = ScrSizeWidth;
int WindowSizeHeight = ScrSizeHeight;
int OuterWidthShift = rnd.Next(7, 25);
int OuterHeightShift = rnd.Next(96, 140);
project.Profile.ScreenSizeWidth = ScrSizeWidth;
project.Profile.ScreenSizeHeight = ScrSizeHeight;
project.Profile.AvailScreenWidth = AvailScrWidth;
project.Profile.AvailScreenHeight = AvailScrHeight;
project.Profile.OuterWidthShift = OuterWidthShift;
project.Profile.OuterHeightShift = OuterHeightShift;
instance.SetWindowSize(WindowSizeWidth, WindowSizeHeight);
return WindowSizeWidth+"x"+WindowSizeHeight;