コード例 #1
0
 private void RemovePreviousObjects()
 {
     try
     {
         if (chartVu != null)
         {
             ArrayList arrObjects = chartVu.GetChartObjectsArrayList();
             int       iCount     = arrObjects.Count;
             if (arrObjects != null)
             {
                 for (int iCtr = 0; iCtr < iCount; iCtr++)
                 {
                     GraphObj objObject = (GraphObj)arrObjects[0];
                     Type     obj       = objObject.GetType();
                     chartVu.DeleteChartObject(objObject);
                 }
             }
             chartVu.UpdateDraw();
         }
     }
     catch (Exception ex)
     {
     }
 }
コード例 #2
0
        internal void SetDataCursor()
        {
            try
            {
                m_objDataCursor = new DataCursor(m_objChartView, m_objCartesianCordinates, GraphObj.MARKER_VLINE, 8.0);
                m_objDataCursor.SetColor(Color.Black);
                m_objDataCursor.SetEnable(true);
                m_objDataCursor.LineStyle = DashStyle.Solid;
                m_objDataCursor.SetLineStyle(DashStyle.Solid);
                m_objDataCursor.LineColor = Color.Black;
                m_objChartView.SetCurrentMouseListener(m_objDataCursor);
                m_objChartView.AddChartObject(m_objDataCursor);

                if (m_objMarker != null)
                {
                    m_objChartView.DeleteChartObject(m_objMarker);

                    m_objChartView.UpdateDraw();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message, ex.StackTrace);
            }
            finally
            {
            }
        }