Example #1
0
        public void Draw(Cube c, DoomGuy g)
        {
            c.FillScreen(Color.White);
              Util.DrawString(c, 5, 5, "Group:" + this._Name);
              Util.DrawString(c, 5, 15, "Devices: " + this.DeviceCount.ToString() + " (" + this.MaintenanceCount.ToString() + ")");
              Util.DrawString(c, 5, 25, "Info:" + this.Info.ToString());
              Util.DrawString(c, 5, 35, "Warn:" + this.Warning.ToString());
              Util.DrawString(c, 5, 45, "Error:" + this.Error.ToString());

              c.Image("zenoss", 5, 60, 0, 0, 32, 42);

              if ( this.DeviceCount == 0 )
            {
              g.Draw(c, DoomGuy.Face.GameOver, DoomGuy.FaceStatus.Normal, 50, 60);
            }
              else
            {

              if ( this.Error >= 10 )
            {
              g.Draw(c, DoomGuy.Face.Health5, DoomGuy.FaceStatus.Normal, 50, 60);
            }
              else if ( this.Error >= 1 )
            {
              g.Draw(c, DoomGuy.Face.Health4, DoomGuy.FaceStatus.Normal, 50, 60);
            }
              else if ( this.Warning >= 10 )
            {
              g.Draw(c, DoomGuy.Face.Health3, DoomGuy.FaceStatus.Normal, 50, 60);
            }
              else if ( this.Warning >= 1 )
            {
              g.Draw(c, DoomGuy.Face.Health2, DoomGuy.FaceStatus.Normal, 50, 60);
            }
              else
            {
              g.Draw(c, DoomGuy.Face.Health1, DoomGuy.FaceStatus.Normal, 50, 60);
            }
            }
        }
Example #2
0
        public void Draw(Cube c, DoomGuy g)
        {
            c.FillScreen(Color.White);
               Util.DrawString(c, 5, 5, "Job:" + this.Name);
               Util.DrawString(c, 5, 15, "Score:" + this.Score.ToString());
               Util.DrawString(c, 5, 25, "Last Success:" + this.LastSuccess.ToString());
            Util.DrawString(c, 5, 35, "Last Fail:" + this.LastFail.ToString());

            c.Image("jenkins", 5, 60, 0, 0, 32, 44);
             			if ( this.Score == 100 )
                {
                    g.Draw(c, DoomGuy.Face.Health1, DoomGuy.FaceStatus.Normal, 50, 60);
                }
            else if ( this.Score >= 80 )
                {
                    g.Draw(c, DoomGuy.Face.Health2, DoomGuy.FaceStatus.Normal, 50, 60);
                }
            else if ( this.Score >= 60 )
                {
                    g.Draw(c, DoomGuy.Face.Health3, DoomGuy.FaceStatus.Normal, 50, 60);
                }
            else if ( this.Score >= 30 )
                {
                    g.Draw(c, DoomGuy.Face.Health4, DoomGuy.FaceStatus.Normal, 50, 60);
                }
            else if ( this.Score > 0 )
                {
                    g.Draw(c, DoomGuy.Face.Health5, DoomGuy.FaceStatus.Normal, 50, 60);
                }
            else
                {
                    g.Draw(c, DoomGuy.Face.GameOver, DoomGuy.FaceStatus.Normal, 50, 60);
                }
        }