// ------------------------------------------------------------------- // CreateCopy // ------------------------------------------------------------------- public SystemEventPage CreateCopy() { NTree <EventCommand> treeCommandsCopy = new NTree <EventCommand>(null); CopyTreeNode(treeCommandsCopy, CommandsTree); return(new SystemEventPage(Graphic.CreateCopy(), GraphicDrawType, Options.CreateCopy(), Trigger, (EventCommandConditions)ConditionsTree.CreateCopy(), treeCommandsCopy)); }
// ------------------------------------------------------------------- // CreateCopy // ------------------------------------------------------------------- public override SuperListItem CreateCopy() { return(new SystemElement(Id, new Dictionary <string, string>(Names), Icon.CreateCopy())); }
// ------------------------------------------------------------------- // CreateCopy // ------------------------------------------------------------------- public override SuperListItem CreateCopy() { return(new SystemTileset(Id, Name, Graphic.CreateCopy(), Collision.CreateCopy(), new List <int>(Autotiles), new List <int>(Reliefs), CreateReliefTopCopy())); }
// ------------------------------------------------------------------- // CreateCopy // ------------------------------------------------------------------- public override SuperListItem CreateCopy() { return new SystemStatistics(Id, new Dictionary<string, string>(Names), Bar.CreateCopy(), AllGameOverOptions.CreateCopy()); }
// ------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------- public DialogPreviewGraphic(SystemGraphic graphic, OptionsKind optionsKind, SystemGraphic graphicTileset = null) { InitializeComponent(); GraphicTileset = graphicTileset; // Control Control = new DialogPreviewGraphicControl(graphic.CreateCopy()); Text = graphic.GraphicKind.ToString() + " graphic preview"; // list listView1.Select(); listView1.HeaderStyle = ColumnHeaderStyle.None; ColumnHeader header = new ColumnHeader(); header.Text = ""; header.Name = ""; listView1.Columns.Add(header); listView1.Columns[0].Width = listView1.Size.Width - 4; listView1.Items[0].Selected = true; List <string> LocalFiles = Control.GetLocalFiles(); List <string> RTPFiles = Control.GetRTPFiles(); for (int i = 0; i < LocalFiles.Count; i++) { listView1.Items.Add(Path.GetFileName(LocalFiles[i]), 0); if (!graphic.IsNone() && graphic.GraphicName == listView1.Items[i + 1].Text && !graphic.IsRTP) { listView1.Items[i + 1].Selected = true; } } for (int i = LocalFiles.Count; i < LocalFiles.Count + RTPFiles.Count; i++) { listView1.Items.Add(Path.GetFileName(RTPFiles[i - LocalFiles.Count]), 1); if (!graphic.IsNone() && graphic.GraphicName == listView1.Items[i + 1].Text && graphic.IsRTP) { listView1.Items[i + 1].Selected = true; } } // Picture PictureBox.SizeMode = PictureBoxSizeMode.StretchImage; PictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; PictureBox.BackColor = WANOK.COLOR_BACKGROUND_PREVIEW_IMAGE; //panelPicture.Controls.Add(PictureBox); TilesetPictureBox.SizeMode = PictureBoxSizeMode.StretchImage; TilesetPictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; TilesetPictureBox.LoadTexture(graphicTileset == null ? new SystemGraphic(GraphicKind.Tileset) : graphicTileset, WANOK.RELATION_SIZE); TilesetPictureBox.BackColor = WANOK.COLOR_BACKGROUND_PREVIEW_IMAGE; if (graphic.IsTileset()) { TilesetPictureBox.SetCurrentTexture((int)graphic.Options[0] * WANOK.BASIC_SQUARE_SIZE, (int)graphic.Options[1] * WANOK.BASIC_SQUARE_SIZE, (int)graphic.Options[2], (int)graphic.Options[3]); } else { TilesetPictureBox.SetCurrentTexture(0, 0, 1, 1); } // Zoom trackBarZoom.Minimum = -ZoomTime; trackBarZoom.Maximum = ZoomTime; // Paint groupBox groupBox1.Paint += MainForm.PaintBorderGroupBox; // Events AddEvent(); }