コード例 #1
0
 void ChoosePuzzle_Loaded(object sender, RoutedEventArgs e)
 {
     List<PuzzleViewInfo> puzzles = new List<PuzzleViewInfo>();
     PuzzleViewInfo pv;
     for (int i = 0; i < puzzleAdapter.puzzle.Length; ++i)
     {
         pv = new PuzzleViewInfo(puzzleAdapter.puzzle[i]);
         puzzles.Add(pv);
     }
     puzzlesListBox.ItemsSource = puzzles;
 }
コード例 #2
0
        void ChoosePuzzle_Loaded(object sender, RoutedEventArgs e)
        {
            List <PuzzleViewInfo> puzzles = new List <PuzzleViewInfo>();
            PuzzleViewInfo        pv;

            for (int i = 0; i < puzzleAdapter.puzzle.Length; ++i)
            {
                pv = new PuzzleViewInfo(puzzleAdapter.puzzle[i]);
                puzzles.Add(pv);
            }
            puzzlesListBox.ItemsSource = puzzles;
        }
コード例 #3
0
 void ChooseDifficultyPage_Loaded(object sender, RoutedEventArgs e)
 {
     PuzzleViewInfo pv = new PuzzleViewInfo(curPuzzle);
     yourResults.resEasyMoves.Text = pv.moveseasy.ToString();
     yourResults.resMediumMoves.Text = pv.movesmedium.ToString();
     yourResults.resHardMoves.Text = pv.moveshard.ToString();
     yourResults.resExpertMoves.Text = pv.movesexpert.ToString();
     yourResults.resEasyTime.Text = pv.timeeasy;
     yourResults.resMediumTime.Text = pv.timemedium;
     yourResults.resHardTime.Text = pv.timehard;
     yourResults.resExpertTime.Text = pv.timeexpert;
 }
コード例 #4
0
        void ChooseDifficultyPage_Loaded(object sender, RoutedEventArgs e)
        {
            PuzzleViewInfo pv = new PuzzleViewInfo(curPuzzle);

            yourResults.resEasyMoves.Text   = pv.moveseasy.ToString();
            yourResults.resMediumMoves.Text = pv.movesmedium.ToString();
            yourResults.resHardMoves.Text   = pv.moveshard.ToString();
            yourResults.resExpertMoves.Text = pv.movesexpert.ToString();
            yourResults.resEasyTime.Text    = pv.timeeasy;
            yourResults.resMediumTime.Text  = pv.timemedium;
            yourResults.resHardTime.Text    = pv.timehard;
            yourResults.resExpertTime.Text  = pv.timeexpert;
        }
コード例 #5
0
        //private void loaded()

        private void puzzlesListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            PuzzleViewInfo pv = (PuzzleViewInfo)puzzlesListBox.SelectedItem;

            if (pv != null && pv.opened)
            {
                string uriStr = "/ChooseDifficultyPage.xaml";
                if (puzzleAdapter != null)
                {
                    puzzleAdapter.selectedPuzzle = pv.id;
                }
                NavigationService.Navigate(new Uri(uriStr, UriKind.RelativeOrAbsolute));
            }
        }
コード例 #6
0
ファイル: ScoresPage.xaml.cs プロジェクト: xeppaka/mPuzzle-WP
 private void ScoresPage_Loaded(object sender, RoutedEventArgs e)
 {
     List<PuzzleViewInfo> puzzles = new List<PuzzleViewInfo>();
     PuzzleViewInfo pv;
     for (int i = 0; i < puzzleAdapter.puzzle.Length; ++i)
     {
         pv = new PuzzleViewInfo(puzzleAdapter.puzzle[i]);
         puzzles.Add(pv);
     }
     puzzlesListBox.ItemsSource = puzzles;
     nicknameDialog.username.KeyDown += new KeyEventHandler(username_KeyDown);
     nicknameDialog.buttonOk.Click += onNicknameOk;
     nicknameDialog.buttonCancel.Click += onNicknameCancel;
     syncErrorDialog.buttonOk.Click += onSyncErrorOk;
 }
コード例 #7
0
ファイル: ScoresPage.xaml.cs プロジェクト: xeppaka/mPuzzle-WP
        private void ScoresPage_Loaded(object sender, RoutedEventArgs e)
        {
            List <PuzzleViewInfo> puzzles = new List <PuzzleViewInfo>();
            PuzzleViewInfo        pv;

            for (int i = 0; i < puzzleAdapter.puzzle.Length; ++i)
            {
                pv = new PuzzleViewInfo(puzzleAdapter.puzzle[i]);
                puzzles.Add(pv);
            }
            puzzlesListBox.ItemsSource         = puzzles;
            nicknameDialog.username.KeyDown   += new KeyEventHandler(username_KeyDown);
            nicknameDialog.buttonOk.Click     += onNicknameOk;
            nicknameDialog.buttonCancel.Click += onNicknameCancel;
            syncErrorDialog.buttonOk.Click    += onSyncErrorOk;
        }
コード例 #8
0
ファイル: ScoresPage.xaml.cs プロジェクト: xeppaka/mPuzzle-WP
        private void _syncAllCallbackUI(bool requestOk, SyncAllResponse res)
        {
            puzzlesListBox.IsEnabled = true;
            buttonSyncAll.Click     += buttonSyncAll_Click;
            buttonSyncAll.Style      = (Style)Resources["ScoresSyncButtonStyle"];

            if (!requestOk)
            {
                Canvas.SetZIndex(syncErrorDialog, 3);
                syncErrorDialog.Visibility = Visibility.Visible;
                return;
            }

            int count = res.bestResults.Length;

            for (int i = 0; i < count; ++i)
            {
                PuzzleViewInfo curPVI    = (PuzzleViewInfo)puzzlesListBox.Items[i];
                Puzzle         curPuzzle = puzzleAdapter.puzzleDic[res.bestResults[i].puzzleid];
                curPuzzle.easyp          = res.bestResults[i].placeeasy;
                curPuzzle.mediump        = res.bestResults[i].placemedium;
                curPuzzle.hardp          = res.bestResults[i].placehard;
                curPuzzle.expertp        = res.bestResults[i].placeexpert;
                curPuzzle.moveseasyb     = res.bestResults[i].moveseasy;
                curPuzzle.movesmediumb   = res.bestResults[i].movesmedium;
                curPuzzle.moveshardb     = res.bestResults[i].moveshard;
                curPuzzle.movesexpertb   = res.bestResults[i].movesexpert;
                curPuzzle.timeeasyb      = res.bestResults[i].timeeasy;
                curPuzzle.timemediumb    = res.bestResults[i].timemedium;
                curPuzzle.timehardb      = res.bestResults[i].timehard;
                curPuzzle.timeexpertb    = res.bestResults[i].timeexpert;
                curPuzzle.userlisteasy   = res.bestResults[i].userlisteasy;
                curPuzzle.userlistmedium = res.bestResults[i].userlistmedium;
                curPuzzle.userlisthard   = res.bestResults[i].userlisthard;
                curPuzzle.userlistexpert = res.bestResults[i].userlistexpert;

                curPVI.update(curPuzzle);
            }
            puzzlesListBox.Visibility = Visibility.Visible;
            puzzleAdapter.saveScores();
        }