view Implab.Fx.Test/OverlayTest.cs @ 32:8eca2652d2ff

fixed: StackOverflow in IPromiseBase.Then(handler) fixed: hang in ChainMap method on empty arrays
author cin
date Tue, 08 Apr 2014 23:25:01 +0400
parents f2559580b481
children 91362ffbecf8
line wrap: on
line source

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Windows.Forms;
using Implab.Fx.Test.Sample;
using System.Drawing;
using Implab.Fx;

namespace Implab.Fx.Test
{
    [TestClass]
    public class OverlayTest
    {
        [TestMethod]
        public void TestMethod1()
        {
            var mainForm = new MainForm();
            
            mainForm.ButtonEvent += (sender, args) =>
            {
                var overlay = new OverlayForm();
                mainForm.OverlayFadeIn(overlay).Then(
                    o => o.ButtonEvent += (s2, args2) =>
                    {
                        o.CloseFadeOut();
                    }
                );
            };
            
            Application.Run(mainForm);
        }
    }
}