コード例 #1
0
        private void charactersGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (charactersGrid.SelectedIndex == -1)
            {
                return;
            }

            Logic.Client = (PwClient)charactersGrid.SelectedItem;
            Logic.Client.UnfreezePermanent();

            if (catsWalkingRb.IsChecked.Value)
            {
                CatsWalking.Start();
            }
            else if (chatAdsRb.IsChecked.Value)
            {
                ChatAdvertising.Start();
            }

            var timer = new DispatcherTimer();

            timer.Tick    += updateInfo_Click;
            timer.Interval = TimeSpan.FromSeconds(3);
            timer.Start();
        }
コード例 #2
0
 private void stop_Click(object sender, RoutedEventArgs e)
 {
     if (catsWalkingRb.IsChecked.Value)
     {
         CatsWalking.Stop();
     }
     else if (chatAdsRb.IsChecked.Value)
     {
         ChatAdvertising.Stop();
     }
 }
コード例 #3
0
        private void itemsGrid_SelectedCellsChanged(object sender, object e)
        {
            if (catsItemsGrid.SelectedItem == null)
            {
                return;
            }

            sellersGrid.ItemsSource = new string[0];
            buyersGrid.ItemsSource  = new string[0];
            sellersGrid.ItemsSource = CatsWalking.GetSellers(((ItemInfo)catsItemsGrid.SelectedItem).Id);
            buyersGrid.ItemsSource  = CatsWalking.GetBuyers(((ItemInfo)catsItemsGrid.SelectedItem).Id);
        }
コード例 #4
0
        private void buyersGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (buyersGrid.SelectedItem == null)
            {
                return;
            }

            CatsWalking.Suspend();
            int id = ((Catshop)buyersGrid.SelectedItem).Id;

            Logic.Client.Additional.DoSelect((uint)id);
            Logic.Client.ActionStructs.TalkNpc((uint)id);
        }