Exemplo n.º 1
0
        private void chartGaugesInv(DataTable argDt, bool argEva
                                    , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleComponent argArcScale
                                    , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleRangeBarComponent arcRangeBar
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabelDay
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabePlan
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabeTon)
        {
            try
            {
                // DataTable dt = SEL_FG_DAYS_INV("014", Mline);
                argArcScale.EnableAnimation = false;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseIn;
                argArcScale.EasingFunction  = new BackEase();
                argArcScale.MinValue        = 0;

                // argArcScale.MaxValue = Convert.ToInt32(argDt.Rows[0]["VALUE_MAX"]);
                //arcScaleGauges.Ranges[0].EndValue = arcScaleGauges.Ranges[1].StartValue = Convert.ToSingle(10);
                //arcScaleGauges.Ranges[1].EndValue = arcScaleGauges.Ranges[2].StartValue = Convert.ToSingle(15);
                //arcScaleGauges.Ranges[2].EndValue = Convert.ToSingle(20);
                argArcScale.Value = 0;
                argLabelDay.Text  = "";
                argLabePlan.Text  = "";
                argLabeTon.Text   = "";



                argArcScale.MinValue = 0;
                argArcScale.MaxValue = Convert.ToSingle(argDt.Rows[0]["VALUE_MAX"]);

                argArcScale.EnableAnimation = true;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseInOut;
                argArcScale.EasingFunction  = new BackEase();
                double num;
                double.TryParse(argDt.Rows[0]["VALUE_DATA"].ToString(), out num);
                argArcScale.Value = (float)num;
                argLabelDay.Text  = num.ToString();
                argLabePlan.Text  = argDt.Rows[0]["PLAN_DATA"].ToString();
                argLabeTon.Text   = argDt.Rows[0]["INV"].ToString();

                if (num > 0.5)
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Red;Style2:Red]");
                }
                //else if (num >= 2)
                //    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Yellow;Style2:Yellow]");
                else
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Green;Style2:Green]");
                }

                // lblTar.Text = argDt.Rows[0]["TARGET"].ToString();
                // lblProd.Text = argDt.Rows[0]["PROD_QTY"].ToString();
            }
            catch
            { }
            // }
        }
Exemplo n.º 2
0
        private void chartGaugesProd(DataTable argDt, bool argEva, DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleComponent argArcScale
                                     , DevExpress.XtraGauges.Win.Base.LabelComponent argLabel
                                     , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleRangeBarComponent arcRangeBar)
        {
            argArcScale.EnableAnimation = false;
            argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseIn;
            argArcScale.EasingFunction  = new BackEase();
            argArcScale.MinValue        = 0;


            argArcScale.Value = 0;
            argLabel.Text     = "0";
            try
            {
                argArcScale.MinValue = 0;
                argArcScale.MaxValue = Convert.ToInt32(argDt.Rows[0]["VALUE_MAX"]);

                argArcScale.EnableAnimation = true;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseInOut;
                argArcScale.EasingFunction  = new BackEase();
                double num;
                double.TryParse(argDt.Rows[0]["VALUE_DATA"].ToString(), out num);
                argArcScale.Value = (float)num;
                argLabel.Text     = num.ToString() + "%";

                if (argEva)
                {
                    lblProDMPDPlan.Text = argDt.Rows[0]["D_PLAN"].ToString();
                    lblProDMPRPlan.Text = argDt.Rows[0]["R_PLAN"].ToString();
                    lblProDMPProd.Text  = argDt.Rows[0]["PROD"].ToString();
                }
                else
                {
                    lblProDMCDPlan.Text = argDt.Rows[0]["D_PLAN"].ToString();
                    lblProDMCRPlan.Text = argDt.Rows[0]["R_PLAN"].ToString();
                    lblProDMCProd.Text  = argDt.Rows[0]["PROD"].ToString();
                }

                if (num > 98)
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Green;Style2:Green]");
                }
                else if (num >= 95)
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Yellow;Style2:Yellow]");
                }
                else
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Red;Style2:Red]");
                }
            }
            catch
            { }
            // }
        }
