public void Execute() { ISpreadSheet spreadsheet = SpreadSheetRegistrySingleton.GetInstance().GetSheetByName(sheetname); spreadsheet.SetValue(nRow, nCol, value); }
public SetValueCommand(ISpreadSheet sheet, int nRow, int nCol, int value) { this.sheetname = sheet.Name;//performance issue here this.nRow = nRow; this.nCol = nCol; this.value = value; }
private static void ValidateSheet(ISpreadSheet spreadsheet) { int cellnum = 0; Console.WriteLine("Validating spreadsheet"); for (int nRow = 0; nRow < spreadsheet.NumberOfRows; nRow++) { for (int nCol = 0; nCol < spreadsheet.NumberOfColumns; nCol++) { Debug.Assert(spreadsheet.GetValue(nRow, nCol) == cellnum++, "Not the correct value"); } } Console.WriteLine("Finished validating spreadsheet"); }
private static void ValidateSheet(ISpreadSheet spreadsheet) { int cellnum = 0; Console.WriteLine("Validating spreadsheet"); for (int nRow = 0; nRow < spreadsheet.NumberOfRows; nRow++) { for (int nCol = 0; nCol < spreadsheet.NumberOfColumns; nCol++) { Debug.Assert(spreadsheet.GetValue(nRow, nCol) == cellnum, "Not the correct value"); cellnum++; } } Console.WriteLine("Finished validating spreadsheet"); }
private static void UdateSpreadSheet(ISpreadSheet spreadsheet) { int cellnum = 0; for (int nRow = 0; nRow < spreadsheet.NumberOfRows; nRow++) { for (int nCol = 0; nCol < spreadsheet.NumberOfColumns; nCol++) { spreadsheet.SetValue(nRow, nCol, cellnum); Console.Write("{0} ", cellnum); cellnum++; //Could do but performance hit //spreadsheet.Save("Calcspreadsheet.bin"); //Thread.Sleep(100); } } Console.WriteLine(); }
private static void UpdateSpreadSheet(ISpreadSheet spreadsheet) { int cellnum = 0; for (int nRow = 0; nRow < spreadsheet.NumberOfRows; nRow++) { for (int nCol = 0; nCol < spreadsheet.NumberOfColumns; nCol++) { Console.Write("{0} ", cellnum); spreadsheet.SetValue(nRow, nCol, cellnum); cellnum++; //Could do but performance hit //spreadsheet.Save("Calcspreadsheet.bin"); //Thread.Sleep(100); } } Console.WriteLine(); }
public SpreadSheetDecorator(ISpreadSheet spreadsheet) { inner = spreadsheet; }
public SpreadSheetCommandLogDecorator(ISpreadSheet spreadsheet) : base(spreadsheet) { invoker = new CommandHistoryInvoker( String.Format("{0}.log", spreadsheet.Name)); }
public void RegisterSheet(string name, ISpreadSheet sheet) { sheets[name] = sheet; }
public PINGenerator(ISpreadSheet spreadSheet) { this.spreadSheet = spreadSheet; }
public SpreadSheetBatchCommandDecorator(ISpreadSheet spreadsheet) : base(spreadsheet) { invoker = new BatchInvoker(); }
public PINTestGenerator() { spreadSheet = new SpreadSheet(); pinGenerator = new PINGenerator(spreadSheet); }
public SpreadSheetBatchCommandDecorator(ISpreadSheet spreadsheet) : base(spreadsheet) { _invoker = new BatchInvoker(); }
public SpreadSheetDecorator(ISpreadSheet spreadsheet) { _inner = spreadsheet; }