Beispiel #1
0
        public void Initialize(_Worksheet worksheet)
        {
            var s = new Animation();

            s.Start(close =>
            {
                Task.Factory.StartNew(() =>
                {
                    try
                    {
                        _takeoff = new Takeoff();
                        _takeoff.Initialize(worksheet);
                        if (Application.Current == null)
                        {
                            new Application();
                        }
                        Application.Current.Dispatcher.Invoke(() =>
                        {
                            _productsView = new ProductsView(ref _takeoff);
                        });


                        close();
                    }
                    catch (Exception e)
                    {
                        MessageBox.Show(e.Message);
                    }
                });
            });

            _productsView.Closing += _productsView_Closing;
        }
Beispiel #2
0
 public void Initialize(Takeoff takeoff)
 {
     _takeoff               = takeoff;
     _productsView          = new ProductsView(ref takeoff);
     _productsView.Closing += _productsView_Closing;
 }