当前位置: 首页>>代码示例>>C#>>正文


C# RoutedEventArgs.ToString方法代码示例

本文整理汇总了C#中System.Windows.RoutedEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# RoutedEventArgs.ToString方法的具体用法?C# RoutedEventArgs.ToString怎么用?C# RoutedEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.RoutedEventArgs的用法示例。


在下文中一共展示了RoutedEventArgs.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MainPage_Unloaded

        void MainPage_Unloaded(object sender, RoutedEventArgs e)
        {
            // If the app is running outside of the debugger then report the exception using a ChildWindow control.
            if (!System.Diagnostics.Debugger.IsAttached)
            {
                // NOTE: This will allow the application to continue running after an exception has been thrown but not handled.
                // For production applications this error handling should be replaced with something that will report the error to the website and stop the application.

                ErrorWindow.CreateNew(e.ToString());
            }
        }
开发者ID:densem-2013,项目名称:RssWCF,代码行数:11,代码来源:MainPage.xaml.cs

示例2: createNewGame

 private void createNewGame(object sender, RoutedEventArgs e)
 {
     log.Debug("createNewGame(object: "+ sender.ToString() + " RoutedEventArgs: " +e.ToString() + ") - Begin");
     hideStacksPot();
     Btn4.Visibility = Visibility.Hidden;
     Mitte.Visibility = Visibility.Hidden;
     SVIWinner.Visibility = Visibility.Hidden;
     //Hide Startbtn
     if (Grid.Children.Contains(btn))
     {
         Grid.Children.Remove(btn);
     }
     addplayerscatteru.Visibility = Visibility.Hidden;
     playerName.Text = "";
     hideUI();
     hideActionButton();
     round = 0;
     personalStack = 0;
     showCardDelay = 1500;
     canAddPlayer = true;
     canChangeStack = true;
     EMIchangeStack.IsEnabled = true;
     //if no stack value is given set default
     if (stack == 0)
     {
         stack = 1000;
     }
     mainPot.Text = "Touch Grey Area To Create A New Player!             Player Stacks: " + stack.ToString() + "\n";
     players = new List<Player>();
     gl = null;
     EMIcancelRound.IsEnabled = false;
     log.Debug("createNewGame() - End");
     e.Handled = true;
 }
开发者ID:B3J4y,项目名称:Poker,代码行数:34,代码来源:MainWindow.xaml.cs

示例3: setStack

        /// <summary>
        /// change player stacks, updates stacks from all existing players 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void setStack(object sender, RoutedEventArgs e)
        {
            log.Debug("setStack(object " + sender.ToString() + " RoutedEventArgs " + e.ToString() + ") - Begin");
            if (canChangeStack)
            {
                ElementMenuItem emi = sender as ElementMenuItem;
                string t = emi.Header.ToString();
                stack = (Int32)Convert.ToInt32(emi.Header.ToString().Split(' ')[1]);
                mainPot.Text = "Player Stacks: " + stack.ToString() + "\n";
                if (players.Exists(x => x.stack != stack))
                {
                    foreach (Player p in players) {
                        p.stack = stack;                    
                    }

                }
            }
            log.Debug("setStack() - End");
            e.Handled = true;
        }
开发者ID:B3J4y,项目名称:Poker,代码行数:25,代码来源:MainWindow.xaml.cs

示例4: resetPersonalStack

 /// <summary>
 /// set personal stack to 0, undo bet in bet area
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void resetPersonalStack(object sender, RoutedEventArgs e)
 {
     log.Debug("resetPersonalStack(object " + sender.ToString() + " RoutedEventArgs " + e.ToString() + ") - Begin");
     personalStack = 0;
     oneChipCall = true;
     checkCash(kvp.Key.position);
     setActionButtonText();
     log.Debug("resetPersonalStack() - End");
     e.Handled = true;
 }
开发者ID:B3J4y,项目名称:Poker,代码行数:15,代码来源:MainWindow.xaml.cs

示例5: Button_Click

 private void Button_Click(object sender, RoutedEventArgs e)
 {
     string s = null;
     s.Trim();
     MessageBox.Show("You click me at " + e.ToString());
 }
开发者ID:jgkim999,项目名称:WpfExample,代码行数:6,代码来源:MainWindow.xaml.cs

示例6: SearchPanel_SearchInitiated

 private void SearchPanel_SearchInitiated(object sender, RoutedEventArgs e)
 {
     MessageBox.Show("Search Initiated Handled At Search Panel ... " + e.ToString());
 }
开发者ID:nadeemajl,项目名称:wpftraining,代码行数:4,代码来源:MainWindow.xaml.cs

示例7: actionButtonClicked

        /// <summary>
        /// catches event when action button is clicked. eg: call 100, fold
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void actionButtonClicked(object sender, RoutedEventArgs e)
        {
            log.Debug("actionButtonClicked(object: " + sender.ToString() + " , RoutedEventsArgs: " + e.ToString() + ") - Begin");
            Button s = (Button)sender;
            switch (s.Content.ToString().Split(' ')[0])
            {
                case "fold":
                    gl.activeAction(Action.playerAction.fold, 0);
                    foldCards(kvp.Key.position);
                    playSound("karte_ablegen");
                    break;
                case "check":
                    gl.activeAction(Action.playerAction.check, 0);
                    playSound("knock2");
                    break;
                case "call":
                    gl.activeAction(Action.playerAction.call, (Int32)Convert.ToInt32(s.Content.ToString().Split(' ')[1]));
                    playSound("einsatz");
                    break;
                case "bet":
                    gl.activeAction(Action.playerAction.bet, (Int32)Convert.ToInt32(s.Content.ToString().Split(' ')[1]));
                    playSound("einsatz");
                    break;
                case "raise":
                    gl.activeAction(Action.playerAction.raise, (Int32)Convert.ToInt32(s.Content.ToString().Split(' ')[1]));
                    playSound("einsatz3");
                    break;
            }
            hideActionButton();
            hideChips();
            updateBalance();
            await UInextPlayer();

            log.Debug("actionButtonClicked() - End");
        }
开发者ID:B3J4y,项目名称:Poker,代码行数:40,代码来源:MainWindow.xaml.cs

示例8: closeWindow

 /// <summary>
 /// Hides the sender Window, sender has to be a Button in StackPanel, ScatterViewItem
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void closeWindow(object sender, RoutedEventArgs e)
 {
     log.Debug("closeWindow(object: " + sender.ToString() + " RoutedEventArgs: " + e.ToString() + ") - Begin");
     Button s = sender as Button;
     StackPanel stackPanel = s.Parent as StackPanel;
     if (stackPanel == null)
     {
         DockPanel dockPanel = s.Parent as DockPanel;
         stackPanel = dockPanel.Parent as StackPanel;
     }
     ScatterViewItem SVI = stackPanel.Parent as ScatterViewItem;
     log.Debug("closing " + SVI.Name);
     if (SVI.Name == "addplayerscatteru")
     {
         //clean up
         SurfaceTextBox text = (SurfaceTextBox)stackPanel.FindName("playerName");
         text.Text = "";
         Label l = this.FindName("LabelAddPlayer") as Label;
         l.Foreground = Brushes.White;
         l.Content = "Add New Player";
     }
     SVI.Visibility = Visibility.Hidden;
     log.Debug("closeWindow() - End");
     e.Handled = true;
 }
开发者ID:B3J4y,项目名称:Poker,代码行数:30,代码来源:MainWindow.xaml.cs

示例9: OnMediaElementDownloadProgressChanged

        /// <summary>
        /// Event handler for the download progress event from the media element.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Event args.</param>
        void OnMediaElementDownloadProgressChanged(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("OnMediaElementDownloadProgressChanged:" + e.ToString());

            m_downloadProgressNeedsUpdating = true;
        }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:11,代码来源:MediaPlayer.cs

示例10: OnMediaElementCurrentStateChanged

        /// <summary>
        /// Event handler for the media element state changed event.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Event args.</param>
        void OnMediaElementCurrentStateChanged(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("OnMediaElementCurrentStateChanged:" + e.ToString() + " NewState:" + m_mediaElement.CurrentState.ToString());

            MediaElementState currentState = m_mediaElement.CurrentState;
            switch (currentState)
            {
                case MediaElementState.Playing:
                case MediaElementState.Opening:
                case MediaElementState.Buffering:
                case MediaElementState.AcquiringLicense:
                    {
                        m_elementPlay.Visibility = Visibility.Collapsed;
                        m_elementPause.Visibility = Visibility.Visible;
                        break;
                    }

                case MediaElementState.Paused:
                case MediaElementState.Stopped:
                case MediaElementState.Closed:
                    {
                        m_elementPlay.Visibility = Visibility.Visible;
                        m_elementPause.Visibility = Visibility.Collapsed;
                        break;
                    }

                default:
                    break;
            }

            UpdateBufferingControls();

            if (StateChanged != null)
            {
                StateChanged(sender, e);
            }
        }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:42,代码来源:MediaPlayer.cs

