Ejemplo n.º 1
0
        public MainWindow()
        {
            Startup.ClientServices = services =>
            {
                services.Replace(new ServiceDescriptor(typeof(IFileSystem), typeof(FileSystem), ServiceLifetime.Singleton));
                services.Replace(new ServiceDescriptor(typeof(IDesktopWindow), this));
            };
            InitializeComponent();
            CustomToolbar.MouseDown += TopMenuBar_MouseDown;
            Uri imagePath = new Uri("Logo_Watermark.png", UriKind.Relative);

            BackgroundImage.ImageSource = new BitmapImage(imagePath);
            Provider       = Startup.GetProvider();
            DesktopService = Provider.GetService <IDesktopService>();
            AppSettings    = Provider.GetService <IAppSettings>();
            FileSystem     = Provider.GetService <IFileSystem>();
            SubscribeToServiceEvents();
            Startup.DesktopServicesAreReady();
            DesktopService.RunStartup();
        }