Exemple #1
0
        public void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            timer = new HRTimer.HiResTimer();
            timer.Start();
            button1.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            gtefiles.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            Createxmlbutton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            Logresults.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));

            Console.Write("\n\nTOTAL TIME TAKEN : " + timer.ElapsedMicroseconds);
        }
        public MainWindow()
        {
            InitializeComponent();
            this.Show();
            timer = new HRTimer.HiResTimer();
            timer.Start();
            button1.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            gtefiles.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            Createxmlbutton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            Logresults.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));

            // Dispatcher.BeginInvoke(button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)));
        }