void Window_Loaded(object sender, EventArgs e) { manager = ((Global)Application.Current.Properties["Global"]).SettingsManager; ((Global)Application.Current.Properties["Global"]).Connections.TryGetValue("Stock", out stock); var reader = new Kernel.DataReader.SqlDataReader(); var source = reader.ReadAllHistory(); Customers.ItemsSource = source; var NetworkReader = ((Global)Application.Current.Properties["Global"]).Reader; var SqlReader = ((Global)Application.Current.Properties["Global"]).SqlReader; plotBuilder = new CoordinateBuilder(Stock, manager.Ms, NetworkReader, SqlReader, 100, 20, 30, 20, 0.2, 2, "ACB", manager.Ms.ChartType); plotBuilder.DrawStockMajorToCanvas(ref Stock); Console.WriteLine(); }
public StockViewer(CoordinateBuilder plotBuilder, MenuSetting menuSetting) { InitializeComponent(); this.plotBuilder = plotBuilder; _menuSetting = menuSetting; plotBuilder.width = Stock.Width; plotBuilder.height = Stock.Height; plotBuilder.DrawStockMajorToCanvas(ref Stock); if (menuSetting.ChartSettings["MACD"]) { plotBuilder.LoadMACD(9); plotBuilder.DrawMACDToCanvas(ref MACD, 9); } if (menuSetting.ChartSettings["RSI"]) { plotBuilder.LoadRSI(); plotBuilder.DrawRSIToCanvas(ref RSI, 11); } }