コード例 #1
0
        private async void plusOneButton_Tapped(object sender, TappedRoutedEventArgs e)
        {
            int result = await PostManagement.PlusOne(post.postID, !post.isPlusonedByViewer);

            if (result == 0)
            {
                post.isPlusonedByViewer = !post.isPlusonedByViewer;
                //plusOneButton.IsPressed = !plusOneButton.IsPressed;
            }
        }
コード例 #2
0
ファイル: ItemPage.xaml.cs プロジェクト: borewicz/gplus
        private async void AppBarToggleButton_Unchecked(object sender, RoutedEventArgs e)
        {
            int result = await PostManagement.PlusOne(post.postID, !post.isPlusonedByViewer);

            if (result == 0)
            {
                post.isPlusonedByViewer = false;
            }
            else
            {
                //tu error
                (sender as AppBarToggleButton).IsChecked = true;
            }
        }