예제 #1
0
 private void CheckTranslationStatus(ResourcePack resource)
 {
     this.BackColor = Color.Green;
     foreach (LineInfo info in Lines)
     {
         if (info.Type == LineInfo.LineType.Text&&!string.IsNullOrWhiteSpace(info.TypeValue1))
         {
             BackColor = Color.Red;
             return;
         }
         if (info.Type == LineInfo.LineType.Translate)
         {
             foreach(KeyValuePair<string,Dictionary<string,string>> Language in resource.Languages)
             {
                 if(!Language.Value.ContainsKey(info.TypeValue1)|| Language.Value[info.TypeValue1].Equals(ResourcePack.TAG_UNTRANSLATED))
                 {
                     BackColor = Color.Orange;
                 }
             }
         }
     }
 }
예제 #2
0
 public SignNode(NbtCompound data, string text, ResourcePack resource)
 {
     SignData = data;
     this.Text = text;
     this.BackColor= Color.Green;
     CreateLineInfo();
     CheckTranslationStatus(resource);
 }