private PaddleProduct Paddle_GetProduct(PaddleProductID productID) { PaddleProduct product = PaddleProduct.CreateProduct( productID.ToString(), PaddleSDK.Product.ProductType.SDKProduct, Paddle_GetConfig(productID)); product.CanForceExit = false; return(product); }
public MainWindow() { InitializeComponent(); var productInfo = new PaddleProductConfig { ProductName = "Scraptelligence", VendorName = "Scraptelligence" }; Paddle.Configure(paddle_apiKey, paddle_vendorId, paddle_productId, productInfo); Paddle.Instance.TransactionCompleteEvent += Paddle_TransactionCompleteEvent; Paddle.Instance.TransactionErrorEvent += Paddle_TransactionErrorEvent; Paddle.Instance.TransactionBeginEvent += Paddle_TransactionBeginEvent; PaddleProduct product = PaddleProduct.CreateProduct(paddle_productId); product.Refresh((success) => { if (success) { if (!product.Activated) { Paddle.Instance.ShowProductAccessWindowForProduct(product); } } else { Paddle.Instance.ShowProductAccessWindowForProduct(product); } }); // Initialize logger Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .WriteTo.File("logs\\Log.log") .CreateLogger(); Log.Information("Starting Scraptelligence"); _showInstagramFollowers = false; myWorker.DoWork += BackgroundWork; myWorker.RunWorkerCompleted += BackgroundCompleted; StartButton.Background = Brushes.DarkSeaGreen; string copyrightText = string.Format("Copyright © {0}, Scrapetelligence", DateTime.Now.Year.ToString()); CopyrightLabel.Content = copyrightText; }