Exemple #1
0
        public static List <EplanData> GetInstalledEplanInstances()
        {
            EplanFinder      eplanFinder   = new EplanFinder();
            List <EplanData> eplanVersions = new List <EplanData>();

            eplanFinder.GetInstalledEplanVersions(ref eplanVersions, true);
            return(eplanVersions);
        }
Exemple #2
0
        public static string Find()
        {
            EplanFinder      EplanFinder = new EplanFinder();
            string           DllPath     = EplanFinder.SelectEplanVersion();
            AssemblyResolver Resolver    = new AssemblyResolver();

            Resolver.SetEplanBinPath(DllPath);
            Resolver.PinToEplan();
            return(DllPath);
        }
Exemple #3
0
      /// <summary>
      /// Returns all installed EPLAN instances
      /// </summary>
      /// <returns></returns>
      public static List<EplanData> GetEplanInstallations()
      {
         List<EplanData> eplanVersions = new List<EplanData>();

         var eplanFinder = new EplanFinder();

         List<EplanData> eplanVersions32Bit = new List<EplanData>();
         eplanFinder.GetInstalledEplanVersions(ref eplanVersions32Bit);
         eplanVersions.AddRange(eplanVersions32Bit);

         List<EplanData> eplanVersions64Bit = new List<EplanData>();
         eplanFinder.GetInstalledEplanVersions(ref eplanVersions64Bit, true);
         eplanVersions.AddRange(eplanVersions64Bit);

         eplanVersions = new List<EplanData>(eplanVersions.OrderBy(obj => obj.EplanVersion));
         return eplanVersions;
      }
Exemple #4
0
        /// <summary>
        /// Returns all installed EPLAN instances
        /// </summary>
        /// <returns></returns>
        public static List <EplanData> GetEplanInstallations()
        {
            List <EplanData> eplanVersions = new List <EplanData>();

            var eplanFinder = new EplanFinder();

            List <EplanData> eplanVersions32Bit = new List <EplanData>();

            eplanFinder.GetInstalledEplanVersions(ref eplanVersions32Bit);
            eplanVersions.AddRange(eplanVersions32Bit);

            List <EplanData> eplanVersions64Bit = new List <EplanData>();

            eplanFinder.GetInstalledEplanVersions(ref eplanVersions64Bit, true);
            eplanVersions.AddRange(eplanVersions64Bit);

            eplanVersions = new List <EplanData>(eplanVersions.OrderBy(obj => obj.EplanVersion));
            return(eplanVersions);
        }
Exemple #5
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());
        }