当前位置: 首页>>代码示例>>C#>>正文


C# Item.ShowDialog方法代码示例

本文整理汇总了C#中Item.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Item.ShowDialog方法的具体用法?C# Item.ShowDialog怎么用?C# Item.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


在下文中一共展示了Item.ShowDialog方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FrameGetItemBtn_Click

 private void FrameGetItemBtn_Click(object sender, RoutedEventArgs e)
 {
     AllSelData asd = new AllSelData();
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     int[] temp2 = itembox.returnStrAdver();
     globalFrameItem[0] = temp2[1].ToString();//count
     globalFrameItem[1] = temp2[2].ToString();//damage
     globalFrameItem[2] = asd.getItem(temp2[0]);//id
     globalFrameItem[3] = temp[10];//tag
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:12,代码来源:Summon.xaml.cs

示例2: tabSummonEnchantGetBtn_Click

 private void tabSummonEnchantGetBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     if (temp[0] != "ench:[]")
     {
         globalEnchString = temp[0];
     }
     if (temp[1] != "display:{}")
     {
         globalNLString = temp[1];
     }
     if (temp[2] != "AttributeModifiers:[]")
     {
         globalAttrString = temp[2];
     }
     if (temp[3] != "")
     {
         globalAttrStringLess = temp[3];
     }
     if (temp[4] != "")
     {
         globalUnbreaking = temp[4];
         try
         {
             if (temp[4].Split(':')[1] == "1") { tabSummonUnbreaking.IsChecked = true; }
         } catch (System.Exception) { }
     }
     int[] temp2 = itembox.returnStrAdver();
     if (temp2[0] != 0)
     {
         tabSummonItem.SelectedIndex = temp2[0];
     }
     if (temp2[1] != 1)
     {
         tabSummonCount.Value = temp2[1];
     }
     if (temp2[2] != 0)
     {
         tabSummonMeta.Value = temp2[2];
     }
     if (temp2[3] != 0)
     {
         tabSummonHide.SelectedIndex = temp2[3];
     }
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:47,代码来源:Summon.xaml.cs

示例3: tabVillagerGetBackMeta

 private string[] tabVillagerGetBackMeta(string where2use)
 {
     int id = 0;
     int count = 1;
     int damage = 0;
     globalEnchString = "";
     globalNLString = "";
     globalAttrString = "";
     globalUnbreaking = "";
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     int[] temp2 = itembox.returnStrAdver();
     id = temp2[0];
     count = temp2[1];
     damage = temp2[2];
     if (temp[0] != "ench:[]")
     {
         globalEnchString = temp[0];
     }
     if (temp[1] != "display:{}")
     {
         globalNLString = temp[1];
     }
     if (temp[2] != "AttributeModifiers:[]")
     {
         globalAttrString = temp[2];
     }
     if (temp[4] != "")
     {
         globalUnbreaking = temp[4];
     }
     if (temp[5] != "")
     {
         globalHideflag = temp[5];
     }
     string meta = "";
     if (globalEnchString != "") meta += globalEnchString + ",";
     if (globalNLString != "") meta += globalNLString + ",";
     if (globalAttrString != "") meta += globalAttrString + ",";
     if (globalUnbreaking != "") meta += globalUnbreaking + ",";
     if (globalHideflag != "") meta += globalHideflag + ",";
     if (temp[8] != "") meta += temp[8] + ",";
     if (temp[9] != "") meta += temp[9] + ",";
     if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "" || temp[8] != "" || temp[9] != "")
     {
         if (meta.Length >= 1)
         {
             meta = meta.Remove(meta.Length - 1, 1);
         }
     }
     int[] itemboxreturn = itembox.returnStrAdver();
     if (where2use == "MainHand") { sumosEquipmentMainHandId = itemboxreturn[0]; sumosEquipmentMainHandCount = itemboxreturn[1]; sumosEquipmentMainHandDamage = itemboxreturn[2]; }
     else if (where2use == "OffHand") { sumosEquipmentOffHandId = itemboxreturn[0]; sumosEquipmentOffHandCount = itemboxreturn[1]; sumosEquipmentOffHandDamage = itemboxreturn[2]; }
     else if (where2use == "Head") { sumosEquipmentHeadId = itemboxreturn[0]; sumosEquipmentHeadCount = itemboxreturn[1]; sumosEquipmentHeadDamage = itemboxreturn[2]; }
     else if (where2use == "Chest") { sumosEquipmentChestId = itemboxreturn[0]; sumosEquipmentChestCount = itemboxreturn[1]; sumosEquipmentChestDamage = itemboxreturn[2]; }
     else if (where2use == "Leg") { sumosEquipmentLegId = itemboxreturn[0]; sumosEquipmentLegCount = itemboxreturn[1]; sumosEquipmentLegDamage = itemboxreturn[2]; }
     else if (where2use == "Boot") { sumosEquipmentBootId = itemboxreturn[0]; sumosEquipmentBootCount = itemboxreturn[1]; sumosEquipmentBootDamage = itemboxreturn[2]; }
     else if (where2use == "Item") { }
     string[] remeta = { id.ToString(), count.ToString(), damage.ToString(), meta };
     return remeta;
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:62,代码来源:Summon.xaml.cs

示例4: HorseItemGet

 private string[] HorseItemGet()
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     int[] temp0 = itembox.returnStrAdver();
     AllSelData asd = new AllSelData();
     if (temp[10] == string.Empty)
     {
         return new string[] { asd.getItem(temp0[0]), temp0[1].ToString(), temp0[2].ToString(), string.Empty };
     }
     else
     {
         return new string[] { asd.getItem(temp0[0]), temp0[1].ToString(), temp0[2].ToString(), ",tag:{" + temp[10] + "}" };
     }
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:16,代码来源:Summon.xaml.cs

示例5: btnEdit_Click

        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridViewX1.SelectedRows.Count != 1)
                return;

            Item it = new Item(DataRowList[dataGridViewX1.SelectedRows[0].Index], filterOrganizers.Items);
            string log_before  = "原 學年度:" + it._cir.SchoolYear + ",學期:" + it._cir.Semester + ",日期:" + it._cir.OccurDate + ",事由:" + it._cir.Reason + ",時數:" + it._cir.ExpectedHours + ",主辦單位:" + it._cir.Organizers + ",備註:" + it._cir.Remark;
            if (it.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                it._cir.Save();
                if (it._cir.SchoolYear != int.Parse(filterSchoolYear.Text) || it._cir.Semester != int.Parse(filterSemester.Text))
                {
                    dataGridViewX1.Rows.RemoveAt(dataGridViewX1.SelectedRows[0].Index);
                    DataRowList.Remove(it._cir);
                }
                ApplicationLog.Log("服務學習線上開設", "修改項目", "修改一筆\n"+log_before
                    +"\n後 學年度:" + it._cir.SchoolYear + ",學期:" + it._cir.Semester + ",日期:" + it._cir.OccurDate + ",事由:" + it._cir.Reason + ",時數:" + it._cir.ExpectedHours + ",主辦單位:" + it._cir.Organizers + ",備註:" + it._cir.Remark);
                //RunSelect();
            }
        }
