示例#1
0
文件: B.cs 项目: rafaolivas19/LibreR
        private void OpenBtn_Click(object sender, System.EventArgs e)
        {
            switch (Index.TestMode)
            {
            case TestType.StartWithWaitGeneric:
                FormUnifier.StartWithWait <A>(() => Thread.Sleep(2000));
                break;

            case TestType.StartWithWait:
                FormUnifier.StartWithWait(() => {
                    Thread.Sleep(2000);
                    return(FormUnifierResult.Create <A>());
                }, "Waiting for A...");
                break;
            }
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FormUnifier.Init <Parent, Wait>();

            switch (TestMode)
            {
            case TestType.StartWithWaitGeneric:
                FormUnifier.StartWithWait <A>(() => Thread.Sleep(2000), null, new FormUnifierParams("Starting..."));
                break;

            case TestType.StartWithWait:
                FormUnifier.StartWithWait(() => {
                    Thread.Sleep(2000);
                    return(FormUnifierResult.Create <A>());
                }, "Starting...");
                break;
            }

            Application.Run(FormUnifier.Container);
        }