Interaction logic for IntroductionView.xaml
Inheritance: System.Windows.Controls.UserControl
Beispiel #1
0
        public MainWindow(IInstallerFactory installerFactory, Version version, Action exit, string logPath)
        {
            _installerFactory = installerFactory;
            _exit             = exit;
            _logPath          = logPath;

            InitializeComponent();
            Title      += " " + version.ToString(3) + " installer";
            DataContext = this;

            var introductionView = new IntroductionView();

            introductionView.OnInstall += (sender, args) =>
            {
                var progress = StartInstallation(installerFactory);
                InnerContent = progress;
            };

            introductionView.OnCancel += (sender, args) =>
            {
                Cancel();
            };

            InnerContent = introductionView;
        }
        public MainWindow(IInstallerFactory installerFactory, Version version, Action exit, string logPath)
        {
            _installerFactory = installerFactory;
            _exit = exit;
            _logPath = logPath;

            InitializeComponent();
            Title += " " + version.ToString(3) + " beta installer";
            DataContext = this;

            var introductionView = new IntroductionView();
            introductionView.OnInstall += (sender, args) =>
            {
                var progress = StartInstallation(installerFactory);
                InnerContent = progress;
            };

            introductionView.OnCancel += (sender, args) =>
            {
                Cancel();
            };

            InnerContent = introductionView;
        }