コード例 #1
0
        public MainWindow()
        {
            this.InitializeComponent();
            this.Title   = Strings.UninstallerTitleName;
            this.Loaded += new RoutedEventHandler(this.MainWindow_Loaded);
            string path1 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets");

            if (Oem.IsOEMDmm)
            {
                this.mProductLogo.Visibility = Visibility.Hidden;
                this.mUninstallFeedbackUserControl.Visibility = Visibility.Hidden;
                this.mUnInstallFeedbackBackground.Visibility  = Visibility.Hidden;
                this.Width  = 500.0;
                this.Height = 450.0;
                this.mUnInstallBackground.Width  = 400.0;
                this.mUnInstallBackground.Height = 350.0;
                this.Background = (Brush) new SolidColorBrush((System.Windows.Media.Color)ColorConverter.ConvertFromString("#21233A"));
                this.mUnInstallBackground.Source              = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "dmm_bluestacks.png"));
                this.mUnInstallBackground.VerticalAlignment   = VerticalAlignment.Center;
                this.mUnInstallBackground.HorizontalAlignment = HorizontalAlignment.Center;
                this.mUnInstallBackground.Margin              = new Thickness(-10.0, -70.0, -10.0, 0.0);
                this.mUnInstallBackground.Visibility          = Visibility.Visible;
            }
            else if (RegistryManager.Instance.InstallationType == InstallationTypes.GamingEdition)
            {
                this.mUnInstallBackground.Source         = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "gameinstaller_bg.png"));
                this.mUnInstallFeedbackBackground.Source = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "gameinstaller_bg_blurred.png"));
                this.mProductLogo.Source = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "gameinstaller_logo.png"));
                this.Icon = (ImageSource)BitmapFrame.Create(new Uri(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Path.Combine(path1, "app_icon.ico"))));
            }
            else
            {
                this.mUnInstallBackground.Source         = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "installer_bg.png"));
                this.mUnInstallFeedbackBackground.Source = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "installer_bg_blurred.png"));
                this.mProductLogo.Source = (ImageSource)ImageUtils.BitmapFromPath(Path.Combine(path1, "installer_logo.png"));
            }
        }