Beispiel #1
0
        public MainWindow()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            InitializeComponent();

            Properties.Settings.Default.Upgrade();

            Border b = new Border();

            b.BorderThickness = new Thickness(1);
            b.BorderBrush     = Brushes.Black;

            // _screen = new Screen.TextControlScreen(this);
            _screen = new Absolute.AbsoluteScreen(this);
            pnlScreenPlaceholder.Children.Add(b);

            b.Child      = (UIElement)_screen;
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);

            if (Properties.Settings.Default.LastPlayedGames != null)
            {
                var games = Properties.Settings.Default.LastPlayedGames.Split('|');
                LastPlayedGames = new List <string>(games);
            }

            buildMainMenu();

            this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

            this.TextInput      += new TextCompositionEventHandler(MainWindow_TextInput);
            this.PreviewKeyDown += new KeyEventHandler(MainWindow_PreviewKeyDown);

            statusBottom.Visibility = System.Windows.Visibility.Hidden;

            setFrotzOptions();
        }
        public MainWindow()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            InitializeComponent();

            Properties.Settings.Default.Upgrade();

            Border b = new Border();
            b.BorderThickness = new Thickness(1);
            b.BorderBrush = Brushes.Black;

            // _screen = new Screen.TextControlScreen(this);
            _screen = new Absolute.AbsoluteScreen(this);
            pnlScreenPlaceholder.Children.Add(b);

            b.Child = (UIElement)_screen;
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);

            if (Properties.Settings.Default.LastPlayedGames != null)
            {
                var games = Properties.Settings.Default.LastPlayedGames.Split('|');
                LastPlayedGames = new List<string>(games);
            }

            buildMainMenu();

            this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

            this.TextInput += new TextCompositionEventHandler(MainWindow_TextInput);
            this.PreviewKeyDown += new KeyEventHandler(MainWindow_PreviewKeyDown);

            statusBottom.Visibility = System.Windows.Visibility.Hidden;

            setFrotzOptions();
        }