• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Windows.RoutedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



RoutedEventArgs类属于System.Windows命名空间,在下文中一共展示了RoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: btnCancelWorker_Click

 private void btnCancelWorker_Click(object sender, RoutedEventArgs e)
 {
     Trace("btnCancelWorker_Click");
     t.Abort();
     btnStartWorker.IsEnabled = true;
     btnCancelWorker.IsEnabled = false;
 }
开发者ID:KasperFlye,项目名称:CsharpAndDotNet,代码行数:7,代码来源:Window1.xaml.cs


示例2: button1_Click

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ++equationsCount;
            string xamlTextBox = XamlWriter.Save(t1);
            StringReader stringReader = new StringReader(xamlTextBox);
            XmlReader xmlReader = XmlReader.Create(stringReader);
            TextBox newTextBox = (TextBox)XamlReader.Load(xmlReader);
            newTextBox.Name = "t" + equationsCount.ToString();
            newTextBox.Text = "";
            newTextBox.LostFocus += textBox_LostFocus;
            newTextBox.Margin = new Thickness(0, 29*(equationsCount-1) + 4, 6, 0);

            grid2.Children.Add(newTextBox);

            string xamlLabel = XamlWriter.Save(label2);
            stringReader = new StringReader(xamlLabel);
            xmlReader = XmlReader.Create(stringReader);
            Label newLabel = (Label)XamlReader.Load(xmlReader);
            newLabel.Name = "label" + (equationsCount*2).ToString();
            newLabel.Content = equationsCount.ToString() +":";
            newLabel.Margin = new Thickness(6, 29 * (equationsCount-1) + 4, 0, 0);

            grid2.Children.Add(newLabel);

            varForEq.Add(new List<string>());
        }
开发者ID:osst,项目名称:University,代码行数:26,代码来源:MainWindow.xaml.cs


示例3: btnDelete_Click

        /// <summary>
        ///     Handles the Click event of the btnDelete control. Deletes all the specified Team Box Score, as well as any corresponding
        ///     Player Box Scores, from the database.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="RoutedEventArgs" /> instance containing the event data.
        /// </param>
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            var r =
                MessageBox.Show(
                    "Are you sure you want to delete this/these box score(s)?\n" + "This action cannot be undone.\n\n"
                    + "Any changes made to Team Stats by automatically adding this/these box score(s) to them won't be reverted by its deletion.",
                    "NBA Stats Tracker",
                    MessageBoxButton.YesNo);
            if (r == MessageBoxResult.Yes)
            {
                foreach (var bse in dgvBoxScores.SelectedItems.Cast<BoxScoreEntry>().ToList())
                {
                    if (bse != null)
                    {
                        var id = bse.BS.ID;

                        _db.Delete("GameResults", "GameID = " + id);
                        _db.Delete("PlayerResults", "GameID = " + id);
                    }

                    _bsHist.Remove(bse);
                    MainWindow.BSHist.Remove(bse);
                }
            }
        }
开发者ID:leftos,项目名称:nba-stats-tracker,代码行数:33,代码来源:BoxScoreListWindow.xaml.cs


示例4: LoginButtonClicked

        private async void LoginButtonClicked(object sender, RoutedEventArgs e)
        {
            Button buttonClicked = sender as Button;
            if (buttonClicked != null)
            {
                String testName = null;
                MobileServiceAuthenticationProvider provider =
                    MobileServiceAuthenticationProvider.MicrosoftAccount;

                if (buttonClicked.Name.Contains("MicrosoftAccount"))
                {
                    provider = MobileServiceAuthenticationProvider.MicrosoftAccount;
                    testName = "Microsoft Account Login";
                }
                else if (buttonClicked.Name.Contains("Facebook"))
                {
                    provider = MobileServiceAuthenticationProvider.Facebook;
                    testName = "Facebook Login";
                }
                else if (buttonClicked.Name.Contains("Twitter"))
                {
                    provider = MobileServiceAuthenticationProvider.Twitter;
                    testName = "Twitter Login";
                }
                else if (buttonClicked.Name.Contains("Google"))
                {
                    provider = MobileServiceAuthenticationProvider.Google;
                    testName = "Google Login";
                }

                bool useProviderStringOverload = UseProviderStringOverloadCheckBox.IsChecked.Value;

                TestResultsTextBlock.Text = await LoginTests.ExecuteTest(testName, () => LoginTests.TestLoginAsync(provider, useProviderStringOverload));
            }
        }
