private void Form1_Load(object sender, EventArgs e) { #if DEBUG this.vm.LoadAssets(Directory.GetCurrentDirectory() + "\\..\\..\\..\\win95"); foreach (var vmElement in this.vm.Elements) { var control = new ElementControlView(vmElement, this.Redraw); this.flowLayoutPanel1.Controls.Add(control); } this.Redraw(); #endif }
private void Form1_DragDrop(object sender, DragEventArgs e) { var dirPath = ((Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString(); if (!Directory.Exists(dirPath)) { return; } this.vm.LoadAssets(dirPath); foreach (var vmElement in this.vm.Elements) { var control = new ElementControlView(vmElement, this.Redraw); this.flowLayoutPanel1.Controls.Add(control); } this.Redraw(); }