本文整理汇总了C#中PathMaker.Table.SetData方法的典型用法代码示例。如果您正苦于以下问题:C# Table.SetData方法的具体用法?C# Table.SetData怎么用?C# Table.SetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PathMaker.Table
的用法示例。
在下文中一共展示了Table.SetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RedoConfirmationPromptIds
public static int RedoConfirmationPromptIds(ref Table table, string stateId, int startNumber, string promptIdFormat)
{
if (promptIdFormat.Equals(Strings.PromptIdFormatFull) || promptIdFormat.Equals(Strings.PromptIdFormatPartial)) {
string statePrefix = "";
string stateNumber = "";
string stateName = "";
if (stateId != null)
StateShadow.DisectStateIdIntoParts(stateId, out statePrefix, out stateNumber, out stateName);
int nextNum = 1;
for (int row = 0; row < table.GetNumRows(); row++) {
string wording = table.GetData(row, (int)TableColumns.ConfirmationPrompts.Wording);
if (wording == null || wording.Length == 0 || wording.Trim().StartsWith(Strings.CalculatedPromptStartString) || wording.Trim().StartsWith(Strings.PromptTypeMacroStartString))
continue;
string newPromptId;
if (stateId != null) {
if (promptIdFormat.Equals(Strings.PromptIdFormatFull))
newPromptId = stateId + Strings.PromptIdSeparationChar + Strings.DefaultConfirmationPromptLetter + Strings.PromptIdSeparationChar + nextNum.ToString();
else
newPromptId = statePrefix + stateNumber + Strings.PromptIdSeparationChar + Strings.DefaultConfirmationPromptLetter + Strings.PromptIdSeparationChar + nextNum.ToString();
}
else
newPromptId = Strings.GlobalPromptPrefix.ToString () + Strings.PromptIdSeparationChar +
Strings.DefaultConfirmationPromptLetter.ToString() + Strings.PromptIdSeparationChar + nextNum;
if (!table.GetData(row, (int)TableColumns.ConfirmationPrompts.Id).Equals(newPromptId)) {
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Id, newPromptId);
//table.SetData(row, (int)TableColumns.ConfirmationPrompts.IdDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
table.SetData(row, (int)TableColumns.ConfirmationPrompts.IdDateStamp, PathMaker.LookupChangeLogShadow().GetLastChangeVersion());//JDK added
}
nextNum++;
}
return nextNum - 1;
}
else if (promptIdFormat.Equals(Strings.PromptIdFormatNumeric)) {
int nextNum = startNumber;
for (int row = 0; row < table.GetNumRows(); row++) {
string wording = table.GetData(row, (int)TableColumns.ConfirmationPrompts.Wording);
if (wording == null || wording.Length == 0 || wording.Trim().StartsWith(Strings.CalculatedPromptStartString) || wording.Trim().StartsWith(Strings.PromptTypeMacroStartString))
continue;
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Id, nextNum.ToString());
//table.SetData(row, (int)TableColumns.ConfirmationPrompts.IdDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
table.SetData(row, (int)TableColumns.ConfirmationPrompts.IdDateStamp, PathMaker.LookupChangeLogShadow().GetLastChangeVersion());//JDK added
nextNum++;
}
return nextNum - startNumber;
}
else
return 0;
}
示例2: GetTableFromRows
public static Table GetTableFromRows(BindingList<NameValuePairRow> rows)
{
Table table = new Table(rows.Count, Enum.GetNames(typeof(TableColumns.NameValuePairs)).Length);
int row = 0;
foreach (NameValuePairRow nv in rows) {
table.SetData(row, (int)TableColumns.NameValuePairs.Name, nv.Name);
table.SetData(row, (int)TableColumns.NameValuePairs.Value, nv.Value);
table.SetData(row, (int)TableColumns.NameValuePairs.NameDateStamp, nv.NameDateStamp);
table.SetData(row, (int)TableColumns.NameValuePairs.ValueDateStamp, nv.ValueDateStamp);
row++;
}
return table;
}
示例3: GetTableFromRows
public static Table GetTableFromRows(BindingList<ChangeLogRow> rows)
{
Table table = new Table(rows.Count, Enum.GetNames(typeof(TableColumns.ChangeLog)).Length);
int row = 0;
foreach (ChangeLogRow cl in rows) {
table.SetData(row, (int)TableColumns.ChangeLog.Date, cl.Date);
table.SetData(row, (int)TableColumns.ChangeLog.Version, cl.Version);
table.SetData(row, (int)TableColumns.ChangeLog.Details, cl.Details);
table.SetData(row, (int)TableColumns.ChangeLog.Author, cl.Author);
table.SetData(row, (int)TableColumns.ChangeLog.Highlight, cl.Highlight);
row++;
}
return table;
}
示例4: GetTableFromRows
public static Table GetTableFromRows(BindingList<TransitionRow> rows)
{
Table table = new Table(rows.Count, Enum.GetNames(typeof(TableColumns.Transitions)).Length);
int row = 0;
foreach (TransitionRow ct in rows) {
table.SetData(row, (int)TableColumns.Transitions.Action, ct.Action);
table.SetData(row, (int)TableColumns.Transitions.Condition, ct.Condition);
// leave the old actual goto data in place
table.SetData(row, (int)TableColumns.Transitions.Goto, ct.GotoData_TreatAsDateStamp);
table.SetData(row, (int)TableColumns.Transitions.ActionDateStamp, ct.ActionDateStamp);
table.SetData(row, (int)TableColumns.Transitions.ConditionDateStamp, ct.ConditionDateStamp);
table.SetData(row, (int)TableColumns.Transitions.GotoDateStamp, ct.GotoDateStamp);
row++;
}
return table;
}
示例5: GetTableFromRows
public static Table GetTableFromRows(BindingList<MaxHandlingRow> rows)
{
Table table = new Table(rows.Count, Enum.GetNames(typeof(TableColumns.MaxHandling)).Length);
int row = 0;
foreach (MaxHandlingRow mh in rows) {
table.SetData(row, (int)TableColumns.MaxHandling.Condition, mh.Condition);
table.SetData(row, (int)TableColumns.MaxHandling.Count, mh.Count);
table.SetData(row, (int)TableColumns.MaxHandling.Action, mh.Action);
table.SetData(row, (int)TableColumns.MaxHandling.Goto, mh.Goto);
table.SetData(row, (int)TableColumns.MaxHandling.CountDateStamp, mh.CountDateStamp);
table.SetData(row, (int)TableColumns.MaxHandling.ActionDateStamp, mh.ActionDateStamp);
table.SetData(row, (int)TableColumns.MaxHandling.GotoDateStamp, mh.GotoDateStamp);
row++;
}
return table;
}
示例6: GetDefaultSettings
internal Table GetDefaultSettings()
{
Table table = Common.GetCellTable(shape, ShapeProperties.Start.DefaultSettings);
if (table.IsEmpty()) {
table = new Table(DefaultSettingsLabels.Length, Enum.GetNames(typeof(TableColumns.NameValuePairs)).Length);
for (int row = 0; row < DefaultSettingsLabels.Length; row++) {
table.SetData(row, (int)TableColumns.NameValuePairs.Name, DefaultSettingsLabels[row]);
table.SetData(row, (int)TableColumns.NameValuePairs.Value, DefaultSettingsValues[row]);
}
}
return table;
}
示例7: UISpecResults_Load
private void UISpecResults_Load(string results)
{
Table table;
int cnt = 0;
int lastLine = 0;
string[] splitLine = Regex.Split(results, "\r\n\n");
if (splitLine[splitLine.Length - 1].Equals("\r\n\r\n"))
lastLine = splitLine.Length - 1;
else
lastLine = splitLine.Length;
table = new Table(lastLine, 1);
foreach (string line in splitLine) {
if (cnt < lastLine) {
table.SetData(cnt, 0, line);
cnt++;
}
}
BindingList<ResultsRow> eList = ResultsRow.GetRowsFromTable(table);
UISpecResultsGridView.DataSource = eList;
}
示例8: SetDeveloperNotes
internal void SetDeveloperNotes(Table table)
{
Table tmp = GetDeveloperNotes();
if ((table.GetData(0, 0) == null || table.GetData(0, 0).Length == 0) && tmp.IsEmpty())
return;
if (tmp.IsEmpty()) {
table.SetData(0, (int)TableColumns.DeveloperNotes.TextDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
Common.SetCellTable(shape, ShapeProperties.DeveloperNotes, table);
}
else if (!tmp.GetData(0, (int)TableColumns.DeveloperNotes.Text).Equals(table.GetData(0, (int)TableColumns.DeveloperNotes.Text))) {
table.SetData(0, (int)TableColumns.DeveloperNotes.TextDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
Common.SetCellTable(shape, ShapeProperties.DeveloperNotes, table);
}
}
示例9: GetDefaultSettings
internal Table GetDefaultSettings()
{
Table table = Common.GetCellTable(shape, ShapeProperties.Start.DefaultSettings);
if (table.IsEmpty()) {
table = new Table(DefaultSettingsLabels.Length, Enum.GetNames(typeof(TableColumns.NameValuePairs)).Length);
for (int row = 0; row < DefaultSettingsLabels.Length; row++) {
table.SetData(row, (int)TableColumns.NameValuePairs.Name, DefaultSettingsLabels[row]);
table.SetData(row, (int)TableColumns.NameValuePairs.Value, DefaultSettingsValues[row]);
table.SetData(row, (int)TableColumns.NameValuePairs.Notes, DefaultSettingsValues[row]);
table.SetData(row, (int)TableColumns.NameValuePairs.NameDateStamp, PathMaker.LookupChangeLogShadow().GetLastChangeVersion());
table.SetData(row, (int)TableColumns.NameValuePairs.ValueDateStamp, PathMaker.LookupChangeLogShadow().GetLastChangeVersion());
table.SetData(row, (int)TableColumns.NameValuePairs.NotesDateStamp, PathMaker.LookupChangeLogShadow().GetLastChangeVersion());
}
}
return table;
}
示例10: UnloadSpecialSettingsTextBox
internal static Table UnloadSpecialSettingsTextBox(TextBox textBox)
{
Table table = new Table(1, 2);
table.SetData(0, (int)TableColumns.SpecialSettings.Text, textBox.Text);
return table;
}
示例11: RedoPromptIds
private int RedoPromptIds(int startNumber, string promptIdFormat, Table table)
{
if (promptIdFormat.Equals(Strings.PromptIdFormatFull) || promptIdFormat.Equals(Strings.PromptIdFormatPartial))
{
string stateId = GetStateId();
string statePrefix, stateNumber, stateName;
DisectStateIdIntoParts(stateId, out statePrefix, out stateNumber, out stateName);
int nextNum = 1;
for (int row = 0; row < table.GetNumRows(); row++)
{
string wording = table.GetData(row, (int)TableColumns.Prompts.Wording);
if (wording == null || wording.Length == 0 || wording.Trim().StartsWith(Strings.CalculatedPromptStartString) || wording.Trim().StartsWith(Strings.PromptTypeMacroStartString))
continue;
string newPromptId;
if (stateId != null)
{
if (promptIdFormat.Equals(Strings.PromptIdFormatFull))
newPromptId = stateId + Strings.PromptIdSeparationChar + Strings.DefaultPromptLetter + Strings.PromptIdSeparationChar + nextNum.ToString();
else
newPromptId = statePrefix + stateNumber + Strings.PromptIdSeparationChar + Strings.DefaultPromptLetter + Strings.PromptIdSeparationChar + nextNum.ToString();
}
else
newPromptId = Strings.DefaultPromptLetter.ToString() + Strings.PromptIdSeparationChar + nextNum;
if (!table.GetData(row, (int)TableColumns.Prompts.Id).Equals(newPromptId))
{
table.SetData(row, (int)TableColumns.Prompts.Id, newPromptId);
table.SetData(row, (int)TableColumns.Prompts.IdDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
}
nextNum++;
}
if (nextNum - 1 > 0)
SetPrompts(table);
return nextNum - 1;
}
else if (promptIdFormat.Equals(Strings.PromptIdFormatNumeric))
{
int nextNum = startNumber;
for (int row = 0; row < table.GetNumRows(); row++)
{
string wording = table.GetData(row, (int)TableColumns.Prompts.Wording);
if (wording == null || wording.Length == 0 || wording.Trim().StartsWith(Strings.CalculatedPromptStartString) || wording.Trim().StartsWith(Strings.PromptTypeMacroStartString))
continue;
table.SetData(row, (int)TableColumns.Prompts.Id, nextNum.ToString());
table.SetData(row, (int)TableColumns.Prompts.IdDateStamp, DateTime.Now.ToString(Strings.DateColumnFormatString));
nextNum++;
}
if (nextNum - startNumber > 0)
SetPrompts(table);
return nextNum - startNumber;
}
else
return 0;
}
示例12: UnloadDeveloperNotesTextBox
internal static Table UnloadDeveloperNotesTextBox(TextBox textBox)
{
Table table = new Table(1, 2);
table.SetData(0, (int)TableColumns.DeveloperNotes.Text, textBox.Text);
return table;
}
示例13: SetTableDataAndDateIfNecessary
internal static void SetTableDataAndDateIfNecessary(Table table, int row, string newValue,
TableColumns.NameValuePairs valueColumn, TableColumns.NameValuePairs dateColumn)
{
string oldValue = table.GetData(row, (int)valueColumn);
if (oldValue.Equals(newValue))
return;
table.SetData(row, (int)valueColumn, newValue);
table.SetData(row, (int)dateColumn, DateTime.Today.ToString(Strings.DateColumnFormatString));
}
示例14: GetTableFromRows
public static Table GetTableFromRows(BindingList<ResultsRow> rows)
{
Table table = new Table(rows.Count, 1);
int row = 0;
foreach (ResultsRow txt in rows) {
table.SetData(row, 0, txt.Error);
row++;
}
return table;
}
示例15: GetTableFromRows
public static Table GetTableFromRows(BindingList<ConfirmationPromptRow> rows)
{
Table table = new Table(rows.Count, Enum.GetNames(typeof(TableColumns.ConfirmationPrompts)).Length);
int row = 0;
foreach (ConfirmationPromptRow cp in rows) {
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Option, cp.Option);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Condition, cp.Condition);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Wording, cp.Wording);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.Id, cp.Id);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.OptionDateStamp, cp.OptionDateStamp);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.ConditionDateStamp, cp.ConditionDateStamp);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.WordingDateStamp, cp.WordingDateStamp);
table.SetData(row, (int)TableColumns.ConfirmationPrompts.IdDateStamp, cp.IdDateStamp);
row++;
}
return table;
}