开发者ID:jlaanstra,项目名称:azure-mobile-services,代码行数:35,代码来源:MainPage.xaml.cs


示例5: btnVector_Click

        /// <summary>
        /// Tests for Vektor class
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnVector_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
            watch.Start();
            txtVector.Text = "Starting test suite for the Vektor class.\r\n\r\n";

            // Sample data
            List<Eksam.Vektor> vectors = new List<Vektor>{
                new Vektor(),
                new Vektor(1,1),
                new Vektor(0,1),
                new Vektor(2.2, 1.2),
                new Vektor(10,-4),
                null
            };

            // Go over all defined operations and input combinations
            foreach (Vektor vector in vectors)
            {
                foreach (Vektor secondVector in vectors)
                {
                    txtVector.Text += vector + " + " + secondVector + " = " + (vector + secondVector) + "\r\n";
                    txtVector.Text += vector + " - " + secondVector + " = " + (vector - secondVector) + "\r\n";
                    txtVector.Text += vector + " == " + secondVector + " ... " + (vector == secondVector) + "\r\n";
                    txtVector.Text += vector + vector + " (length " + (vector == null ? 0 : vector.Length()) + ") > " + secondVector + " (length " + (secondVector == null ? 0 : secondVector.Length()) + ")" + " ... " + (vector > secondVector) + "\r\n";
                    txtVector.Text += vector + vector + " (length " + (vector == null ? 0 : vector.Length()) + ") < " + secondVector + " (length " + (secondVector == null ? 0 : secondVector.Length()) + ")" + " ... " + (vector < secondVector) + "\r\n";
                }
            }

            watch.Stop();
            double elapsed = watch.ElapsedMilliseconds;
            txtVector.Text += "\r\nTest suite finished, time elapsed: " + elapsed + "ms.";
        }
开发者ID:anroots,项目名称:ITK-projects,代码行数:38,代码来源:MainWindow.xaml.cs


示例6: MainPage_Loaded

 // Load data for the ViewModel Items
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     if (!App.ViewModel.IsDataLoaded)
       {
     App.ViewModel.LoadData();
       }
 }
开发者ID:malagant,项目名称:7Things,代码行数:8,代码来源:MainPage.xaml.cs


示例7: _page_Unloaded

 /// <summary>
 /// Handles the Unloaded event of the _page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 void _page_Unloaded(object sender, RoutedEventArgs e)
 {
     _page.Loaded -= _page_Loaded;
     _page.Unloaded -= _page_Unloaded;
     
     App.Instance.ApplicationWindow.WindowBackgroundContent.Visibility = Visibility.Visible;
 }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:12,代码来源:InternalPlayerPageBehavior.cs


示例8: FolderStore_Click

        private void FolderStore_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog FolderDialog = new FolderBrowserDialog();
            FolderDialog.ShowDialog();

            FolderSave = FolderDialog.SelectedPath;
        }
开发者ID:JKord,项目名称:ArchiverRevolution,代码行数:7,代码来源:MainWindow.xaml.cs


示例9: Help_Click

 private void Help_Click(object sender, RoutedEventArgs e)
 {
     var help = new System.Diagnostics.Process();
     help.StartInfo.FileName = @"Archiver Revolution.chm";
     help.StartInfo.UseShellExecute = true;
     help.Start();
 }
开发者ID:JKord,项目名称:ArchiverRevolution,代码行数:7,代码来源:MainWindow.xaml.cs


示例10: StartClick

 private void StartClick(object sender, RoutedEventArgs e)
 {
     if (!_colorClient.IsConnected)
         _colorClient.Connect(ServerIp.Text, 4530);
     else
         _colorClient.Disconnect();
 }
开发者ID:latish,项目名称:Kinect_Demo,代码行数:7,代码来源:MainPage.xaml.cs


示例11: Button_OnClick

 private void Button_OnClick(object sender, RoutedEventArgs e)
 {
     if (_isSettingsOpen)
         CloseSettings();
     else
         OpenSettings();
 }