示例11: click_showKeyRow

        //计算关键层和竖三带
        private void click_showKeyRow(object sender, RoutedEventArgs e)
        {
            //先撤销之前的变色
            foreach (KeyLayerParams nbr in keyLayers)
            {
                layers[nbr.ycbh - 1].IsKeyLayer = false;
            }

            //当前关键层变色显示
            int[] biaoHaoList = null;
            double[] pjxsList = null;
            bool isOk = getKeyLayer(ref biaoHaoList, ref pjxsList);

            if(!isOk)
            {
                return;
            }
            else if (biaoHaoList == null || pjxsList == null)
            {
                MessageBox.Show("未计算出关键层,请检查数据合理性");
                return;
            }

            keyLayers.Clear();
            int count = biaoHaoList.Length;
            for (int i = 0; i < count; i++)
            {
                KeyLayerParams layer = new KeyLayerParams(this);
                layer.ycbh = biaoHaoList[i];
                layer.fypjxs = pjxsList[i];

                layer.ycsd = layers[biaoHaoList[i] - 1].LeiJiShenDu;
                layer.mcms = layers[biaoHaoList[i] - 1].JuLiMeiShenDu;
                layer.fypjxsxz = layer.fypjxs * pjxsxz;
                keyLayers.Add(layer);

                layers[biaoHaoList[i] - 1].IsKeyLayer = true;
            }

            //竖三带计算
            try
            {
                var array1 = (MWNumericArray)logic.calHm(FuYanXCL, CaiGao, SuiZhangXS, Mcqj);
                double maoLuoDai = array1.ToScalarDouble();
                maoLuoDaiTb.Text = maoLuoDai.ToString("f3");
                var array2 = (MWNumericArray)logic.calHl(CaiGao, 1);
                double lieXiDai = array2.ToScalarDouble();
                lieXiDaiTb.Text = lieXiDai.ToString("f3");

                bool bWanquDai = false;
                for (int i = keyLayers.Count; i > 0; i--)
                {
                    if (keyLayers[i - 1].ycsd > lieXiDai)
                    {
                        continue;
                    }
                    bWanquDai = true;
                    wanQuDaiIndex = i - 1;
                    double wanquDai = keyLayers[i - 1].ycsd;
                    wanQuDaiTb.Text = wanquDai.ToString("f3");
                    break;
                }
                if(!bWanquDai)
                {
                    MessageBox.Show("没有找到弯曲带,请检查数据合理性");
                }
            }
            catch (Exception)
            {
                e.ToString();
                MessageBox.Show("竖三带计算出错,请检查数据合理性");
            }
        }
开发者ID:meikeyuan,项目名称:main,代码行数:74,代码来源:Document.gridinput.cs

示例12: btnOpenDocFolder_Click_1

 private void btnOpenDocFolder_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
     string hi = e.ToString();
     lblLabel.Content = hi;
     }
     catch (Exception ex)
     {
     lblLabel.Content = ex.Message;
     throw;
     }
 }
开发者ID:icatchx22i,项目名称:DevBuddy,代码行数:13,代码来源:MainWindow.xaml.cs

示例13: onClickAddAppointment

        private void onClickAddAppointment(object sender, RoutedEventArgs e)
        {
            appointment = AppointmentFacade.CreateAppointment();

            try
            {
                appointment.Name = txtboxNavn.Text;
                appointment.Description = txtboxBeskrivelse.Text;

                TimeSpan tidspunkt;
                TimeSpan.TryParse(txtboxTidspunkt.Text, out tidspunkt);

                if (dpStartDate.SelectedDate != null)
                {
                    appointment.StartDate = dpStartDate.SelectedDate.Value.Add(tidspunkt);
                }
                else
                {
                    appointment.StartDate = DateTime.Now;
                }

                int freq;
                int.TryParse(txtboHyppighed.Text, out freq);
                appointment.Frequency = freq;

                double price;
                double.TryParse(txtboxPris.Text, out price);
                appointment.Price = price;

                appointment.City = txtboxBy.Text;
                appointment.ZipCode = txtboxPostnr.Text;
                appointment.Address = txtboxAddresse.Text;

                //appointments.Add(appointment);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                MessageBox.Show("Fejl! " + e.ToString());
            }

            Close();
        }
开发者ID:Klockz,项目名称:NBservicesprint4,代码行数:43,代码来源:AddAppointmentDialog.xaml.cs

示例14: XAppWebView_Unloaded

 private void XAppWebView_Unloaded(object sender, RoutedEventArgs e)
 {
     XLog.WriteInfo("XAppWebView_Unloaded :: " + e.ToString());
 }
开发者ID:polyvi,项目名称:xface-wp8,代码行数:4,代码来源:XWebApplication.cs

示例15: Window_SearchInitiated

 private void Window_SearchInitiated(object sender, RoutedEventArgs e)
 {
     MessageBox.Show("Search Initiated Handled At Window ... " + e.ToString());
 }
开发者ID:nadeemajl,项目名称:wpftraining,代码行数:4,代码来源:MainWindow.xaml.cs


注:本文中的System.Windows.RoutedEventArgs.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。