Beispiel #1
0
 public TimeLineFormatEventArgs(DateTime time, TimeScalePane.Tick priorTick, bool isCursor)
 {
     PriorTick = priorTick;
       Time      = time;
       IsCursor  = isCursor;
       Text      = string.Empty;
 }
Beispiel #2
0
        public TimeSeriesChart() : base()
        {
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //the PlotPane is already dbl buffered
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); //no ERASE BACKGROUND

            SetStyle(ControlStyles.UserMouse, true);

            UpdateStyles();

            m_TimeScalePane        = new TimeScalePane(this);
            m_TimeScalePane.Parent = this;
            m_TimeScalePane.Height = 25;
            m_TimeScalePane.Dock   = DockStyle.Bottom;
            ShowTimeGaps           = true;

            m_ChartPanel           = new Panel();
            m_ChartPanel.Parent    = this;
            m_ChartPanel.KeyDown  += (s, e) => OnKeyDown(e);
            m_ChartPanel.KeyUp    += (s, e) => OnKeyUp(e);
            m_ChartPanel.KeyPress += (s, e) => OnKeyPress(e);

            Controls.Add(m_ChartPanel);
            Controls.Add(m_TimeScalePane);

            m_ChartPanel.Dock = DockStyle.Fill;

            Style                = new Style(this, null);
            GridLineStyle        = new LineStyle();
            SplitterStyle        = new Style(this, null);
            RulerStyle           = new Style(this, null);
            PlotStyle            = new Style(this, null);
            TimeScaleStyle       = new Style(this, null);
            TimeScaleSelectStyle = new Style(this, null);
            LastPriceMarkerStyle = new Style(this, null);

            BuildDefaultStyle();

            ZoomStepPercent   = 5;
            TimeLineTickSpace = TimeScalePane.DEFAULT_TICK_SPACE;

            m_ControllerNotificationTimer          = new Timer();
            m_ControllerNotificationTimer.Interval = REBUILD_TIMEOUT_MS;
            m_ControllerNotificationTimer.Enabled  = false;
            m_ControllerNotificationTimer.Tick    += (o, e) =>
            {
                //todo ETO NUJNO DLYA DRAG/DROP   if (m_RepositioningColumn!=null || m_ResizingColumn!=null ) return;//while grid is being manipulated dont flush timer just yet

                m_ControllerNotificationTimer.Stop();
                rebuildChart();
            };
        }
Beispiel #3
0
       public TimeSeriesChart() : base ()
       {
         //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //the PlotPane is already dbl buffered
         SetStyle(ControlStyles.UserPaint, true);
         SetStyle(ControlStyles.AllPaintingInWmPaint, true); //no ERASE BACKGROUND
         
         SetStyle(ControlStyles.UserMouse, true);

         
         UpdateStyles();
         

         m_TimeScalePane = new TimeScalePane(this);
         m_TimeScalePane.Parent = this;
         m_TimeScalePane.Height = 25;
         m_TimeScalePane.Dock = DockStyle.Bottom;
         m_TimeScalePane.BackColor = Color.Black;

         m_Style = new Style(this, null);
         m_RulerStyle = new Style(this, null);
         m_PlotStyle = new Style(this, null);
         
         BuildDefaultStyle(m_Style);
         BuildDefaultRulerStyle(m_RulerStyle);
         BuildDefaultPlotStyle(m_PlotStyle);
         
         
         m_ControllerNotificationTimer = new Timer();
         m_ControllerNotificationTimer.Interval = REBUILD_TIMEOUT_MS;
         m_ControllerNotificationTimer.Enabled = false;
         m_ControllerNotificationTimer.Tick += new EventHandler((o, e) =>
                                                       {
                          //todo ETO NUJNO DLYA DRAG/DROP   if (m_RepositioningColumn!=null || m_ResizingColumn!=null ) return;//while grid is being manipulated dont flush timer just yet
                                                       
                                                        m_ControllerNotificationTimer.Stop(); 
                                                        rebuildChart();
                                                       });
       }
