Exemplo n.º 1
0
        public virtual void Redraw(MPoint leftUpCorner)
        {
            //Logs.Trace(String.Format("{0} was redrawn at ({1};{2})", name, leftUpCorner.x, leftUpCorner.y));
            //if (LastRedrawPoint.isEmpty)
            {
                MDrawHandler.DrawRectangle(leftUpCorner, GetWidth, GetHeight, Color);
                //MDrawHandler.DrawRectangleBorder(new MRectangle(leftUpCorner, GetWidth, GetHeight), new CColor(ConsoleColor.Gray));
            }
            LastRedrawPoint = leftUpCorner;


            //MDrawHandler.DrawStringInPoint(leftUpCorner, Color, String.Format("{0} -- ({1};{2})", name, GetWidth, GetHeight), GetWidth);
        }
Exemplo n.º 2
0
 public static MPoint Trace(String S)
 {
     if (!Write)
     {
         return(new MPoint(-1, -1));
     }
     logs.Add(S);
     // clear all
     if (logs.Count % height == 0)
     {
         MDrawHandler.DrawRectangle(new MRectangle(leftTopCorner, width, height), new CColor(ConsoleColor.Black));
     }
     MPoint where = leftTopCorner.AddY(logs.Count % height);
     MDrawHandler.DrawStringInPoint(where, logColor, S, width);
     return(where);
 }