partial void pAddOverlay(ScriptOverlay overlay) { if (string.IsNullOrWhiteSpace(overlay.CodeName)) { throw new ArgumentException("CodeName of ScriptOverlay is null or white space!"); } ovNames.Add(overlay.CodeName, overlay); }
public bool TryGetOverlay(string codeName, out ScriptOverlay ov) { if (codeName == null) { ov = null; return(false); } return(ovNames.TryGetValue(codeName, out ov)); }
/// <summary> /// Create ScriptOverlay-objects from database table and output them as Dictionary overlayByID. /// </summary> /// <param name="dataTable"></param> /// <param name="overlayByID"></param> /// <returns></returns> public bool TryGenerateScriptOverlays(List <List <object> > dataTable, out Dictionary <int, ScriptOverlay> overlayByID) { overlayByID = new Dictionary <int, ScriptOverlay>(); List <ColumnGetTypeInfo> info; TryGetColGetTypeInfo("ScriptOverlay", out info); try { foreach (List <object> row in dataTable) { var overlay = new ScriptOverlay(); var id = -1; for (int c = 0; c < row.Count; c++) { switch (info[c].colName) { case "ScriptOverlayID": id = (int)row[c]; break; case "CodeName": overlay.CodeName = (string)row[c]; break; case "ScriptOverlayName": overlay.Name = (string)row[c]; break; } } if (id < 0) { throw new Exception("No ScriptOverlayID found in db-data."); } overlayByID.Add(id, overlay); } } catch (Exception ex) { info = null; MakeLogError(ex); return(false); } return(true); }
public void RemoveOverlay(ScriptOverlay overlay) { this.baseDef.RemoveOverlay(overlay.BaseOverlay); pRemoveOverlay(overlay); }
partial void pRemoveOverlay(ScriptOverlay overlay);
public void AddOverlay(ScriptOverlay overlay) { this.baseDef.AddOverlay(overlay.BaseOverlay); pAddOverlay(overlay); }
partial void pAddOverlay(ScriptOverlay overlay);
public virtual void AddOverlayAni(ScriptAni ani, ScriptOverlay ov) { this.baseAniJob.AddOverlayAni(ani.BaseAni, ov.BaseOverlay); }
public void RemoveOverlay(ScriptOverlay overlay) { this.BaseInst.RemoveOverlay(overlay.BaseOverlay); }
public void ApplyOverlay(ScriptOverlay overlay) { this.BaseInst.ApplyOverlay(overlay.BaseOverlay); }
partial void pRemoveOverlay(ScriptOverlay overlay) { ovNames.Remove(overlay.CodeName); }