开发者ID:rwecho,项目名称:Windows-Phone-Samples,代码行数:7,代码来源:MainPage.xaml.cs


示例12: chkOwnsJournal_Click

 private void chkOwnsJournal_Click(object sender, RoutedEventArgs e)
 {
     if (chkOwnsJournal.IsChecked == true)
         embeddedFrame.JournalOwnership = JournalOwnership.OwnsJournal;
     else
         embeddedFrame.JournalOwnership = JournalOwnership.UsesParentJournal;
 }
开发者ID:ittray,项目名称:LocalDemo,代码行数:7,代码来源:EmbeddedPage.xaml.cs


示例13: button1_Click

 private void button1_Click(object sender, RoutedEventArgs e)
 {
     image1.Source = null;
     PhotoChooserTask objPhotoChooser = new PhotoChooserTask();
     objPhotoChooser.Completed += new EventHandler<PhotoResult>(PhotoChooseCall);
     objPhotoChooser.Show();
 }
开发者ID:aabrohi,项目名称:kinect-kollage,代码行数:7,代码来源:UploadPage.xaml.cs


示例14: btnButXPotion_Click

        //XPotion
        private void btnButXPotion_Click(object sender, RoutedEventArgs e)
        {
            Shield.Visibility = System.Windows.Visibility.Collapsed;
            HealthPotion.Visibility = System.Windows.Visibility.Collapsed;
            Xpotion.Visibility = System.Windows.Visibility.Visible;
            ManaPotion.Visibility = System.Windows.Visibility.Collapsed;
            HolyWater.Visibility = System.Windows.Visibility.Collapsed;
            Lightning.Visibility = System.Windows.Visibility.Collapsed;
            Drain.Visibility = System.Windows.Visibility.Collapsed;
            Fire.Visibility = System.Windows.Visibility.Collapsed;
            Ice.Visibility = System.Windows.Visibility.Collapsed;
            Heal.Visibility = System.Windows.Visibility.Collapsed;
            Quake.Visibility = System.Windows.Visibility.Collapsed;
            Scan.Visibility = System.Windows.Visibility.Collapsed;
            Dark.Visibility = System.Windows.Visibility.Collapsed;
            GunSlinger.Visibility = System.Windows.Visibility.Collapsed;
            Poison.Visibility = System.Windows.Visibility.Collapsed;
            Thunder.Visibility = System.Windows.Visibility.Collapsed;
            Inferno.Visibility = System.Windows.Visibility.Collapsed;
            Blizzard.Visibility = System.Windows.Visibility.Collapsed;
            CureAll.Visibility = System.Windows.Visibility.Collapsed;
            CounterAttack.Visibility = System.Windows.Visibility.Collapsed;
            Earth.Visibility = System.Windows.Visibility.Collapsed;
            FallenAngel.Visibility = System.Windows.Visibility.Collapsed;
            //Gives information about potion
            itemSelected = 2;
            canvasDescriptionOfItemAndToBuy.Visibility = System.Windows.Visibility.Visible;

            txtItemAndDescription.Text = "A Middle end remedy that will replenish 350 Health";
            txtPointsForItemToBuy.Text = "300";
        }
开发者ID:viivoices,项目名称:ViiVoies_Game,代码行数:32,代码来源:PetsHome.xaml.cs


示例15: ResolveKotusResults

        private void ResolveKotusResults(object sender, RoutedEventArgs e)
        {
            var resolveFromKotus = Module1.resolveFromKotus(textBox1.Text);
            textBlock1.Text = "";
            /*for (var i = 0; i < resolveFromKotus.Count(); i++)
            {
                textBlock1.Text += resolveFromKotus.ElementAt(i) + ", ";
                textBlock1.Text += i%8 == 0 ? "\n" : "";
            }*/
            int ui = 0;

            var splits = from name in resolveFromKotus
                         group name by ui++ < 8 into part
                         select part.AsEnumerable().Aggregate(((x, y) => x + ", " + y));
            var f = resolveFromKotus.Where((x, i) => i % 8 == 0).Select((x, i) => resolveFromKotus.Skip(i * 8).Take(8));
            var joined = f.Select(chunk => chunk.Aggregate(((x, y) => x + ", " + y)));
            foreach (var result in joined)
            {
                textBlock1.Text += result + "\n";
            }

            // from x in resolveFromKotus
            /*while(resolveFromKotus.Any())
            {
                var enumerable = resolveFromKotus.Take(5);
                textBlock1.Text += enumerable.Aggregate((x, y) => x + ", " + y);
                resolveFromKotus.Skip(5);
            }
             */
        }
