Пример #1
0
        public void Copy()
        {
            EditorIniData data = new EditorIniData(this.Data.TemplateIndex);

            foreach (TableBlock tableData in this.objectListView1.SelectedObjects)
            {
                data.Blocks.Add(tableData.Block);
            }

            Clipboard.Copy(data, typeof(EditorIniData));

            this.OnDocumentChanged(this);
        }
Пример #2
0
        public void Paste()
        {
            EditorIniData editorData = (EditorIniData)Clipboard.Paste(typeof(EditorIniData));

            if (editorData.TemplateIndex == this.Data.TemplateIndex)
            {
                int id = this.GetNewBlockId();

                List <TableBlock> blocks = new List <TableBlock>();
                for (int i = 0; i < editorData.Blocks.Count; ++i)
                {
                    blocks.Add(new TableBlock(id + i, this.Data.MaxId++, editorData.Blocks[i], this.Data.TemplateIndex));
                }

                this.AddBlocks(blocks);
            }
        }
Пример #3
0
 public bool CanPaste() => Clipboard.CanPaste(typeof(EditorIniData));
Пример #4
0
 public bool CanPaste()
 {
     return(Clipboard.CanPaste(typeof(EditorINIData)));
 }