示例#1
0
        private void ActionAddTexture()
        {
            using (var dialog = new TextureEditDialog(this.textTexRootDir.Text))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    var item = new ListViewItem();

                    item.Text = dialog.TextureID;
                    item.SubItems.Add(dialog.TextureFile);

                    this.listTexList.Items.Add(item);
                }
            }
        }
示例#2
0
        private void ActionEditTexture()
        {
            if (this.listTexList.SelectedItems.Count == 0)
                return;

            var item = this.listTexList.SelectedItems[0];
            using (var dialog = new TextureEditDialog(this.textTexRootDir.Text))
            {
                dialog.TextureID = item.SubItems[0].Text;
                dialog.TextureFile = item.SubItems[1].Text;
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    item.SubItems[0].Text = dialog.TextureID;
                    item.SubItems[1].Text = dialog.TextureFile;
                }
            }
        }