private void ExtractFacetAs(ImageFormat format, string extention) { Cursor.Current = Cursors.WaitCursor; string path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; string name = String.Format("facet0{0}-{1}.{2}", currmapint, Options.MapNames[currmapint], extention); string FileName = Path.Combine(path, name); if (Facet == null || Facet.FileIndex != currmapint) { Facet = new Ultima.Facet(currmap.FileIndex); Facet.Preload(); } if (showMarkersToolStripMenuItem.Checked) { Graphics g = Graphics.FromImage(Facet.Bitmap); foreach (TreeNode obj in OverlayObjectTree.Nodes[currmapint].Nodes) { OverlayObject o = (OverlayObject)obj.Tag; if (o.Visible) o.DrawOnFacet(g); } g.Save(); Facet.Bitmap.Save(FileName, format); Facet.Preload(); } else Facet.Bitmap.Save(FileName, format); Cursor.Current = Cursors.Default; MessageBox.Show(String.Format("Карта была успешно сохранена: {0}", FileName), "Сохраненно", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); }
private void ChangeFacet() { if (ViewMod != ViewModType.Facet) return; Cursor.Current = Cursors.WaitCursor; Facet = new Ultima.Facet(currmap.FileIndex); Facet.Preload(); pictureBox.Invalidate(); Cursor.Current = Cursors.Default; }