コード例 #1
0
 public ElementText(string ElementStr, Support.Coord StartPos, ushort NewId)
 {
     Output.OutputObj[] Element = new Output.OutputObj[ElementStr.Length];
     for (int i = 0; i < Element.Length; ++i)
     {
         Element[i] = new Output.OutputObj(ElementStr[i]);
     }
     SetElement(Element, StartPos, NewId);
 }
コード例 #2
0
 public ElementHLine(short length, Output.OutputObj style, Support.Coord StartPos, ushort NewId)
 {
     Output.OutputObj[] element = new Output.OutputObj[length];
     for (short i = 0; i < length; ++i)
     {
         element[i] = (Output.OutputObj)style.Clone();
     }
     SetElement(element, StartPos, NewId);
 }
コード例 #3
0
 public void SetElement(string ElementStr, Support.Coord StartPos, ushort NewId)
 {
     Output.OutputObj[] Element = new Output.OutputObj[ElementStr.Length];
     for (int i = 0; i < Element.Length; ++i)
     {
         Element[i] = new Output.OutputObj(ElementStr[i]);
     }
     Id       = NewId;
     element  = (Output.OutputObj[])Element.Clone();
     startPos = new Support.Coord(StartPos.x, StartPos.y);
 }
コード例 #4
0
        //---------------------------------------------- Init ----------------------------------------------
        public Commander()
        {
            isLaunch = true;
            Console.CursorVisible = false;
            Console.Title         = "TeamCommander";

            int currWindowWidth  = screenSizeDivider.x <= 100? Console.LargestWindowWidth - 1 : (int)(Console.LargestWindowWidth / ((float)(screenSizeDivider.x) / 100)),
                currWindowHeight = screenSizeDivider.y <= 100 ? Console.LargestWindowHeight - 1 : (int)(Console.LargestWindowHeight / ((float)(screenSizeDivider.y) / 100));

            if (currWindowWidth < minScreenSize.x)
            {
                currWindowWidth = minScreenSize.x;
            }
            if (currWindowHeight < minScreenSize.y)
            {
                currWindowHeight = minScreenSize.y;
            }

            screen = new Output.Output(new Support.Coord(0, 0), new Support.Coord(currWindowWidth, currWindowHeight));
            for (short ii = 0; ii < screen.screenSize.y; ++ii)
            {
                for (short jj = 0; jj < screen.screenSize.x; ++jj)
                {
                    screen[ii, jj] = new Output.OutputObj(' ', new Output.DColor(ConsoleColor.Black, ConsoleColor.DarkGray));
                }
            }

            headDirector  = new Elements.ElementsDirector(screen);
            downDirector  = new Elements.ElementsDirector(screen);
            leftDirector  = new Elements.ElementsDirector(screen);
            rightDirector = new Elements.ElementsDirector(screen);

            headDirector.Init();

            leftWindow  = new CommanderWindowAllInfo(leftDirector, new Coord(0, 1), new Coord(screen.screenSize.x / 2 - 1, screen.screenSize.y - 3));
            rightWindow = new CommanderWindowAllInfo(rightDirector, new Coord(screen.screenSize.x / 2, 1), new Coord(screen.screenSize.x - 1, screen.screenSize.y - 3));

            currWindow = leftWindow;

            CreateBackGround();
        }
コード例 #5
0
 public ElementEternalVLine(short length, Output.OutputObj style, Support.Coord StartPos, ushort NewId) : base(length, style, StartPos, NewId)
 {
 }