ui/wpf/UIcore/Window.cs

Sat, 24 Jan 2015 19:16:38 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 24 Jan 2015 19:16:38 +0100
changeset 79
052224670baf
parent 78
135920fe441b
child 81
5eb765a7a793
permissions
-rw-r--r--

configure script updated

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace UI
{
    public class MainWindow : Window
    {
        private Label label1;
        
        public MainWindow(String title)
        {
            Title = title;
            Width = 300;
            Height = 300;
            GC.KeepAlive(this); // remove KeepAlive and add the Window to the application
        }

        public static MainWindow CreateMainWindow(String title)
        {
            return Application.GetInstance().Exec<MainWindow>(() => new MainWindow(title));
        }

        public void ShowWindow()
        {
            Application.GetInstance().Exec(() => this.Show());
        }
    }
}

mercurial