public void OpenProject() { PrimaryProjectUiWorkingContextManagerProxy = TiaStarter.m_ViewApplicationContext.GetPrimaryProjectUiWorkingContextManagerProxy(); PrimaryProjectManagerProxy = PrimaryProjectUiWorkingContextManagerProxy.PrimaryProjectManager; PrimaryProjectManagerProxy.ProjectOpened += PrimaryProjectManagerProxy_ProjectOpened; var proxy = Program.app.TiaProjectManagerProxy; object project = null; //proxy.OpenProjectReadWrite(path, out project); PrimaryProjectManagerProxy.OpenProjectReadWrite(path, out project); }
public void OpenProject() { Console.WriteLine("OpenProject"); PrimaryProjectUiWorkingContextManagerProxy = TiaStarter.m_ViewApplicationContext.GetPrimaryProjectUiWorkingContextManagerProxy(); PrimaryProjectManagerProxy = PrimaryProjectUiWorkingContextManagerProxy.PrimaryProjectManager; PrimaryProjectManagerProxy.ProjectOpened += PrimaryProjectManagerProxy_ProjectOpened; var proxy = TiaStarter.m_BusinessLogicApplicationContext.GetTiaProjectManagerProxy(); object project = null; //proxy.OpenProjectReadWrite(path, out project); try { PrimaryProjectManagerProxy.OpenProjectReadWrite(path, out project); }catch (Exception ex) { Console.WriteLine(ex); } }