private void setDefaultToolStripMenuItem_Click(object sender, EventArgs e) { var actionNode = _selectedNode as ScriptActionNode; var currentValue = (actionNode?.ScriptAction?.Object as Column)?.DefaultValue; var dlg = new frmPromptText() { Text = "Set Column Default", NewText = currentValue }; if (dlg.ShowDialog() == DialogResult.OK) { if (actionNode != null) { var column = actionNode.ScriptAction.Object as Column; if (column != null) { column.DefaultValue = dlg.NewText; } UpdateSqlScript(actionNode); actionNode.NodeFont = new Font(tvObjects.Font, FontStyle.Regular); } } }
private void renameToolStripMenuItem_Click(object sender, EventArgs e) { var tab = GetSelectedTab(tabMain); var dlg = new frmPromptText() { Text = "Rename Merge", NewText = tab.Text }; if (dlg.ShowDialog() == DialogResult.OK) { tab.Text = dlg.NewText; (tab.Controls[0] as SyncUI).Document.Title = dlg.NewText; } }