コード例 #1
0
 public void ExportText()
 {
     using (var lineExporter = new ScriptExport())
     {
         //TODO(Robin): ???
         var exportCont = new ImportExportController(lineExporter,
                                                     View.CurrentLine.Replace(Environment.NewLine, "\\n"));
         var dialogResult = lineExporter.ShowDialog();
     }
 }
コード例 #2
0
        public void ExportSourceMessageScript(bool allMessages)
        {
            var messageExporter = new ScriptExport();

            try
            {
                var exportCont = new ImportExportController(messageExporter,
                                                            allMessages
                        ? sourceConv.File.CompileFileText()
                        : sourceConv.File.MessageList[sourceConv.MessageIndex].CompileMessage(false));
                messageExporter.ShowDialog();
            }
            catch
            {
                MessageBox.Show("Nothing to export.", "Export Failed", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                messageExporter.Dispose();
            }
        }
コード例 #3
0
        public void ExportMessageScript(bool allMessages)
        {
            var messageExporter = new ScriptExport();

            try
            {
                var exportCont = new ImportExportController(messageExporter,
                                                            allMessages
                        ? MainConversation.File.CompileFileText()
                        : MainConversation.File.MessageList[MainConversation.MessageIndex].CompileMessage(false));
                messageExporter.ShowDialog();
            }
            catch
            {
                //TODO(Robin): Better logging
                MessageBox.Show("Nothing to export.", "Export Failed", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                messageExporter.Dispose();
            }
        }