using System; using System.IO; using System.Xml; using System.Diagnostics; using System.Threading; using ThomsonReuters.Eikon.Integration; using EikonDesktopDataAPI; /* * WARNING: This App Studio template does not contain the nuget packages. Right-click on the solution, select * "Enable NuGet Package Restore" and select Yes. After that select Build, Build Solution in the Visual Studio menu bar. * * NuGet will do restore the missing packages. * */ namespace AppStudioApp1 { /// /// An App Studio application template. The attribute specifies the main control of your app. /// [EikonAppStart] public partial class MainControl { EikonDesktopDataAPI.EikonDesktopDataAPI _edapi; #region IAppHost public IAppHost AppHost { get; private set; } /// The default constructor. public MainControl() { InitializeComponent(); _edapi = new EikonDesktopDataAPI.EikonDesktopDataAPI(); _edapi.OnStatusChanged += OnStatusChanged; try { var edapiResult = _edapi.Initialize(); } catch (Exception ex) { } } void OnStatusChanged(EEikonStatus status) { if (status != EEikonStatus.Connected) { return; } try { var dex2 = _edapi.CreateDex2Mgr(); } catch (Exception ex) { } } /// The default entry point for the app, when the user opens it from the App Library. /// An instance of encapulating the App Studio integration services. public MainControl(IAppHost appHost) : this() { AppHost = appHost; AppHost.Closing += AppHostOnClosing; } /// The entry point for the app, opened as a part of a saved workspace with the state, that you have previously serialized. /// An instance of encapulating the App Studio integration services. /// An instance of with the previously serialized state. public MainControl(IAppHost appHost, XmlReader settingsReader) : this(appHost) { } /// The entry point for the app, opened from the Related right-click menu or other navigation operation. /// An instance of encapulating the App Studio integration services. /// An instance of providing an identifier and other properties for one or many instruments in the context. public MainControl(IAppHost appHost, IContext context) : this(appHost) { } /// The event handler. /// An instance of encapulating the App Studio integration services. /// Closing event arguments. private void AppHostOnClosing(object sender, ClosingEventArgs closingEventArgs) { } #endregion } }