private void copyToToolStripMenuItem_Click(object sender, EventArgs e) { if (PreviewListView.SelectedIndices.Count == 0) { return; } if (SaveLibraryDialog.ShowDialog() != DialogResult.OK) { return; } Mir3Library tempLibrary = new Mir3Library(SaveLibraryDialog.FileName); List <int> copyList = new List <int>(); for (int i = 0; i < PreviewListView.SelectedIndices.Count; i++) { copyList.Add(PreviewListView.SelectedIndices[i]); } copyList.Sort(); for (int i = 0; i < copyList.Count; i++) { Mir3Library.Mir3Image image = _library.GetImage(copyList[i]); tempLibrary.AddImage(image.Image, image.OffSetX, image.OffSetY); } tempLibrary.Save(SaveLibraryDialog.FileName); }
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { if (_library == null) { return; } if (SaveLibraryDialog.ShowDialog() != DialogResult.OK) { return; } _library._fileName = SaveLibraryDialog.FileName; _library.Save(_library._fileName); }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { if (SaveLibraryDialog.ShowDialog() != DialogResult.OK) { return; } if (_library != null) { _library.Close(); } _library = new MLibrary(SaveLibraryDialog.FileName); PreviewListView.VirtualListSize = 0; }