Exemplo n.º 3
0
        private void chartGaugesProd(DataTable argDt, bool argEva, DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleComponent argArcScale
                                     , DevExpress.XtraGauges.Win.Base.LabelComponent argLabel
                                     , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleRangeBarComponent arcRangeBar)
        {
            // DataTable dt = SEL_FG_DAYS_INV("014", Mline);
            argArcScale.EnableAnimation = false;
            argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseIn;
            argArcScale.EasingFunction  = new BackEase();
            argArcScale.MinValue        = 0;

            argArcScale.MaxValue = Convert.ToInt32(argDt.Rows[0]["VALUE_MAX"]);
            //arcScaleGauges.Ranges[0].EndValue = arcScaleGauges.Ranges[1].StartValue = Convert.ToSingle(10);
            //arcScaleGauges.Ranges[1].EndValue = arcScaleGauges.Ranges[2].StartValue = Convert.ToSingle(15);
            //arcScaleGauges.Ranges[2].EndValue = Convert.ToSingle(20);
            argArcScale.Value = 0;
            argLabel.Text     = "0";
            try
            {
                argArcScale.MinValue = 0;
                argArcScale.MaxValue = Convert.ToInt32(argDt.Rows[0]["VALUE_MAX"]);

                argArcScale.EnableAnimation = true;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseInOut;
                argArcScale.EasingFunction  = new BackEase();
                double num;
                double.TryParse(argDt.Rows[0]["VALUE_DATA"].ToString(), out num);
                argArcScale.Value = (float)num;
                argLabel.Text     = num.ToString() + "%";

                if (argEva)
                {
                    lblProEvaDPlan.Text = argDt.Rows[0]["D_PLAN"].ToString();
                    lblProEvaRPlan.Text = argDt.Rows[0]["R_PLAN"].ToString();
                    lblProEvaProd.Text  = argDt.Rows[0]["PROD"].ToString();
                }
                else
                {
                    lblProRubDPlan.Text = argDt.Rows[0]["D_PLAN"].ToString();
                    lblProRubRPlan.Text = argDt.Rows[0]["R_PLAN"].ToString();
                    lblProRubProd.Text  = argDt.Rows[0]["PROD"].ToString();
                }

                if (num > 85)
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Green;Style2:]");
                }
                else if (num > 80)
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Yellow;Style2:]");
                }
                else
                {
                    arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Red;Style2:]");
                }
                // lblTar.Text = argDt.Rows[0]["TARGET"].ToString();
                // lblProd.Text = argDt.Rows[0]["PROD_QTY"].ToString();
            }
            catch
            { }
            // }
        }
Exemplo n.º 4
0
        private void chartGaugesInv(DataTable argDt, bool argEva
                                    , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleComponent argArcScale
                                    , DevExpress.XtraGauges.Win.Gauges.Circular.ArcScaleRangeBarComponent arcRangeBar
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabelDay
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabePlan
                                    , DevExpress.XtraGauges.Win.Base.LabelComponent argLabeTon)
        {
            try
            {
                argArcScale.EnableAnimation = false;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseIn;
                argArcScale.EasingFunction  = new BackEase();
                argArcScale.MinValue        = 0;


                argArcScale.Value = 0;
                argLabelDay.Text  = "";
                argLabePlan.Text  = "";
                argLabeTon.Text   = "";



                argArcScale.MinValue = 0;
                argArcScale.MaxValue = Convert.ToSingle(argDt.Rows[0]["VALUE_MAX"]);

                argArcScale.EnableAnimation = true;
                argArcScale.EasingMode      = DevExpress.XtraGauges.Core.Model.EasingMode.EaseInOut;
                argArcScale.EasingFunction  = new BackEase();
                double num;
                double.TryParse(argDt.Rows[0]["VALUE_DATA"].ToString(), out num);
                argArcScale.Value = (float)num;
                argLabelDay.Text  = num.ToString("0.00");
                argLabePlan.Text  = argDt.Rows[0]["PLAN_DATA"].ToString();
                argLabeTon.Text   = argDt.Rows[0]["INV"].ToString();


                if (argDt.Rows[0]["Factory"].ToString() == "DMC")
                {
                    if (num > 2.5)
                    {
                        arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Red;Style2:Red]");
                    }


                    else
                    {
                        arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Green;Style2:Green]");
                    }
                }
                else if (argDt.Rows[0]["Factory"].ToString() == "DMP")
                {
                    if (num > 2.5)
                    {
                        arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Red;Style2:Red]");
                    }

                    else
                    {
                        arcRangeBar.Shader = new DevExpress.XtraGauges.Core.Drawing.StyleShader("Colors[Style1:Green;Style2:Green]");
                    }
                }
            }
            catch
            { }
            // }
        }