public static void Run() { // ExStart:ApplyLicenseUsingFile Aspose.Tasks.License license = new Aspose.Tasks.License(); license.SetLicense("Aspose.Tasks.lic"); // ExEnd:ApplyLicenseUsingFile }
protected void Application_Start() { var Key = db.Database.SqlQuery <SYS_CONFIG>("SELECT * FROM SYS_CONFIG WHERE CONFIG_ID = 11").FirstOrDefault(); Aspose.Words.License wordsLicense = new Aspose.Words.License(); wordsLicense.SetLicense(@"" + Key.CONFIG_VALUE); Aspose.Cells.License cellsLicense = new Aspose.Cells.License(); cellsLicense.SetLicense(@"" + Key.CONFIG_VALUE); Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License(); pdfLicense.SetLicense(@"" + Key.CONFIG_VALUE); Aspose.Tasks.License TaskLicense = new Aspose.Tasks.License(); TaskLicense.SetLicense(@"" + Key.CONFIG_VALUE); //AreaRegistration.RegisterAllAreas(); //WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); //BundleConfig.RegisterBundles(BundleTable.Bundles); }
public static void Run() { // ExStart:ApplyLicenseUsingStream Aspose.Tasks.License license = new Aspose.Tasks.License(); FileStream myStream = new FileStream("Aspose.Tasks.lic", FileMode.Open); license.SetLicense(myStream); // ExEnd:ApplyLicenseUsingStream }
public static void Run() { //ExStart:ApplyLicenseUsingStream Aspose.Tasks.License license = new Aspose.Tasks.License(); FileStream myStream = new FileStream("Aspose.Tasks.lic", FileMode.Open); license.SetLicense(myStream); //ExEnd:ApplyLicenseUsingStream }
///<Summary> /// SetAsposeTasksLicense method to Aspose.Tasks License ///</Summary> public static void SetAsposeTasksLicense() { try { Aspose.Tasks.License lic = new Aspose.Tasks.License(); lic.SetLicense(_licenseFileName); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
protected static void CheckLicense(LicenseProvider provider) { try { switch (provider) { case LicenseProvider.Cells: var license1 = new Aspose.Cells.License(); license1.SetLicense(LICENSEPATH); break; case LicenseProvider.Diagram: var license2 = new Aspose.Diagram.License(); license2.SetLicense(LICENSEPATH); break; case LicenseProvider.Pdf: var license3 = new Aspose.Pdf.License(); license3.SetLicense(LICENSEPATH); break; case LicenseProvider.Slides: var license4 = new Aspose.Slides.License(); license4.SetLicense(LICENSEPATH); break; case LicenseProvider.Words: var license5 = new Aspose.Words.License(); license5.SetLicense(LICENSEPATH); break; case LicenseProvider.Tasks: var license6 = new Aspose.Tasks.License(); license6.SetLicense(LICENSEPATH); break; case LicenseProvider.Imaging: var license7 = new Aspose.Imaging.License(); license7.SetLicense(LICENSEPATH); break; } } catch (Exception ex) { WriteLicenseException(ex); } }
///<Summary> /// SetAsposeTasksLicense method to Aspose.Tasks License ///</Summary> public static void SetAsposeTasksLicense() { Aspose.Tasks.License lic = new Aspose.Tasks.License(); lic.SetLicense("Aspose.Total.lic"); }
private void ThisAddIn_Startup(object sender, System.EventArgs e) { Aspose.Tasks.License license = new Aspose.Tasks.License(); license.SetLicense(@"r:\wipviewer2017\asposelic\Aspose.Tasks.lic"); }