public override void GetMainMenu(string menuName, MenuBuilder mb) { if (menuName == "tools" && LicenseTool.FeatureAllowed(VersionedDbFeature.Test)) { mb.AddItem("s_version_db", CreateVersionDbWindow); } }
public override void GetMainMenu(string menuName, MenuBuilder mb) { if (menuName == "tools" && LicenseTool.FeatureAllowed(DbStructSynchronizationFeature.Test)) { mb.AddItem("s_synchronize_structure", SynchronizeStructureForm.RunNoParam); } }
public override void GetMainMenu(string menuName, MenuBuilder mb) { if (menuName == "tools" && LicenseTool.FeatureAllowed(DataSynchronizationFeature.Test)) { mb.AddItem("s_synchronize_data", ShowDataSynWindow); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; try { string email = context.Request.Params["email"]; string name = context.Request.Params["name"]; string check = context.Request.Params["check"]; string product = context.Request.Params["product"]; if (check != "vertex5L34") { throw new Exception("Bad code"); } LicenseData licdata = new LicenseData(); string license = LicenseTool.CreateLicense(name, email, "name", product + "-eval", null, licdata); context.Response.Write(license); } catch (Exception err) { context.Response.Write(err.Message); } }
public override void GetToolbarItems(string toolbarName, List <ToolStripItem> items) { if (toolbarName == "main" && LicenseTool.FeatureAllowed(VersionedDbFeature.Test)) { var btn = new ToolStripButton(Texts.Get("s_version_db"), CoreIcons.versiondb); btn.Click += new EventHandler(btn_Click); items.Add(btn); } }
public override void GetToolbarItems(string toolbarName, List <ToolStripItem> items) { if (toolbarName == "main" && LicenseTool.FeatureAllowed(DataSynchronizationFeature.Test)) { var btn = new ToolStripButton(Texts.Get("s_data_synchronization"), DataSynIcons.sync); btn.Click += new EventHandler(btn_Click); items.Add(btn); } }
public static void Run(IDatabaseSource src, IDatabaseSource dst, SynchronizeExtData extData) { if (!LicenseTool.FeatureAllowedMsg(DbStructSynchronizationFeature.Test)) { return; } SynchronizeStructureForm win = new SynchronizeStructureForm(src, dst, extData); win.Show(); }
public override void GetToolbarItems(string toolbarName, List <ToolStripItem> items) { if (toolbarName == "query" && LicenseTool.FeatureAllowed(QueryHistoryFeature.Test)) { var btn = new ToolStripButton(Texts.Get("s_query_history"), CoreIcons.history); btn.Click += new EventHandler(btn_Click); btn.DisplayStyle = ToolStripItemDisplayStyle.Image; items.Add(btn); } }
public override void GetAdditionalWidgets(List <IWidget> res, AppObject appobj) { var da = appobj as DatabaseAppObject; if (LicenseTool.FeatureAllowed(MsSqlBackupFeature.Test) && da != null) { res.Add(new MsSqlBackupsWidget()); } if (da != null) { res.Add(new MsSqlTableSizesWidget()); } }
public DiagramEditFrame(IVirtualFile file, IDatabaseSource conn) { InitializeComponent(); OnlineHelpManager.RegisterHelpButton(btnOnlineHelp, "diagrams"); if (!LicenseTool.FeatureAllowed(DiagramsFeature.Test)) { throw new MissingFeatureError(DiagramsFeature._Name); } btnAddToFavorites.Enabled = file is DiskFile; m_file = file; //cbxStyle.Items.Add(Texts.Get("s_custom")); m_diagram = Diagram.Load(m_file); int index = 0; foreach (var style in DiagramStyleAddonType.Instance.CommonSpace.GetFilteredAddons(RegisterItemUsage.DirectUse)) { if (style.Name == XmlTool.GetRegisterType(m_diagram.Style)) { index = cbxStyle.Items.Count; } cbxStyle.Items.Add(style); } cbxStyle.SelectedIndex = index; m_conn = conn; m_diagram.Dialect = m_conn.Dialect; if (m_conn != null) { m_conn.Connection.Owner = this; m_conn.Connection.BeginOpen(Async.CreateInvokeCallback(m_invoker, OpenedConnection)); } //btnDev.Visible = VersionInfo.IsDevVersion; //if (m_diagram.Tables.Count == 0) //{ // btnEditTables.Checked = true; // btnEditTables_Click(this, EventArgs.Empty); //} labDragAndDrop.Visible = m_diagram.Tables.Count == 0; cbxZoom.Text = "100 %"; propertyFrame1.SelectedObject = m_diagram.Style; //cbxZoom.SelectedIndex = cbxZoom.Items.IndexOf("100 %"); ShowCurrentEntityStyle(); m_diagram.Style.Changed += Style_Changed; m_created = true; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { cbxLicense.Items.Clear(); XmlDocument prods = LicenseTool.LoadProducts(); foreach (XmlElement xml in prods.SelectNodes("//Product")) { ListItem item = new ListItem(); item.Text = xml.GetAttribute("text"); item.Value = xml.GetAttribute("name"); cbxLicense.Items.Add(item); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { cbxProduct.Items.Clear(); foreach (XmlElement xml in LicenseTool.LoadProducts().SelectNodes("//Product")) { string name = xml.GetAttribute("name"); if (name.EndsWith("-eval")) { ListItem li = new ListItem(); li.Text = xml.GetAttribute("text"); li.Value = name.Substring(0, name.Length - 5); cbxProduct.Items.Add(li); } } } }
public override System.Drawing.Bitmap GetImageOverride(ITreeNode node) { if (!LicenseTool.FeatureAllowed(AdvancedJobsFeature.Test)) { return(null); } var jnode = node as JobTreeNode; if (jnode != null) { string file = jnode.FileSystemPath; if (JobPlanner.Instance.Connection.JobFileScheduled(file)) { return(StdIcons.clock); } return(null); } return(null); }
public override ITreeNode FromFile(ITreeNode parent, string file) { if (!LicenseTool.FeatureAllowed(ApplicationBuyilderFeature.Test)) { return(null); } string fn = file.ToLower(); if (fn.EndsWith(".app")) { try { return(new ApplicationTreeNode(parent, file)); } catch (Exception) { return(null); } } return(null); }
public override void RunCommand() { if (!LicenseTool.FeatureAllowedMsg(VersionedDbFeature.Test)) { Logging.Error("Database Versioning edition required"); return; } var vdb = new VersionDb(Vdb); var api = new jsdm.Api(); var create = new jsdm.CreateModelProps(); api.Url = String.Format("{0}?login={1}&password={2}", Url, Login, Password); create.Name = Model; create.Dialect = vdb.Dialect.DialectName; create.Versioned = true; string model = api.CreateModel(create); for (int i = 0; i < vdb.Versions.Count; i++) { var ver = vdb.Versions[i]; using (var sr = new StreamReader(ver.GetFile())) { Logging.Info("Uploading version " + ver.Name); string content = sr.ReadToEnd(); if (i > 0) { api.AddModelVersion(model, new Plugin.versiondb.jsdm.CreateVersionProps { Name = ver.Name, Ordinal = i + 1 }); } api.ImportDbStructure(model, i + 1, content, true); } } Logging.Info("Created mode with key " + model); }
public static void SendLicense(string name, string email, string targetEmail, string text, string product) { LicenseData licdata = new LicenseData(); string license = LicenseTool.CreateLicense(name, email, "name", product, null, licdata); MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(license)); SmtpClient client = new SmtpClient("mail.dzavy.net"); client.UseDefaultCredentials = false; client.Credentials = new NetworkCredential("*****@*****.**", "kijokGawg9"); XmlElement prod = LicenseTool.GetProductXml("name", product); MailMessage message = new MailMessage("*****@*****.**", targetEmail, String.Format("DatAdmin License - {0}", prod.GetAttribute("text")), text); Attachment attach = new Attachment(ms, "datadmin.license", "application/octet-stream"); message.Attachments.Add(attach); client.Send(message); ms.Position = 0; string copyInfo = String.Format("Name: {0}\r\nE-mail: {1}\r\nProduct: {2}\r\nLICENSE:\r\n{3}\r\n\r\n", name, email, prod.GetAttribute("text"), licdata.LicenseXml); MailMessage copyMessage = new MailMessage("*****@*****.**", "*****@*****.**", String.Format("DatAdmin License COPY - {0}", prod.GetAttribute("text")), copyInfo + text); copyMessage.Attachments.Add(attach); client.Send(copyMessage); }