...
Code Block | ||
---|---|---|
| ||
using System; using System.Collections.Generic; using System.Drawing; using System.Text; using System.Linq; using Alastri.RR.Ui; using Alastri.RR.Service; public class CustomBlastShading : IBlastShading { public Color GetColor(ShadingContext context) { double tonnes = context.N("DryTonnes"); if(tonnes > 0) return Color.BlanchedAlmond; else return Color.Red; } } |
Заливка
...
по руде/
...
вскрыше
Code Block | ||
---|---|---|
| ||
using System; using System.Collections.Generic; using System.Drawing; using System.Text; using System.Linq; using Alastri.RR.Ui; using Alastri.RR.Service; public class CustomBlastShading : IBlastShading { static List<string> oreParcels = new List<string> { "hg", "mg", "lg" }; public Color GetColor(ShadingContext context) { bool containsOre = false; bool containsWaste = false; foreach(string parcel in context.GetParcels()) { if(oreParcels.Contains(parcel)) { containsOre = true; } else { containsWaste = true; } } if(containsOre && containsWaste) return Color.Yellow; else if(containsOre) return Color.Red; else return Color.Gray; } } |
...