Esempio n. 1
0
 private void tabOther1GetHeadCreate_Click(object sender, RoutedEventArgs e)
 {
     if (tell2)
     {
         this.ShowMessageAsync(OtherHelpGetHeadNeedInternet, OtherHelpGetHeadHelp, MessageDialogStyle.Affirmative, new MetroDialogSettings()
         {
             AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel, AnimateShow = true
         });
         tell2 = false;
     }
     else
     {
         if (!tabOther1GetHeadCode.IsChecked.Value)
         {
             string       playerName = tabOther1GetHeadName.Text;
             string       com        = HeadBack(playerName);
             BitmapSource img        = HeadBackImg(playerName);
             Check        checkbox   = new Check();
             checkbox.showTextAndImage(com, playerName, img, tabOther1GetHeadFullBody.IsChecked.Value);
             checkbox.Show();
         }
         else
         {
             string pngURL = tabOther1GetHeadName.Text;
             string com    = "{textures:{SKIN:{url:\"" + pngURL + "\"}}}";
             com = Base64Encode(com);
             string give     = "/give @p minecraft:skull 1 3 {display:{Name:\"Head\"},SkullOwner:{Properties:{textures:[{Value:\"" + com + "\"}]}}}";
             Check  checkbox = new Check();
             checkbox.showText(give, OtherHelpGetHeadTitle + pngURL);
             checkbox.Show();
         }
     }
 }
 private void tabOther1GetHeadCreate_Click(object sender, RoutedEventArgs e)
 {
     if (tell2)
     {
         this.ShowMessageAsync(OtherHelpGetHeadNeedInternet, OtherHelpGetHeadHelp, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel, AnimateShow = true });
         tell2 = false;
     }
     else
     {
         if (!tabOther1GetHeadCode.IsChecked.Value)
         {
             string playerName = tabOther1GetHeadName.Text;
             string com = HeadBack(playerName);
             BitmapSource img = HeadBackImg(playerName);
             Check checkbox = new Check();
             checkbox.showTextAndImage(com, playerName, img, tabOther1GetHeadFullBody.IsChecked.Value);
             checkbox.Show();
         }
         else
         {
             string pngURL = tabOther1GetHeadName.Text;
             string com = "{textures:{SKIN:{url:\"" + pngURL + "\"}}}";
             com = Base64Encode(com);
             string give = "/give @p minecraft:skull 1 3 {display:{Name:\"Head\"},SkullOwner:{Properties:{textures:[{Value:\"" + com + "\"}]}}}";
             Check checkbox = new Check();
             checkbox.showText(give, OtherHelpGetHeadTitle + pngURL);
             checkbox.Show();
         }
     }
 }