开发者ID:ramik,项目名称:KotusSolver,代码行数:30,代码来源:MainWindow.xaml.cs


示例16: btn_Delete_Click_1

 private void btn_Delete_Click_1(object sender, RoutedEventArgs e)
 {
     if (grd_Behaviour.SelectedItem != null)
     {
         behaviour = (Behaviour)grd_Behaviour.SelectedItem;
         MessageBoxResult result = MessageBox.Show("هل انت متأكد من حذف " + behaviour.Name, "حذف النشاط", MessageBoxButton.YesNo, MessageBoxImage.Question);
         if (result == MessageBoxResult.Yes)
         {
             behaviourDomain.Delete(behaviour);
             if (behaviourDomain.ActionState.Status == Common.Enums.ActionStatusEnum.NoError)
             {
                 MessageBox.Show("تم الحذف بنجاح", "حذف النشاط", MessageBoxButton.OK, MessageBoxImage.Information);
                 behaviourList.Remove(behaviour);
                 grd_Behaviour.ItemsSource = null;
                 grd_Behaviour.ItemsSource = behaviourList;
                 Clear();
             }
             else
             {
                 MessageBox.Show(behaviourDomain.ActionState.Result, "حذف النشاط", MessageBoxButton.OK, MessageBoxImage.Error);
                 Clear();
             }
         }
     }
 }
开发者ID:sharmeran,项目名称:FinancialKSAProject,代码行数:25,代码来源:BehaviorView.xaml.cs


示例17: RadioButton_Checked

        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            var button = sender as RadioButton;

            if (button.Content.ToString().Contains("Windows"))
            {
                this.lineEndings = LineEndingsChanger.LineEndings.Windows;
            }
            else if (button.Content.ToString().Contains("Linux"))
            {
                this.lineEndings = LineEndingsChanger.LineEndings.Linux;
            }
            else if (button.Content.ToString().Contains("Macintosh"))
            {
                this.lineEndings = LineEndingsChanger.LineEndings.Macintosh;
            }
            else if (button.Content.ToString().Contains("Dominant"))
            {
                this.lineEndings = LineEndingsChanger.LineEndings.Dominant;
            }
            else
            {
                this.lineEndings = LineEndingsChanger.LineEndings.None;
            }
        }
开发者ID:jakubbielawa,项目名称:LineEndingsUnifier,代码行数:25,代码来源:LineEndingChoice.xaml.cs


示例18: Window_Loaded_1

        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            CollectionViewSource modelTypesViewSource = (CollectionViewSource)this.Resources["modelTypesCollectionViewSource"];
            modelTypesViewSource.Source = ViewModel.ModelTypeCollection;

            ModelBox.SelectedIndex = -1;
        }
开发者ID:suhasj,项目名称:MyScaffolder.ModelScaffolder,代码行数:7,代码来源:DisplayMenu.xaml.cs


示例19: webBrowser1_Loaded

 private void webBrowser1_Loaded(object sender, RoutedEventArgs e)
 {
     //string site = "http://www.allyou.com/diet-fitness/at-home-workouts/lose-weight-00400000048774/page2.html";
     string site = "http://m.youtube.com/watch?v=whmUeG0saAM&fulldescription=1";
     //string site = "http://www.exercise.com/exercise/run-in-place";
     //webBrowser1.Navigate(new Uri(site, UriKind.Absolute));
 }
开发者ID:HackerChick,项目名称:MoveIt,代码行数:7,代码来源:ExerciseView.xaml.cs


示例20: DocumentContentLoaded

 private void DocumentContentLoaded(object sender, RoutedEventArgs e)
 {
     dynamic dataContext = DataContext;
     dataContext.Console = TxtConsole;
     dataContext.CommandText = TxtUserCommand;
     TxtUserCommand.Focus();
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:7,代码来源:DsfAdminWindow.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Windows.Setter类代码示例发布时间:2022-05-26
下一篇:
C# Windows.RoutedEvent类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap