public NetPositionCWSWDetailsVM() { if (UMSProcessor.OnTradeCWSWReceived == null) { UMSProcessor.OnTradeCWSWReceived += UpdateHeader; } NetPositionCWSWDataCollectionWindow = new ObservableCollection <CWSWDetailPositionModel>(); NetPositionCWSWDataCollectionWindow = NetPositionMemory.NetPositionCWSWDataCollection; NetPositionClientWiseVM.onClientDoubleClickEventHandler += UpdateGridByClient; UMSProcessor.OnTradeCWSWOnlineReceived += UpdateGridByClientOnline; selectEntireRowList = new List <CWSWDetailPositionModel>(); NetPositionClientWiseScripWiseDetail = "Net Position Details"; //TODO: Uncomment Windows Position CWSWVM - Gaurav 03/11/2017 if (CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict.ContainsKey("WindowsPosition")) { CommonFrontEnd.Model.BoltAppSettingsWindowsPosition oBoltAppSettingsWindowsPosition = new Model.BoltAppSettingsWindowsPosition(); oBoltAppSettingsWindowsPosition = (CommonFrontEnd.Model.BoltAppSettingsWindowsPosition)CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict["WindowsPosition"]; if (oBoltAppSettingsWindowsPosition != null && oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS != null && oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS.WNDPOSITION != null) { Height = oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS.WNDPOSITION.Down.ToString(); TopPosition = oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS.WNDPOSITION.Top.ToString(); LeftPosition = oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS.WNDPOSITION.Left.ToString(); Width = oBoltAppSettingsWindowsPosition.NETPOSITIONCLIENTWISEDETAILS.WNDPOSITION.Right.ToString(); } } isAvgBuyRateString2decimalVisible = Visibility.Visible.ToString(); isAvgBuyRateString4decimalVisible = Visibility.Hidden.ToString(); isAvgSellRateString2decimalVisible = Visibility.Visible.ToString(); isAvgSellRateString4decimalVisible = Visibility.Hidden.ToString(); }
public NetPositionScripWiseVM() { if (Processor.UMSProcessor.OnTradeSWReceived == null) { Processor.UMSProcessor.OnTradeSWReceived += UpdateHeader; } //NetPositionSWDataCollection = new ObservableCollection<ScripWisePositionModel>(); NetPositionSWDataCollectionWindow = new ObservableCollection <ScripWisePositionModel>(); NetPositionSWDataCollectionWindow = NetPositionMemory.NetPositionSWDataCollection; UpdateHeader(); //TODO: Uncomment Windows Position ScripWiseVM - Gaurav 03/11/2017 if (CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict.ContainsKey("WindowsPosition")) { CommonFrontEnd.Model.BoltAppSettingsWindowsPosition oBoltAppSettingsWindowsPosition = new Model.BoltAppSettingsWindowsPosition(); oBoltAppSettingsWindowsPosition = (CommonFrontEnd.Model.BoltAppSettingsWindowsPosition)CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict["WindowsPosition"]; if (oBoltAppSettingsWindowsPosition != null && oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE != null && oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE.WNDPOSITION != null) { Height = oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE.WNDPOSITION.Down.ToString(); TopPosition = oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE.WNDPOSITION.Top.ToString(); LeftPosition = oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE.WNDPOSITION.Left.ToString(); Width = oBoltAppSettingsWindowsPosition.NETPOSITIONSCRIPWISE.WNDPOSITION.Right.ToString(); } } NetPositionScripWise oNetPositionScripWise = System.Windows.Application.Current.Windows.OfType <NetPositionScripWise>().FirstOrDefault(); //oNetPositionScripWise selectEntireRowList = new List <ScripWisePositionModel>(); isAvgBuyRateString2decimalVisible = Visibility.Visible.ToString(); isAvgBuyRateString4decimalVisible = Visibility.Hidden.ToString(); isAvgSellRateString2decimalVisible = Visibility.Visible.ToString(); isAvgSellRateString4decimalVisible = Visibility.Hidden.ToString(); }
//public RelayCommand<EventArgs> ScrollCommand //{ // get { return scrollCommand ?? (scrollCommand = new RelayCommand<EventArgs>(OnScrollChangedEvent)); } // set { scrollCommand = value; } //} //private void OnScrollChangedEvent(object e) //{ // TradeViewDataCollection.Clear(); // ScrollChangedEventArgs scrollChangedEventArgs = e as ScrollChangedEventArgs; // if (scrollChangedEventArgs != null) // { // //objListOfVisibleRecords = new ConcurrentBag<int>(); // if (NetPositionMemory.TraderTradeDataCollection != null && NetPositionMemory.TraderTradeDataCollection.Count > 0) // { // int firstIndex = (int)scrollChangedEventArgs.VerticalOffset; // int lastIndex = Math.Min(NetPositionMemory.TraderTradeDataCollection.Count - 1, (int)(scrollChangedEventArgs.VerticalOffset + scrollChangedEventArgs.ViewportHeight)); // ParallelOptions parallelOptions = new ParallelOptions // { // MaxDegreeOfParallelism = 1 // }; // Parallel.ForEach(NetPositionMemory.TraderTradeDataCollection, parallelOptions, item => // { // if (item != null) // { // int index = NetPositionMemory.TraderTradeDataCollection.IndexOf(item); // if (index <= firstIndex && index >= lastIndex) // { // TradeViewDataCollection.Add(item); // } // } // } // ); // NotifyStaticPropertyChanged("TradeViewDataCollection"); // } // } //} public AdminTradeViewVM() { try { //TODO: Uncomment Windows Position Saudas - Gaurav 03/11/2017 if (CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict.ContainsKey("WindowsPosition")) { CommonFrontEnd.Model.BoltAppSettingsWindowsPosition oBoltAppSettingsWindowsPosition = new Model.BoltAppSettingsWindowsPosition(); oBoltAppSettingsWindowsPosition = (CommonFrontEnd.Model.BoltAppSettingsWindowsPosition)CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict["WindowsPosition"]; if (oBoltAppSettingsWindowsPosition != null && oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW != null && oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW.WNDPOSITION != null) { Height = oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW.WNDPOSITION.Down.ToString(); TopPosition = oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW.WNDPOSITION.Top.ToString(); LeftPosition = oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW.WNDPOSITION.Left.ToString(); Width = oBoltAppSettingsWindowsPosition.ADMINTRADEVIEW.WNDPOSITION.Right.ToString(); } } TradeViewDataCollection = new ObservableCollection <TradeUMS>(); TradeViewDataCollectionCopy = new ObservableCollection <SaudasUMSModel>(); TradeViewDataCollection = NetPositionMemory.TraderTradeDataCollection; MemoryManager.OnTradeUMSRecieved += ReceiveUmsData; objBrushConvertor = new BrushConverter(); ToggleDisplay(); } catch (Exception ex) { throw ex; } ColourProfilingVM.OnColorSettingChange += SetColor; SetColor(); #region Commented //MemoryManager.NetPositionScripsDict = new ConcurrentDictionary<string, object>(); //SaudasUMSModel td = new SaudasUMSModel(); //td.PartitionID = 1; //Messenger.Default.Register<SaudasUMSModel>(this, ReceiveUmsData); // NotifyPropertyChanged("TradeViewDataCollection"); //TradeViewDataCollection.OrderByDescending(x => x.Time); //MemoryManager.OnTradeUMSRecieved += ExecuteAD2TR; //NetPositionMemory.AD2TRDataUpdation += ExecuteAD2TR; //DisplayCount = CommonFrontEnd.SharedMemories.MemoryManager.CountTrade; #endregion }
public TraderPasswordResetVM() { if (CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict.ContainsKey("WindowsPosition")) { CommonFrontEnd.Model.BoltAppSettingsWindowsPosition oBoltAppSettingsWindowsPosition = new Model.BoltAppSettingsWindowsPosition(); oBoltAppSettingsWindowsPosition = (CommonFrontEnd.Model.BoltAppSettingsWindowsPosition)CommonFrontEnd.SharedMemories.ConfigurationMasterMemory.ConfigurationDict["WindowsPosition"]; if (oBoltAppSettingsWindowsPosition != null && oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET != null && oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET.WNDPOSITION != null) { Height = oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET.WNDPOSITION.Down.ToString(); TopPosition = oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET.WNDPOSITION.Top.ToString(); LeftPosition = oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET.WNDPOSITION.Left.ToString(); Width = oBoltAppSettingsWindowsPosition.TRADERPASSWORDRESET.WNDPOSITION.Right.ToString(); } } DefaultHideControls(); //ReadResetPwdINI(); // btnChangeDefaultPasswordEnabled = Boolean.TrueString; //oLoginRequestProcessor = new LoginRequestProcessor(); }