开发者ID:ischool-desktop,项目名称:K12.Service.Learning.CreationItems,代码行数:20,代码来源:CreatioItems.cs

示例6: tabSumosEEnderman_Click

 private void tabSumosEEnderman_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     int[] itemboxreturn = itembox.returnStrAdver();
     sumosEndermanCarried = itemboxreturn[0];
     sumosEndermanCarriedMeta = itemboxreturn[2];
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:8,代码来源:Summon.xaml.cs

示例7: btnNew_Click

 private void btnNew_Click(object sender, EventArgs e)
 {
     Item it = new Item(new CreationItemsRecord()
     {
         RegistStartTime = DateTime.Now,
         RegistEndTime = DateTime.Now,
         SchoolYear = int.Parse(filterSchoolYear.Text),
         Semester = int.Parse(filterSemester.Text),
         Organizers = filterOrganizers.Text
     }, filterOrganizers.Items);
     if (it.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         it._cir.CreateBy = FISCA.Authentication.DSAServices.UserAccount;
         it._cir.Save();
         //if (it._cir.SchoolYear == int.Parse(filterSchoolYear.Text) && it._cir.Semester == int.Parse(filterSemester.Text) )
         //    DataRowList.Add(it._cir);
         if (!filterOrganizers.Items.Contains(it._cir.Organizers))
             filterOrganizers.Items.Add(it._cir.Organizers);
         ApplicationLog.Log("服務學習線上開設", "新增項目", "新增一筆\n學年度:" + it._cir.SchoolYear + ",學期:" + it._cir.Semester + ",日期:" + it._cir.OccurDate + ",事由:" + it._cir.Reason + ",時數:" + it._cir.ExpectedHours + ",主辦單位:" + it._cir.Organizers + ",備註:" + it._cir.Remark);
         RunSelect();
     }
     
 }
开发者ID:ischool-desktop,项目名称:K12.Service.Learning.CreationItems,代码行数:23,代码来源:CreatioItems.cs

