public OrderPdfExport(Biller.UI.ViewModel.MainWindowViewModel MainWindowViewModel, Settings.ViewModel parentViewModel)
 {
     ParentViewModel = parentViewModel;
     this.MainWindowViewModel = MainWindowViewModel;
     PreviewElement = new MigraDoc.Rendering.Windows.DocumentPreview();
     PrintDialog = new System.Windows.Forms.PrintDialog();
     kgUnit = new Biller.Core.Utils.Unit() { DecimalDigits = 3, DecimalSeperator = ",", Name = "Kilogramm", ShortName = "kg", ThousandSeperator = "" };
 }
        public void Activate()
        {
            var vm = new Export.Settings.ViewModel(this);
            internalViewModels.Add(vm);

            ParentViewModel.DocumentTabViewModel.AddDocumentFactory(new Invoice.InvoiceFactory());
            ParentViewModel.DocumentTabViewModel.AddDocumentFactory(new Docket.DocketFactory());
            ParentViewModel.DocumentTabViewModel.AddDocumentFactory(new Offer.OfferFactory());
            ParentViewModel.SettingsTabViewModel.RegisteredExportClasses.Add(new Export.OrderPdfExport(ParentViewModel, vm));
            ParentViewModel.SettingsTabViewModel.SettingsList.Add(new Export.Settings.SettingsTab { DataContext =  vm});
            ParentViewModel.UpdateManager.Register(new Biller.Core.Models.AppModel() { Title = Name, Description = Description, GuID = ((GuidAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), true)[0]).Value.ToLower(), Version = 1.20140828, UpdateSource = "https://raw.githubusercontent.com/LastElb/OrderTypes-Biller/master/update.json" });
        }