private void btnOK_Click(object sender, EventArgs e) { OpenPOS.Model.Reports.IRelatorio relatorio = null; OpenPOS.GUID guid = OpenPOS.GUID.Empty; DataGridViewRow row = grdTemplate.Rows.Cast <DataGridViewRow>().FirstOrDefault(w => Convert.ToBoolean(w.Cells[col_Selecionar.Index].Value) == true); if (row != null) { guid = (OpenPOS.GUID)row.Cells[col_GUID.Index].Value; relatorio = new OpenPOS.Data.Reports.Relatorio(guid); _ResultReport = relatorio.Script; } else if (DoReportSyntax(false)) { _ResultReport = tbReportSyntax.Text; } else { return; } DialogResult = DialogResult.OK; this.Close(); }
public static SaveDialogResult Show(string title, OpenPOS.GUID group, List <SqlColumn> colunas, IRelatorio relatorio) { frmDialogSave save = new frmDialogSave(colunas, relatorio); RdlDesigner _rdlDesigner = save.Parent as RdlDesigner; save.txtTitle.Text = title; save.sfGroup.SetValue(group.ToString()); save.ShowDialog(); SaveDialogResult result = save.Result; save.Close(); save.Dispose(); return(result); }
static void Main(string[] args) { string version = "4563";// !!!! warning !!!! string needs to be changed with when release version changes OpenPOS.GUID g = ""; if (args.Length > 0) { if (args[0].StartsWith("GUID:")) { g = args[0].Substring(5); } } // Determine if an instance is already running? bool firstInstance; string mName = string.Format("Local\\RdlDesigner{0}", version); // can't use Assembly in this context System.Threading.Mutex mutex = new System.Threading.Mutex(false, mName, out firstInstance); if (firstInstance) {// just start up the designer when we're first in line var thread = System.Threading.Thread.CurrentThread; try { thread.CurrentCulture = new CultureInfo(DialogToolOptions.DesktopConfiguration.Language); } catch { thread.CurrentCulture = new CultureInfo(thread.CurrentCulture.Name); } if (thread.CurrentCulture.Equals(CultureInfo.InvariantCulture)) { thread.CurrentCulture = new CultureInfo("en-US"); } // for working in non-default cultures thread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "."; thread.CurrentUICulture = thread.CurrentCulture; Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(g.IsNullOrEmpty() ? new RdlDesigner(true) : new RdlDesigner(g)); return; } }