Example #1
0
        /// <summary>
        /// Отрисовать шкалу графиков
        /// </summary>
        public void RedrawScalePanel()
        {
            bool blocked = false;

            try
            {
                if (drawMutex.WaitOne(500))
                {
                    if (panels != null)
                    {
                        ScalePanel scale = panels[1] as ScalePanel;
                        if (scale != null)
                        {
                            blocked = true;
                            using (SolidBrush brush = new SolidBrush(color))
                            {
                                //scale.Drawter.Clear(color);
                                scale.InvalidatePanel();
                                drawter.Present();
                            }
                        }
                    }
                }
            }
            finally
            {
                if (blocked)
                {
                    drawMutex.ReleaseMutex();
                }
            }
        }
Example #2
0
        /// <summary>
        /// Создать панель отображающую шкалы графиков
        /// </summary>
        /// <returns></returns>
        private IElement CreateScalePanel()
        {
            try
            {
                ScalePanel panel = new ScalePanel(this);
                panel.InitializePanel();

                return(panel);
            }
            catch
            {
                return(null);
            }
        }
Example #3
0
File: Panel.cs Project: slawer/skc
        /// <summary>
        /// Создать панель отображающую шкалы графиков
        /// </summary>
        /// <returns></returns>
        private IElement CreateScalePanel()
        {
            try
            {
                ScalePanel panel = new ScalePanel(this);
                panel.InitializePanel();

                return panel;
            }
            catch
            {
                return null;
            }
        }