Exemplo n.º 1
0
        public void setShow()//展示全部的数据
        {
            //try
            //{
            //    pictureBoxdisplay.Image = TmpItem.UseTemp.DemoImage;
            //}
            //catch
            //{
            //    pictureBoxdisplay.Image = Properties.Resources.nomal_image;
            //}
            pictureBoxdisplay.Image = TmpItem.GetImage.DemoImage;

            labelSize.Text = TmpItem.GetImage.VirtualSize.Width.ToString() + '*' + TmpItem.GetImage.VirtualSize.Height.ToString();

            toolTip1.SetToolTip(labelT2, "This Templare is Made By " + TmpItem.UseTemp.Author);
            //展示数据
            flowLayoutPanelShow.Controls.Clear();
            UCSettingItem uC;

            foreach (ModSet ms in TmpItem.Data)
            {
                uC = new UCSettingItem(ms, ChangeText, DelectModSetin);
                flowLayoutPanelShow.Controls.Add(uC);
            }
        }
Exemplo n.º 2
0
        private void addCustomStuffToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmModSet modSet = new FrmModSet(MSetins, lang);

            if (modSet.ShowDialog() == DialogResult.OK)
            {
                if (TmpItem.Data.Find(x => x.Setin.Name == modSet.NowSelect.Name) != null)
                {
                    MessageBox.Show("It Have Same Stuff in this Items");
                    return;
                }
                ModSet ms = new ModSet()
                {
                    Setin      = modSet.NowSelect,
                    valuenomal = modSet.NowSelect.valuenomal,
                    Value      = modSet.NowSelect.valuenomal,
                };
                TmpItem.Data.Add(ms);
                UCSettingItem uC = new UCSettingItem(ms, ChangeText, DelectModSetin);
                flowLayoutPanelShow.Controls.Add(uC);
                flowLayoutPanelShow.ScrollControlIntoView(uC);
            }
        }