public static StockStateBoxController Create(ref Canvas canvas) { if (SSBC == null) { SSBC = new StockStateBoxController(); SSBC.canvas = canvas; return SSBC; } else return SSBC; }
public static StockStateBoxController Create(ref Canvas canvas) { if (SSBC == null) { SSBC = new StockStateBoxController(); SSBC.canvas = canvas; return(SSBC); } else { return(SSBC); } }
public void StockBoxInit() { StockStateBox.pre = null; canvasbox.Clear(); canvas.Children.Clear(); List <StockHoldEntity> SHEL; DBSyncController.Handler().StockHoldReadAll(out SHEL); foreach (StockHoldEntity SHE in SHEL) { StockStateBoxController.Handler().Add(SHE.id, SHE.name, SHE.hold, SHE.money); } NetSyncController.Handler().StartRefresh(); }
private void setCanvas(string name) { if (CanvasDict.ContainsKey(name)) { List <StockStateBox> boxlist = CanvasDict[name]; StockStateBoxController.Handler().setCanvas(ref boxlist); } else { List <StockStateBox> boxlist = new List <StockStateBox>(); CanvasDict.Add(name, boxlist); StockStateBoxController.Handler().setCanvas(ref boxlist); StockStateBoxController.Handler().StockBoxInit(); } }