示例#1
0
        private void DrawBackground(BackgroundMode background)
        {
            if (background == BackgroundMode.bmNone)
            {
                return;
            }

            bool bgImage = false; /*((BackgroundImage != null) &&
                                   * (background == BackgroundMode.bmAny ||
                                   * background == BackgroundMode.bmImage));*/

            if (bgImage)
            {
                /*var imgRect = new Rectangle(0, 0, fImageWidth, fImageHeight);
                 *
                 *  using (Brush textureBrush = new TextureBrush(BackgroundImage, WrapMode.Tile)) {
                 *      gfx.FillRectangle(textureBrush, imgRect);
                 *  }*/
            }
            else
            {
                bool bgFill = (background == BackgroundMode.bmAny ||
                               background == BackgroundMode.bmImage);

                if (bgFill)
                {
                    fRenderer.DrawRectangle(null, UIHelper.ConvertColor(BackgroundColor), 0, 0, fModel.ImageWidth, fModel.ImageHeight);
                }
            }
        }
示例#2
0
        /*private void PanDefFont_Click(object sender, EventArgs e)
         * {
         *  if (FontDialog1.ShowDialog() == DialogResult.OK)
         *  {
         *      //FOptions.ChartOptions.DefFont_Name = FontDialog1.Font.Name;
         *      //FOptions.ChartOptions.DefFont_Size = (int)checked((long)Math.Round((double)FontDialog1.Font.Size));
         *  }
         *  UpdateControls();
         * }*/

        private void lblColorClick(object sender, MouseEventArgs e)
        {
            Label lbl = sender as Label;

            if (lbl == null)
            {
                return;
            }
            lbl.BackgroundColor = UIHelper.ConvertColor(AppHost.StdDialogs.SelectColor(UIHelper.ConvertColor(lbl.BackgroundColor)));
        }
示例#3
0
        public void UpdateControls()
        {
            if (fOptions == null)
            {
                return;
            }
            //PanDefFont.Text = FOptions.ChartOptions.DefFont_Name + ", " + FOptions.ChartOptions.DefFont_Size.ToString();

            acb0.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[0]);
            acb1.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[1]);
            acb2.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[2]);
            acb3.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[3]);
            acb4.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[4]);
            acb5.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[5]);
            acb6.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[6]);
            acb7.BackgroundColor    = UIHelper.ConvertColor(fOptions.BrushColor[7]);
            acbText.BackgroundColor = UIHelper.ConvertColor(fOptions.BrushColor[8]);
            acbBack.BackgroundColor = UIHelper.ConvertColor(fOptions.BrushColor[9]);
            acbLine.BackgroundColor = UIHelper.ConvertColor(fOptions.BrushColor[10]);

            chkHideEmptySegments.Checked = fOptions.HideEmptySegments;
        }
示例#4
0
        public void AcceptChanges()
        {
            if (fOptions == null)
            {
                return;
            }

            fOptions.BrushColor[0]  = UIHelper.ConvertColor(acb0.BackgroundColor);
            fOptions.BrushColor[1]  = UIHelper.ConvertColor(acb1.BackgroundColor);
            fOptions.BrushColor[2]  = UIHelper.ConvertColor(acb2.BackgroundColor);
            fOptions.BrushColor[3]  = UIHelper.ConvertColor(acb3.BackgroundColor);
            fOptions.BrushColor[4]  = UIHelper.ConvertColor(acb4.BackgroundColor);
            fOptions.BrushColor[5]  = UIHelper.ConvertColor(acb5.BackgroundColor);
            fOptions.BrushColor[6]  = UIHelper.ConvertColor(acb6.BackgroundColor);
            fOptions.BrushColor[7]  = UIHelper.ConvertColor(acb7.BackgroundColor);
            fOptions.BrushColor[8]  = UIHelper.ConvertColor(acbText.BackgroundColor);
            fOptions.BrushColor[9]  = UIHelper.ConvertColor(acbBack.BackgroundColor);
            fOptions.BrushColor[10] = UIHelper.ConvertColor(acbLine.BackgroundColor);

            fOptions.HideEmptySegments = chkHideEmptySegments.Checked.GetValueOrDefault();
            //fOptions.Apply();
        }