Esempio n. 1
0
        public void Start()
        {
            if (mango == null)
            {
                status = eTaskStatus.Invalid;
                Debug.LogError("Mango不能为空!!!");
            }
            if (status != eTaskStatus.WillDo)
            {
                return;
            }

            OnStart();
        }
Esempio n. 2
0
        public static Rectangle DrawStatus(this AbstractProcessingTask task, Graphics g, Rectangle bound, Color backColor, Color frontColor)
        {
            eTaskStatus status  = task.Status;
            int         percent = task.Percent;

            if (status == eTaskStatus.Working)
            {
                return(DrawProgress(g, bound, percent, backColor, frontColor));
            }
            else if (status == eTaskStatus.Error)
            {
                return(DrawScaleImage(g, global::Sardauscan.Properties.Resources.Bug, bound));
            }
            else if (status == eTaskStatus.Finished)
            {
                return(DrawScaleImage(g, global::Sardauscan.Properties.Resources.Check, bound));
            }

            return(bound);
        }