コード例 #1
0
 private void TextMessageRecieved(VirusPlayer player, string text)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += player.Name + ":\n" + text + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
コード例 #2
0
 private void PlayerConnected(VirusPlayer player)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " connected with color " + player.Color.Name + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
コード例 #3
0
 void BadMessage(string text)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += text + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
コード例 #4
0
        private async Task LoadCurrent()
        {
            if (!IsLoading)
            {
                IsLoading = true;
                _tempIndexOfNumberChapterInPage = await _truyen.LoadChapterWithNoiDung(CurrentChapter.PageOfChapter, _tempIndexOfNumberChapterInPage);

                CacheNextChapter = _truyen.GetChapterByIndex(_tempIndexOfNumberChapterInPage);
                if (CacheNextChapter != null)
                {
                    CurrentChapter = CacheNextChapter;
                    if (TextScrollViewer != null)
                    {
                        TextScrollViewer.ChangeView(0, 0, null, true);
                    }
                    _tempIndexOfNumberChapterInPage = _currentIndexOfNumberChapter;
                }
                else
                {
                    if (_truyen.Site != SiteTruyen.LuongSonBac)
                    {
                        if (_tempIndexOfNumberChapterInPage <= 0)
                        {
                            _tempIndexOfNumberChapterInPage = 1;
                        }
                        if (_tempIndexOfNumberChapterInPage > 0)
                        {
                            _tempIndexOfNumberChapterInPage -= 1;
                        }
                    }
                    _dialogService.ShowS("K0 tìm thấy chương sau đó", "Lỗi");
                }
                IsLoading = false;
            }
        }
コード例 #5
0
 private void PlayerDisconnected(VirusPlayer player)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " disconnected\n";
         TextScrollViewer.ScrollToBottom();
         EndGame();
     });
 }
コード例 #6
0
 private void ColorUpdated(VirusPlayer player, System.Drawing.Color orig)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " changed color to " + player.Color.Name + "\n";
         TextScrollViewer.ScrollToBottom();
         viruscontrol.Refresh();
     });
 }
コード例 #7
0
 private void NameUpdated(VirusPlayer player, string orig)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + orig + " changed name to " + player.Name + "\n";
         viruscontrol.Refresh();
         TextScrollViewer.ScrollToBottom();
     });
 }
コード例 #8
0
ファイル: MainPage.xaml.cs プロジェクト: ahmed605/Quick-Pad
 public void ViewModel_SetScale(float scale)
 {
     TextScrollViewer.ChangeView(0.0, 0.0, ViewModel.ScaleValue);
 }