コード例 #1
0
        private void StartSimulation()
        {
            _sheetController.DeselectAll();

            try
            {
                if (simulation == null)
                {
                    var block      = _sheetController.State.ContentBlock;
                    var serializer = new Simulation.Serializer();
                    var solution   = serializer.Serialize(block);

                    simulation = new Simulation.Simulation(solution, 100);
                    simulation.Start(new WpfUpdate());

                    var window = new Window()
                    {
                        Title  = "Tags",
                        Width  = 300,
                        Height = 500,
                        WindowStartupLocation = WindowStartupLocation.CenterScreen
                    };

                    window.Owner       = this;
                    window.Content     = new TagsControl();
                    window.DataContext = solution.Tags;
                    window.Show();
                }
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
                Debug.Print(ex.StackTrace);
            }
        }
コード例 #2
0
ファイル: SheetWindow.xaml.cs プロジェクト: nagyistge/Sheet
 private void EditDeselectAll_Click(object sender, RoutedEventArgs e)
 {
     _sheetController.DeselectAll();
 }