コード例 #1
0
        private void Window_PreviewKeyUp(object sender, KeyEventArgs e)
        {
            //Awful code
            switch (e.Key)
            {
            case Key.F5:
                GameRefresh();
                break;

            case Key.A:
                AboutBox1 aboutDialog = new AboutBox1();
                aboutDialog.ShowDialog();
                break;

            case Key.H:
                TipsWindow tipsWindow = new TipsWindow();
                tipsWindow.ShowDialog();
                break;

            case Key.F12:
                SimpleConfigWindow configWindow = new SimpleConfigWindow();
                configWindow.ShowDialog();
                break;
            }
        }
コード例 #2
0
        private void MapGrid_Loaded(object sender, RoutedEventArgs e)
        {
            //Hot loading
            Init();

            //Show 'tips window'
            if (!Default.NeedNotToShowTips)
            {
                TipsWindow tipsWindow = new TipsWindow();
                tipsWindow.ShowDialog();
            }
        }