コード例 #1
0
        private void InitializeFormAndChart(string username)
        {
            #region Form
            this.StyleManager = FormStyleManager;
            #endregion

            #region User
            this.UsernameLabel.Text = username;
            #endregion

            InitializeChart.InitializeAll(this.StockIndexLineChart);

            #region DatePicker 1 and 2
            ChooseEndDate.Value   = DateTime.Now;
            ChooseStartDate.Value = DateTime.Now.AddMonths(-6);
            #endregion

            #region Comboboxes 1 and 2

            ChooseStockIndex1.DataSource    = new BindingSource(Index.Tickers, null);
            ChooseStockIndex1.DisplayMember = "Key";
            ChooseStockIndex1.ValueMember   = "Value";

            Dictionary <string, string> copyTickers = new Dictionary <string, string>(Index.Tickers);
            copyTickers[""] = "";
            ChooseStockIndex2.DataSource    = new BindingSource(copyTickers, null);
            ChooseStockIndex2.DisplayMember = "Key";
            ChooseStockIndex2.ValueMember   = "Value";
            #endregion

            #region Chart Series
            ChooseStockIndex1.SelectedItem = ChooseStockIndex1.Items.OfType <KeyValuePair <string, string> >()
                                             .ToList().Select(x => x.Key == "S&&P 500").First();

            ChooseStockIndex2.SelectedItem = ChooseStockIndex2.Items.OfType <KeyValuePair <string, string> >()
                                             .ToList().Select(x => x.Key == "").First();
            ChooseStockIndex2.SelectedIndex = ChooseStockIndex2.FindStringExact("");
            #endregion

            #region Second Tab - Stock Watch
            CreateTiles.AddTilesSecondTab(this.Font, this.StockWatch);
            #endregion
        }
コード例 #2
0
ファイル: RayCast.cs プロジェクト: bickhofe/toonpuzzle
 // Use this for initialization
 void Start()
 {
     TilesScript = transform.parent.GetComponent <CreateTiles> ();
 }
コード例 #3
0
 private static void OnTimerElapsed(object sender, EventArgs eventArgs)
 {
     CreateTiles.UpdateSecondTabData();
 }