private void ExportSchematicFile(ClipboardBuffer buffer)
        {
            var sfd = new SaveFileDialog();

            sfd.Filter           = "TEdit Schematic File|*.TEditSch|Png Image (Real TileColor)|*.png";
            sfd.Title            = "Export Schematic File";
            sfd.InitialDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"My Games\Terraria\Schematics");
            if (!Directory.Exists(sfd.InitialDirectory))
            {
                Directory.CreateDirectory(sfd.InitialDirectory);
            }

            if ((bool)sfd.ShowDialog())
            {
                try
                {
                    ErrorLogging.TelemetryClient?.TrackEvent(nameof(ExportSchematicFile));
                    buffer.Save(sfd.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error Saving Schematic");
                }
            }
        }
Beispiel #2
0
        private void ExportSchematicFile(ClipboardBuffer buffer)
        {
            var sfd = new SaveFileDialog();

            sfd.Filter           = "TEdit Schematic File|*.TEditSch";
            sfd.Title            = "Export Schematic File";
            sfd.InitialDirectory = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"My Games\Terraria\Worlds");
            if ((bool)sfd.ShowDialog())
            {
                buffer.Save(sfd.FileName);
            }
        }
Beispiel #3
0
        private void ExportSchematicFile(ClipboardBuffer buffer)
        {
            var sfd = new SaveFileDialog();

            sfd.Filter           = "TEdit 简图文件|*.TEditSch|Png 图片 (真彩)|*.png";
            sfd.Title            = "导出简图文件";
            sfd.InitialDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"My Games\Terraria\Schematics");
            if (!Directory.Exists(sfd.InitialDirectory))
            {
                Directory.CreateDirectory(sfd.InitialDirectory);
            }

            if ((bool)sfd.ShowDialog())
            {
                try
                {
                    buffer.Save(sfd.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "保存简图失败");
                }
            }
        }