Esempio n. 1
0
        public static string Find()
        {
            EplanFinder      EplanFinder = new EplanFinder();
            string           DllPath     = EplanFinder.SelectEplanVersion();
            AssemblyResolver Resolver    = new AssemblyResolver();

            Resolver.SetEplanBinPath(DllPath);
            Resolver.PinToEplan();
            return(DllPath);
        }
Esempio n. 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Use the finder to find the correct eplan version if not yet known
            EplanFinder oEplanFinder = new EplanFinder();
            String      strBinPath   = oEplanFinder.SelectEplanVersion();

            // Check if user has selected P8 version
            if (String.IsNullOrEmpty(strBinPath))
            {
                return;
            }

            // Now use the Assemblyresolver to let the program know where all eplan assemblies can be found.
            AssemblyResolver oResolver = new AssemblyResolver();

            oResolver.SetEplanBinPath(strBinPath);
            // Pin to eplan does the actual preparation. All referenced eplan assemblies are loaded from the bin path.
            oResolver.PinToEplan();

            Application.Run(new Form1());
        }