public void AddToHistory(PrintGroup printGroup) { History.Add(printGroup); if (History.Count > HISTORY_DEPTH) { History.RemoveAt(0); } }
public void PushToHistory(string key) { var printGroup = new PrintGroup(); printGroup.Printables.Add(key, (IPrint)_printables[key].Clone()); printGroup.UpdateHeader(); AddToHistory(printGroup); }
internal void SetCurrentPrintGroup(PrintGroup printGroup) { _printables = new Dictionary <string, IPrint>(); foreach (var printable in printGroup.Printables) { AddPrintable(printable.Key, (IPrint)printable.Value.Clone()); PrintableChanged.Invoke(printable.Key); } //throw new NotImplementedException(); }
public void PushAllToHistory() { var printGroup = new PrintGroup(); foreach (var print in _printables) { printGroup.Printables.Add(print.Key, (IPrint)print.Value.Clone()); } printGroup.UpdateHeader(); AddToHistory(printGroup); }
public void SetupTestPrintGroups() { PrintGroup pg = new PrintGroup(); var mainEngine = new MainEngineBarcode(); mainEngine.Partnumber = "12345678"; mainEngine.Serialnumber = "12345678"; pg.Printables.Add("MainEngine", mainEngine); var injectors = new InjectorDataMatrix(mainEngine); injectors.Injector1 = "6A1AIB5H"; injectors.Injector2 = "6A1AIB5H"; injectors.Injector3 = "6A1AIB5H"; injectors.Injector4 = "6A1AIB5H"; injectors.Injector5 = "6A1AIB5H"; pg.Printables.Add("Injectors", injectors); pg.Header = mainEngine.ToString(); History.Add(pg); }