private static int GetSpreadSheetColumnNumber(string InputString) { int CurrentColumnNumber; ToolsScreen.MakeEmptyLines(1); do { ToolsInput.GetUserInput(out CurrentColumnNumber, InputString); if (!((CurrentColumnNumber >= 0) && (CurrentColumnNumber < Program.SpreadSheet_ObjectList[Program.SheetNumber].GetMaxNumberOfColumnsInRows()))) { ToolsScreen.ClearLine(); } } while (!((CurrentColumnNumber >= 0) && (CurrentColumnNumber < Program.SpreadSheet_ObjectList[Program.SheetNumber].GetMaxNumberOfColumnsInRows()))); return(CurrentColumnNumber); }
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); }
private static int GetSpreadSheetRowNumber(string InputString) { int NumberOfRowsInSpreadSheet = Program.SpreadSheet_ObjectList[Program.SheetNumber].GetNumberOfRowsInSpreadSheet(); int CurrentRowNumber = 0; if (NumberOfRowsInSpreadSheet > 0) { ToolsScreen.MakeEmptyLines(1); do { ToolsInput.GetUserInput(out CurrentRowNumber, InputString); if (!((CurrentRowNumber >= 0) && (CurrentRowNumber < NumberOfRowsInSpreadSheet))) { ToolsScreen.ClearLine(); } } while (!((CurrentRowNumber >= 0) && (CurrentRowNumber < NumberOfRowsInSpreadSheet))); } else { CurrentRowNumber = Const.NoRowsInSpreadSheet; } return(CurrentRowNumber); }
private static int GetSpreadSheet_SheetNumber(string InputString) { int NumberOfSheetsInSpreadSheet = GetNumberOfSheetsInSpreadSheet(); int CurrentSheetNumber = 0; if (NumberOfSheetsInSpreadSheet > 0) { ToolsScreen.MakeEmptyLines(2); do { ToolsInput.GetUserInput(out CurrentSheetNumber, InputString); if (!((CurrentSheetNumber >= 0) && (CurrentSheetNumber < NumberOfSheetsInSpreadSheet))) { ToolsScreen.ClearLine(); } } while (!((CurrentSheetNumber >= 0) && (CurrentSheetNumber < NumberOfSheetsInSpreadSheet))); } else { CurrentSheetNumber = Const.NoSheetInSpreadSheet; } return(CurrentSheetNumber); }