string[] tempPath; ArrayList pathList = new ArrayList(); bool flag; private void Form1_Load(object sender, EventArgs e) { this.sourceListView.View = View.LargeIcon; this.SourceImageList.ImageSize = new Size(120, 120); this.sourceListView.LargeImageList = this.SourceImageList; DirectoryInfo dir = new DirectoryInfo("Images/"); var fileCount = (from file in Directory.EnumerateFiles("Images/", "*.bmp", SearchOption.AllDirectories) select file).Count(); foreach (FileInfo file in dir.GetFiles("*.bmp", SearchOption.AllDirectories)) { this.SourceImageList.Images.Add(Image.FromFile(file.FullName)); } for (int j = 0; j < this.SourceImageList.Images.Count; j++) { ListViewItem item = new ListViewItem(); item.ImageIndex = j; this.sourceListView.Items.Add(item); } } private void listView2_MouseDoubleClick(object sender, MouseEventArgs e) { this.DestinationListView.View = View.LargeIcon; this.DestinationListView.LargeImageList = this.DestinationImageList; ListViewItem[] sel = new ListViewItem[1]; sel[0] = sourceListView.SelectedItems[0]; ListViewItem dragItem = sel[0]; DestinationImageList.ImageSize = new Size(256, 150); // Want to more then this size that cover my whole panel. this.DestinationImageList.Images.Add(SourceImageList.Images[dragItem.Index]); this.DestinationImageList.Images.RemoveAt(DestinationImageList.Images.Count - 1); DestinationListView.Items.Clear(); for (int j = 0; j < this.DestinationImageList.Images.Count; j++) { ListViewItem item = new ListViewItem(); item.ImageIndex = j; this.DestinationListView.Items.Add(item); } DestinationListView.Refresh(); sourceListView.Refresh(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)