示例8: attrBtn_Click

 private void attrBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     if (temp[0] != "ench:[]")
     {
         globalEnchString = temp[0];
     }
     if (temp[1] != "display:{}")
     {
         globalNLString = temp[1];
     }
     if (temp[2] != "AttributeModifiers:[]")
     {
         globalAttrString = temp[2];
     }
     if (temp[4] == "Unbreakable:1")
     {
         tabRItemUnbreaking.IsChecked = true;
     }
     int[] temp2 = itembox.returnStrAdver();
     if (temp2[0] != 0)
     {
         tabRItemItem.SelectedIndex = temp2[0];
     }
     tabRItemCount.Value = temp2[1];
     tabRItemMeta.Value = temp2[2];
     tabRItemHide.SelectedIndex = temp2[3];
     enchantStrBox.Text = globalEnchString;
     NLStrBox.Text = globalNLString;
     AttrStrBox.Text = globalAttrString;
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:33,代码来源:ReplaceItem.xaml.cs

示例9: bHEShowItem_Click

 private void bHEShowItem_Click(object sender, RoutedEventArgs e)
 {
     AllSelData asd = new AllSelData();
     Item itembox = new Item();
     itembox.ShowDialog();
     int[] temp1 = itembox.returnStrAdver();
     string[] temp2 = itembox.returnStr();
     string strHead = "";
     string str = "tag:{" + temp2[0] + "," + temp2[1] + "," + temp2[2] + "," + temp2[4] + "," + temp2[5] + "," + temp2[8] + "," + temp2[9] + "}}";
     for (int i = 0; i < 3; i++)
     {
         str = str.Replace(",,", ",");
     }
     if (rbBook.IsChecked.Value) { str = str.Replace("\"", "\\\\\\\""); strHead = "{id:\\\\\\\"" + asd.getItem(temp1[0]) + "\\\\\\\",Count:" + temp1[1] + "b,Damage:" + temp1[2] + "s,"; } else { str = str.Replace("\"", "\\\""); strHead = "{id:\\\"" + asd.getItem(temp1[0]) + "\\\",Count:" + temp1[1] + "b,Damage:" + temp1[2] + "s,"; }
     tHEShowItem.Text = strHead + str;
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:16,代码来源:Tellraw.xaml.cs

示例10: backItemCom

 private string backItemCom(ComboBox needChooseIndexComboBox, int whichIndex)
 {
     string whichItems = "";
     string globalEnchString = "";
     string globalNLString = "";
     string globalAttrString = "";
     string globalUnbreaking = "";
     string globalHideflag = "";
     int globalItemSel = 0;
     int globalItemCount = 0;
     int globalItemMeta = 0;
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] tempa = itembox.returnStr();
     int[] tempb = itembox.returnStrAdver();
     if (tempa[0] != "ench:[]")
     {
         globalEnchString = tempa[0];
     }
     if (tempa[1] != "display:{}")
     {
         globalNLString = tempa[1];
     }
     if (tempa[2] != "AttributeModifiers:[]")
     {
         globalAttrString = tempa[2];
     }
     if (tempa[4] != "")
     {
         globalUnbreaking = tempa[4];
     }
     if (tempa[5] != "")
     {
         globalHideflag = tempa[5];
     }
     if (tempb[0] != 0)
     {
         globalItemSel = tempb[0];
     }
     globalItemCount = tempb[1];
     globalItemMeta = tempb[2];
     //
     AllSelData asd = new AllSelData();
     needChooseIndexComboBox.SelectedIndex = globalItemSel;
     if (globalItemSel != 0)
     {
         int index = whichIndex - 1;
         whichItems = "" + index + ":{Slot:" + index + "b,id:\"" + asd.getItem(globalItemSel) + "\",Count:" + globalItemCount + "b,Damage:" + globalItemMeta + "s";
         if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "")
         {
             whichItems += ",tag:{";
             if (globalEnchString != "")
             {
                 whichItems += globalEnchString + ",";
             }
             if (globalNLString != "")
             {
                 whichItems += globalNLString + ",";
             }
             if (globalAttrString != "")
             {
                 whichItems += globalAttrString + ",";
             }
             if (globalUnbreaking != "")
             {
                 whichItems += globalUnbreaking + ",";
             }
             if (globalHideflag != "")
             {
                 whichItems += globalHideflag + ",";
             }
             if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "")
             {
                 whichItems = whichItems.Remove(whichItems.Count() - 1, 1);
             }
             whichItems += "}}";
         }
         else
         {
             whichItems += "}";
         }
     }
     else
     {
         whichItems = "";
     }
     return whichItems;
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:88,代码来源:CustomCraft.xaml.cs

示例11: getBlockBtn_Click

 private void getBlockBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     int[] temp = itembox.returnStrAdver();
     if (temp[0] != 0)
     {
         itemSel.SelectedIndex = temp[0];
     }
     blockData.Value = temp[2];
 }
开发者ID:IceLitty,项目名称:Minecraft-Command-Helper,代码行数:11,代码来源:Testfor.xaml.cs


注:本文中的Item.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。