public void AddOrUpdateBuildingRule(string type, SchemeBuilder builder) { mBuildingRules[type] = builder; if (SchemesChanged != null) { SchemesChanged.Invoke(); } }
private void LoadVisualSchemes() { mBuildingRules[NumberDisplay.Type] = new NumberDisplayBuilder(); mBuildingRules[SimulationStop.Type] = new SimulationStopBuilder(); if (SchemesChanged != null) { SchemesChanged.Invoke(); } }
public void LoadSchemes() { try { var serialisedRules = ApplicationSettings.Load("BuildingRules"); mBuildingRules = MyJsonSerializer.Deserialize <Dictionary <string, SchemeBuilder> >(serialisedRules); if (SchemesChanged != null) { SchemesChanged.Invoke(); } } catch (Exception) { Console.Instance.Log("Произошла ошибка при загрузке схем"); ResetBuildungRules(); } }
private void LoadBaseSchemes() { mBuildingRules[NAND.Type] = new NANDBuilder(); mBuildingRules[CONST.Type] = new CONSTBuilder(); mBuildingRules[DFF.Type] = new DFFBuilder(); mBuildingRules[NANDX.Type] = new NANDXBuilder(); mBuildingRules[ANDX.Type] = new ANDXBuilder(); mBuildingRules[ORX.Type] = new ORXBuilder(); mBuildingRules[NOTX.Type] = new NOTXBuilder(); mBuildingRules[XORX.Type] = new XORXBuilder(); mBuildingRules[RAMX.Type] = new RAMXBuilder(); mBuildingRules[IntConst.Type] = new IntConstBuilder(); if (SchemesChanged != null) { SchemesChanged.Invoke(); } }