Exemple #1
0
 private void ChartWindow_Closed(object sender, EventArgs e)
 {
     this.Dispatcher.Invoke(DispatcherPriority.Background, (ThreadStart) delegate
     {
         chartWindow = null;
     });
 }
Exemple #2
0
        private void OpenChartHistory()
        {
            this.Dispatcher.Invoke(DispatcherPriority.Background, (ThreadStart) delegate
            {
                if (chartWindow == null)
                {
                    chartWindow       = new ChartLendingWindow(selectedCurrency);
                    chartWindow.Owner = MainWindow;

                    chartWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                    chartWindow.Width  = MainWindow.Width / 1.2;
                    chartWindow.Height = MainWindow.Height / 1.2;

                    chartWindow.Show();
                    chartWindow.Closed += ChartWindow_Closed;
                }
            });
        }