public static IState Instance(IDoubleEnumerator ide) { ie = ide; try { if (ie.MoveNext()) { ie.ShowCurrent(Target.Cashier); } else { throw new ListingException(); } ShowList(); } catch (ListingException) { throw new Exception(PosMessage.LIST_EMPTY); } catch (Exception ex) { cr.Log.Error("Exception occured. {0}", ex.Message); throw new ListingException(); } return(state); }
//Instance method has 2 parameters //1. Enumerator for a list of items to be displayed. Each item implements //IMenuItem interface, which means that it knows howto display itself //2. Delegate for the method which will be called on the selected item //when the user presses enter key public static new IState Instance(IDoubleEnumerator ide, ProcessSelectedItem psi) { #if WindowsCE return(List.Instance(ide, psi)); #else ListForm.SetList(ide); ProcessSelected = psi; List.Instance(ide); return(state); #endif }
//PSI not supplied in below function - designed to be called from inherited classes such //as SetupMenu where returnCancel may be CashRegisterLoadError instance //protected static IState Instance(IDoubleEnumerator ide, StateInstance returnCancel) //{ // ReturnCancel = returnCancel; // return Instance(ide); //} public override void Escape() { if (ie.Current is FiscalItem && cr.Item.TotalAmount > 0) { return; } ie = null; if (ReturnCancel == null) { cr.State = Start.Instance(); } else { cr.State = ReturnCancel(); } ReturnCancel = null; }
public static new IState Instance(IDoubleEnumerator ide) { Instance(ide, new ProcessSelectedItem(cr.Execute)); return(state); }
public static IState Instance(IDoubleEnumerator ide, ProcessSelectedItem psi, StateInstance returnCancel) { ProcessSelected = psi; ReturnCancel = returnCancel; return(Instance(ide)); }
//Instance method has 2 parameters //1. Enumerator for a list of items to be displayed. Each item implements //IMenuItem interface, which means that it knows howto display itself //2. Delegate for the method which will be called on the selected item //when the user presses enter key public static IState Instance(IDoubleEnumerator ide, ProcessSelectedItem psi) { ProcessSelected = psi; return(Instance(ide)); }
public static IState Instance(IDoubleEnumerator ide, ProcessSelectedItem <MenuLabel> psi, StateInstance returnCancel) { ReturnCancel = returnCancel; return(Instance(ide, psi)); }
public static IState Instance(IDoubleEnumerator ide, ProcessSelectedItem <MenuLabel> psi) { ProcessSelected = psi; List.Instance(ide); return(state); }