Exemple #1
0
        /// <summary>
        /// Launch before Application.Current is loaded
        /// </summary>
        /// <param name="args">Command-line argument</param>
        /// <param name="initMainViewModel">Set this to true when PEBakery.Core is used outside of PEBakery</param>
        public static void PreInit(string[] args, bool initMainViewModel)
        {
            // Process arguments
            Args = args;

            // Initialize native libraries
            NativeGlobalInit(AppDomain.CurrentDomain.BaseDirectory);

            // Load BuildDate
            BuildDate = BuildTimestamp.ReadDateTime();

            // Create MainViewModel
            if (initMainViewModel)
            {
                MainViewModel = new MainViewModel();
            }
        }
Exemple #2
0
        /// <summary>
        /// Launch before Application.Current is loaded
        /// </summary>
        /// <param name="args">Command-line argument</param>
        /// <param name="initMainViewModel">Set this to true when PEBakery.Core is used outside of PEBakery</param>
        public static void PreInit(string[] args, bool initMainViewModel)
        {
            // Process arguments
            Args = args;

            // Regsiter Non-Unicode Encodings
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            // Load BuildDate
            BuildDate = BuildTimestamp.ReadDateTime();

            // Initialize native libraries
            NativeGlobalInit(AppDomain.CurrentDomain.BaseDirectory);

            // Create MainViewModel
            if (initMainViewModel)
            {
                MainViewModel = new MainViewModel();
            }
        }
Exemple #3
0
        /// <summary>
        /// Launch before Application.Current is loaded
        /// </summary>
        /// <param name="args">Command-line argument</param>
        /// <param name="initMainViewModel">Set this to true when PEBakery.Core is used outside of PEBakery</param>
        public static void PreInit(string[] args, bool initMainViewModel)
        {
            // Process arguments
            Args = args;

            // Initialize native libraries
            NativeGlobalInit(AppDomain.CurrentDomain.BaseDirectory);

            // Prepare libmagic database
            MagicFile        = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "magic.mgc");
            FileTypeDetector = new FileTypeDetector(MagicFile);

            // Load BuildDate
            BuildDate = BuildTimestamp.ReadDateTime();

            // Create MainViewModel
            if (initMainViewModel)
            {
                MainViewModel = new MainViewModel();
            }
        }