Ejemplo n.º 1
0
        private Objects.Window GimmeWindow()
        {
            var rnd               = new Random();
            var resizeValues      = Enum.GetValues(typeof(ResizeMode));
            var windowStateValues = Enum.GetValues(typeof(WindowState));
            var testAdd           = new Objects.Window();

            testAdd.Canvas = new Canvas
            {
                IconSource = "Globe.png",
                Name       = "Earth",
                ClassName  = "EarthCanvasCustomizer"
            };
            testAdd.OverlaySettings = new OverlaySettings
            {
                Dpi              = rnd.NextDouble(),
                IsFeedbackOn     = rnd.Next() % 2 == 0,
                IsNotificationOn = rnd.Next() % 2 == 0,
                Offset           = 0,
                Width            = rnd.Next(25)
            };
            testAdd.WindowSettings = new WindowSettings
            {
                Height      = rnd.Next(25),
                IsSandboxed = rnd.Next() % 2 == 0,
                Left        = rnd.Next(25),
                ResizeMode  = (ResizeMode)rnd.Next(resizeValues.Length),
                ScreenSpan  = rnd.Next(2),
                ScreenIndex = 0,
                ScreenState = (WindowState)rnd.Next(windowStateValues.Length),
                Top         = rnd.Next(25),
                Width       = rnd.Next(25)
            };
            return(testAdd);
        }
 private Objects.Window GimmeWindow()
 {
     var rnd = new Random();
       var resizeValues = Enum.GetValues( typeof( ResizeMode ) );
       var windowStateValues = Enum.GetValues( typeof( WindowState ) );
       var testAdd = new Objects.Window();
       testAdd.Canvas = new Canvas
       {
     IconSource = "Globe.png",
     Name = "Earth",
     ClassName = "EarthCanvasCustomizer"
       };
       testAdd.OverlaySettings = new OverlaySettings
       {
     Dpi = rnd.NextDouble(),
     IsFeedbackOn = rnd.Next() % 2 == 0,
     IsNotificationOn = rnd.Next() % 2 == 0,
     Offset = 0,
     Width = rnd.Next( 25 )
       };
       testAdd.WindowSettings = new WindowSettings
       {
     Height = rnd.Next( 25 ),
     IsSandboxed = rnd.Next() % 2 == 0,
     Left = rnd.Next( 25 ),
     ResizeMode = (ResizeMode)rnd.Next( resizeValues.Length ),
     ScreenSpan = rnd.Next( 2 ),
     ScreenIndex = 0,
     ScreenState = (WindowState)rnd.Next( windowStateValues.Length ),
     Top = rnd.Next( 25 ),
     Width = rnd.Next( 25 )
       };
       return testAdd;
 }