Beispiel #4
0
        public TimeSeriesChart() : base()
        {
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //the PlotPane is already dbl buffered
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); //no ERASE BACKGROUND

            SetStyle(ControlStyles.UserMouse, true);


            UpdateStyles();


            m_TimeScalePane           = new TimeScalePane(this);
            m_TimeScalePane.Parent    = this;
            m_TimeScalePane.Height    = 25;
            m_TimeScalePane.Dock      = DockStyle.Bottom;
            m_TimeScalePane.BackColor = Color.Black;

            m_Style      = new Style(this, null);
            m_RulerStyle = new Style(this, null);
            m_PlotStyle  = new Style(this, null);

            BuildDefaultStyle(m_Style);
            BuildDefaultRulerStyle(m_RulerStyle);
            BuildDefaultPlotStyle(m_PlotStyle);


            m_ControllerNotificationTimer          = new Timer();
            m_ControllerNotificationTimer.Interval = REBUILD_TIMEOUT_MS;
            m_ControllerNotificationTimer.Enabled  = false;
            m_ControllerNotificationTimer.Tick    += new EventHandler((o, e) =>
            {
                //todo ETO NUJNO DLYA DRAG/DROP   if (m_RepositioningColumn!=null || m_ResizingColumn!=null ) return;//while grid is being manipulated dont flush timer just yet

                m_ControllerNotificationTimer.Stop();
                rebuildChart();
            });
        }
Beispiel #5
0
 protected internal TimeCursorElement(TimeScalePane host)
     : base(host)
 {
     this.Region = new Rectangle(0, 0, Pane.Chart.TimeLineTickSpace, host.Height);
 }
Beispiel #6
0
 protected internal TimeCursorElement(TimeScalePane host) : base(host)
 {
     this.Region = new Rectangle(0, 0, TICK_SPACE, host.Height);
 }
Beispiel #7
0
        public TimeSeriesChart()
            : base()
        {
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //the PlotPane is already dbl buffered
              SetStyle(ControlStyles.UserPaint, true);
              SetStyle(ControlStyles.AllPaintingInWmPaint, true); //no ERASE BACKGROUND

              SetStyle(ControlStyles.UserMouse, true);

              UpdateStyles();

              m_TimeScalePane        = new TimeScalePane(this);
              m_TimeScalePane.Parent = this;
              m_TimeScalePane.Height = 25;
              m_TimeScalePane.Dock   = DockStyle.Bottom;
              ShowTimeGaps           = true;

              m_ChartPanel           = new Panel();
              m_ChartPanel.Parent    = this;
              m_ChartPanel.KeyDown  += (s, e) => OnKeyDown(e);
              m_ChartPanel.KeyUp    += (s, e) => OnKeyUp(e);
              m_ChartPanel.KeyPress += (s, e) => OnKeyPress(e);

              Controls.Add(m_ChartPanel);
              Controls.Add(m_TimeScalePane);

              m_ChartPanel.Dock      = DockStyle.Fill;

              Style                  = new Style(this, null);
              GridLineStyle          = new LineStyle();
              SplitterStyle          = new Style(this, null);
              RulerStyle             = new Style(this, null);
              PlotStyle              = new Style(this, null);
              TimeScaleStyle         = new Style(this, null);
              TimeScaleSelectStyle   = new Style(this, null);
              LastPriceMarkerStyle   = new Style(this, null);

              BuildDefaultStyle();

              ZoomStepPercent   = 5;
              TimeLineTickSpace = TimeScalePane.DEFAULT_TICK_SPACE;

              m_ControllerNotificationTimer          = new Timer();
              m_ControllerNotificationTimer.Interval = REBUILD_TIMEOUT_MS;
              m_ControllerNotificationTimer.Enabled  = false;
              m_ControllerNotificationTimer.Tick    += (o, e) =>
              {
            //todo ETO NUJNO DLYA DRAG/DROP   if (m_RepositioningColumn!=null || m_ResizingColumn!=null ) return;//while grid is being manipulated dont flush timer just yet

            m_ControllerNotificationTimer.Stop();
            rebuildChart();
              };
        }
Beispiel #8
0
 protected internal TimeCursorElement(TimeScalePane host) : base(host)
 {
     this.Region = new Rectangle(0, 0, Pane.Chart.TimeLineTickSpace, host.Height);
 }
Beispiel #9
0
 protected internal TimeCursorElement(TimeScalePane host) : base(host)
 {
   this.Region = new Rectangle(0, 0, TICK_SPACE, host.Height);
 }