private void ShowintTouchline_Click() { if (SelectedItem != null) { MarketWatch mainwindow = System.Windows.Application.Current.Windows.OfType <MarketWatch>().FirstOrDefault(); if (mainwindow != null) { if (mainwindow.WindowState == WindowState.Minimized) { mainwindow.WindowState = WindowState.Normal; } mainwindow.Focus(); mainwindow.Show(); } else { mainwindow = new MarketWatch(); mainwindow.Owner = System.Windows.Application.Current.MainWindow; mainwindow.dataGridView1.Sorting += new DataGridSortingEventHandler(MarketWatchVM.DataGrid_Sorting); mainwindow.dataGridView1.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(MarketWatchVM.DataGrid_PreviewPageUpDown); mainwindow.dataGridView1.AddHandler(ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(MarketWatchVM.DataGrid_ScrollChanged)); mainwindow.Show(); } MarketWatchVM.OpenMarketFromIndexWindow(SelectedItem.IndexCode); } else { MessageBox.Show("Indice is not selected to show in touchline", "!Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public static void Listener_OITick() { try { if (OIMemory.SubscribeOIMemoryDict.Count > 0 && Globals.IsOiWindowOPen == true) { objOIBroadcastProcessor_OnBroadCastRecievedNew(); //HandlingInCaseOfCurrency(); MarketWatchVM.UPdateOI(OpenInterestVM.ObjOpenInterstCollection); } } catch (Exception ex) { Console.WriteLine(ex); } finally { } }