Ejemplo n.º 1
0
 public static void MakeEmptyLines(int NumberOfEmptyLines)
 {
     for (int Counter = 0; Counter < NumberOfEmptyLines; Counter++)
     {
         ToolsOutput.PrintStringOnSeperateLine("");
     }
 }
Ejemplo n.º 2
0
 public void PrintAllRowsWithinSpreadSheetColumn(int SpreadSheetColumn)
 {
     if (GetMaxNumberOfColumnsInRows() >= SpreadSheetColumn)
     {
         ToolsScreen.MakeEmptyLines(1);
         for (int RowCounter = 0; RowCounter < SpreadSheetMatrix.Count; RowCounter++)
         {
             ToolsOutput.PrintStringOnSameLine("Række " + RowCounter + " : ");
             if (SpreadSheetMatrix[RowCounter].Count > SpreadSheetColumn)
             {
                 ToolsOutput.PrintPoint(SpreadSheetMatrix[RowCounter][SpreadSheetColumn]);
             }
             ToolsOutput.PrintStringOnSeperateLine("");
         }
         ToolsScreen.MakeEmptyLines(1);
     }
 }
Ejemplo n.º 3
0
        public static int MakeMenuMoreChars(string[] StringListHere)
        {
            int KeypressedValue = 0;

            foreach (string Item in StringListHere)
            {
                ToolsOutput.PrintStringOnSeperateLine(Item);
            }
            HandleSpreadSheet.PrintPointsInSpreadSheet();

            do
            {
                ToolsInput.GetUserInput(out KeypressedValue, "Indtast dit valg (1 - " + StringListHere.Length + ") : ");
                if (!((KeypressedValue > 1) && (KeypressedValue <= StringListHere.Count())))
                {
                    ToolsScreen.ClearLine();
                }
            } while (!((KeypressedValue > 0) && (KeypressedValue <= StringListHere.Count())));

            return(KeypressedValue);
        }
Ejemplo n.º 4
0
        public static void PrintTopOfScreen(int SheetNumber)
        {
            ToolsScreen.ClearScreen();

            if (Const.NoSheetInSpreadSheet != SheetNumber)
            {
                ToolsOutput.PrintStringOnSeperateLine("Antal Sheet i Regneark       : " + HandleSpreadSheet.GetNumberOfSheetsInSpreadSheet());
                ToolsOutput.PrintStringOnSameLine("Sheets : ");
                for (int SheetCounter = 0; SheetCounter < HandleSpreadSheet.GetNumberOfSheetsInSpreadSheet(); SheetCounter++)
                {
                    ToolsOutput.PrintStringOnSameLine(SheetCounter + " (" + SpreadSheet_ObjectList[SheetCounter].SheetNameInSpreadSheet + ")");
                    if (SheetCounter < HandleSpreadSheet.GetNumberOfSheetsInSpreadSheet() - 1)
                    {
                        ToolsOutput.PrintStringOnSameLine(" - ");
                    }
                }
                ToolsOutput.PrintStringOnSeperateLine("");
                ToolsOutput.PrintStringOnSeperateLine("Aktiv Sheet i Regneark       : " + SheetNumber + " (" + SpreadSheet_ObjectList[SheetNumber].SheetNameInSpreadSheet + ")");
                ToolsOutput.PrintStringOnSeperateLine("Antal rækker i Sheet " + SheetNumber + " : " + SpreadSheet_ObjectList[SheetNumber].GetNumberOfRowsInSpreadSheet());
                ToolsOutput.PrintStringOnSeperateLine("Max søjler i række i sheet " + SheetNumber + " : " + SpreadSheet_ObjectList[SheetNumber].GetMaxNumberOfColumnsInRows());
                ToolsOutput.PrintStringOnSeperateLine("---------------------------------");
                ToolsScreen.MakeEmptyLines(1);
            }
        }
Ejemplo n.º 5
0
        public static int MakeMenu(string[] StringListHere)
        {
            int  KeypressedValue     = 0;
            char KeypressedValueChar = '0';

            char[] ValidCharArray = new char[StringListHere.Length];

            for (int Counter = 0; Counter < StringListHere.Length; Counter++)
            {
                char[] _chars = (Counter + 1).ToString().ToCharArray();
                ValidCharArray[Counter] = _chars[0];
            }

            //ToolsScreen.ClearScreen();
            foreach (string Item in StringListHere)
            {
                ToolsOutput.PrintStringOnSeperateLine(Item);
            }
            HandleSpreadSheet.PrintPointsInSpreadSheet();
            KeypressedValueChar = ToolsInput.GetKeyPress("Indtast dit valg (1 - " + StringListHere.Length + ") : ", ValidCharArray, false);
            KeypressedValue     = KeypressedValueChar.ParseInt32();

            return(KeypressedValue);
        }
Ejemplo n.º 6
0
 public static void WaitForUser(string UserString)
 {
     ToolsOutput.PrintStringOnSeperateLine(UserString);
     Console.ReadLine();
 }