示例#1
0
        void App_Startup(object sender, StartupEventArgs e)
        {
            Phlib.InitializePhLib();

            BinaryCache.Instance.Load();

            MainWindow mainWindow = new MainWindow();

            mainWindow.IsMaster = true;

            switch (Phlib.GetClrPhArch())
            {
            case CLRPH_ARCH.x86:
                mainWindow.Title = "Dependencies (x86)";
                break;

            case CLRPH_ARCH.x64:
                mainWindow.Title = "Dependencies (x64)";
                break;

            case CLRPH_ARCH.WOW64:
                mainWindow.Title = "Dependencies (WoW64)";
                break;
            }

            mainWindow.Show();


            // Process command line args
            if (e.Args.Length > 0)
            {
                mainWindow.OpenNewDependencyWindow(e.Args[0]);
            }
        }
示例#2
0
        void App_Startup(object sender, StartupEventArgs e)
        {
            (Application.Current as App).PropertyChanged += App_PropertyChanged;

            Phlib.InitializePhLib();

            // Load singleton for binary caching
            if (Dependencies.BinaryCacheOption.GetGlobalBehaviour() == Dependencies.BinaryCacheOption.BinaryCacheOptionValue.Yes)
            {
                string ApplicationLocalAppDataPath = Path.Combine(
                    Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
                    "Dependencies"
                    );
                BinaryCache.Instance = new BinaryCacheImpl(ApplicationLocalAppDataPath, 200);
            }
            else
            {
                BinaryCache.Instance = new BinaryNoCacheImpl();
            }

            BinaryCache.Instance.Load();


            // https://www.red-gate.com/simple-talk/blogs/wpf-menu-displays-to-the-left-of-the-window/
            SetDropDownMenuToBeRightAligned();

            mainWindow          = new MainWindow();
            mainWindow.IsMaster = true;

            switch (Phlib.GetClrPhArch())
            {
            case CLRPH_ARCH.x86:
                mainWindow.Title = "Dependencies (x86)";
                break;

            case CLRPH_ARCH.x64:
                mainWindow.Title = "Dependencies (x64)";
                break;

            case CLRPH_ARCH.WOW64:
                mainWindow.Title = "Dependencies (WoW64)";
                break;
            }

            mainWindow.Show();



            // Process command line args
            if (e.Args.Length > 0)
            {
                mainWindow.OpenNewDependencyWindow(e.Args[0]);
            }
        }