Hello.
I'm trying to learn the features available in the Integration API.
The first thing that I'm trying is to close the active sdlxliff file opened in the Editor.
I've created a C# project with a form containing one button.
I've added the following references:
Sdl.Desktop.IntegrationApi
Sdl.Desktop.IntegrationApi.Extensions
Sdl.TranslationStudioAutomation.IntegrationApi
Below is the code written in Form1.cs.
When I run this code, nothing happens (the active file does not close).
What am I missing here?
Thank you in advance.
Tak Osato
====================================================
using System;
using System.IO;
using System.Xml;
using System.Text.RegularExpressions;
using System.Net.NetworkInformation;
using System.Globalization;
using System.Threading;
using System.ComponentModel;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sdl.Desktop.IntegrationApi;
using Sdl.Desktop.IntegrationApi.Extensions;
using Sdl.TranslationStudioAutomation.IntegrationApi;
namespace Trados_SDK_test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
EditorController myEditor = new EditorController();
Document myDoc;
myDoc = myEditor.ActiveDocument;
myEditor.Close(myDoc);
}
}
}
===========================================