예제 #1
0
        private void StartMenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (_scheduler != null)
            {
                _scheduler.StopRendering();
                _scheduler.StopScheduling();
            }
            PathWindow wnd = new PathWindow(true);

            wnd.ShowDialog();
            WaveListBox.OwnedScrollViewer.HorizontalScrollBarVisibility =
                ScrollBarVisibility.Hidden;
            var factory = new RandomWidgetFactory();

            CreateTaskAndScheduler(factory, 1, 1);
            WaveListBox.ItemsSource = _listPool.RenderItems;
            ViewViewBox.DataContext = _viewPool;
            _scheduler.StartSchedulingAndRendering();
        }
예제 #2
0
        private void OpenMenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (_scheduler != null)
            {
                _scheduler.StopRendering();
                _scheduler.StopScheduling();
            }
            PathWindow pwnd = new PathWindow(false);

            pwnd.ShowDialog();
            DrawOptionWindow dwnd = new DrawOptionWindow();

            dwnd.ShowDialog();
            WaveListBox.OwnedScrollViewer.HorizontalScrollBarVisibility =
                ScrollBarVisibility.Visible;
            var factory = new FileWidgetFactory();

            CreateTaskAndScheduler(factory, dwnd.Channel, dwnd.N);
            WaveListBox.ItemsSource = _listPool.RenderItems;
            ViewViewBox.DataContext = null;
            _scheduler.StartSchedulingAndRendering();
        }