コード例 #1
0
        /// <summary>
        /// Sets the selected bar number
        /// </summary>
        private void PnlJournalSelectedBarChange(object sender, EventArgs e)
        {
            var panel = sender as Panel;

            if (panel == null)
            {
                return;
            }

            switch (panel.Name)
            {
            case "JournalByBars":
                SelectedBarNumber         = JournalByBars.SelectedBar;
                JournalOrders.SelectedBar = SelectedBarNumber;
                JournalOrders.SetUpJournal();
                JournalOrders.Invalidate();
                JournalPositions.SelectedBar = SelectedBarNumber;
                JournalPositions.SetUpJournal();
                JournalPositions.Invalidate();
                break;

            case "JournalByPositions":
                SelectedBarNumber = JournalByPositions.SelectedBar;
                break;
            }
        }
コード例 #2
0
 /// <summary>
 /// Sets the journal data
 /// </summary>
 protected void SetupJournal()
 {
     if (!Configs.ShowJournal)
     {
         return;
     }
     if (Configs.JournalByBars)
     {
         JournalByBars.SetUpJournal();
         JournalByBars.UpdateJournalData();
         JournalByBars.Invalidate();
         SelectedBarNumber         = JournalByBars.SelectedBar;
         JournalOrders.SelectedBar = SelectedBarNumber;
         JournalOrders.SetUpJournal();
         JournalOrders.Invalidate();
         JournalPositions.SelectedBar = SelectedBarNumber;
         JournalPositions.SetUpJournal();
         JournalPositions.Invalidate();
     }
     else
     {
         JournalByPositions.ShowTransfers = Configs.JournalShowTransfers;
         JournalByPositions.SetUpJournal();
         JournalByPositions.Invalidate();
         SelectedBarNumber = JournalByBars.SelectedBar;
     }
 }