本文整理汇总了C#中DataCollection类的典型用法代码示例。如果您正苦于以下问题:C# DataCollection类的具体用法?C# DataCollection怎么用?C# DataCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataCollection类属于命名空间,在下文中一共展示了DataCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
//Instance of object which contains configuration for sending data.
//ULoader_JSON config;
//Instacje of object which sends data.
//USender uSender;
public MainWindow()
{
InitializeComponent();
attentionValuesCollection = new DataCollection();
var attentionDataSource = new EnumerableDataSource<Data>(attentionValuesCollection);
attentionDataSource.SetXMapping(x => dateAttention.ConvertToDouble(x.Date));
attentionDataSource.SetYMapping(y => y.Value);
plotterAttention.AddLineGraph(attentionDataSource, Colors.Red, 2, "Attetion");
connector = new Connector();
connector.DeviceConnected += new EventHandler(OnDeviceConnected);
connector.DeviceConnectFail += new EventHandler(OnDeviceFail);
connector.DeviceValidating += new EventHandler(OnDeviceValidating);
connector.ConnectScan("COM3");
//Stworzenie obiektu typu Random do wyboru losowego słowa ze słownika.
randomWordNumber = new Random();
wordNumber = 0;
attentionComingCounter = 0;
attentionValueSum = 0;
puzzlesSolved = 0;
wordStatList = new List<WordStat>();
currentWord = "";
//config = new ULoader_JSON(@"..\..\config.json");
//uSender = config.GetSender("output1");
}
示例2: RecreateEventAndGetEventId
public void RecreateEventAndGetEventId(
DataCollection.Event evt,
bool recreateEvent = true,
bool deleteTestReg = false)
{
if (KeywordProvider.ManagerDefault.DoesEventExist(evt.Title))
{
if (recreateEvent)
{
KeywordProvider.ManagerDefault.DeleteEvent(evt.Title);
KeywordProvider.EventCreator.CreateEvent(evt);
}
else
{
if (deleteTestReg)
{
evt.Id = KeywordProvider.ManagerDefault.GetLatestEventId(evt.Title);
KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.DeleteTestReg_Click();
PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.DeleteTestRegFrame.SelectByName();
PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.DeleteTestRegFrame.Delete_Click();
PageObject.PageObjectProvider.Manager.Dashboard.ReturnToList_Click();
}
}
}
else
{
KeywordProvider.EventCreator.CreateEvent(evt);
}
evt.Id = KeywordProvider.ManagerDefault.GetLatestEventId(evt.Title);
}
示例3: LoadAllTimingTypen
private void LoadAllTimingTypen(DataCollection<TimingTypen> _allTimingTypen)
{
foreach (DataRow TimingTypenRow in DataModell.DataSetForStaticTables.Tables["TimingTypen"].Rows)
{
_allTimingTypen.Add(new TimingTypen(TimingTypenRow));
}
}
示例4: AddMerchandises
public void AddMerchandises(DataCollection.MerchandiseItem merch, Event evt)
{
if (PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.EmptyAddMerchandise.IsPresent)
{
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.EmptyAddMerchandise_Click();
}
else
{
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.AddMerchandise_Click();
}
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.SelectByName();
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.MerchandiseType_Select(((int)merch.Type).ToString());
switch (merch.Type)
{
case FormData.MerchandiseType.Fixed:
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.FeeAmount.Type(merch.Price.Value);
break;
case FormData.MerchandiseType.Variable:
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.VariableFeeMinAmount.Type(merch.MinPrice.Value);
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.VariableFeeMaxAmount.Type(merch.MaxPrice.Value);
break;
case FormData.MerchandiseType.Header:
break;
default:
break;
}
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnForm.Type(merch.Name);
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnReceipt.Type(merch.Name);
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnReports.Type(merch.Name);
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.Advanced_Click();
if ((evt.TaxRateOne != null) || (evt.TaxRateTwo != null))
{
KeywordProvider.AddTaxRate.AddTaxRates(evt.TaxRateOne, evt.TaxRateTwo, FormData.Location.Merchandise);
}
if ((evt.TaxRateOne != null) && (merch.ApplyTaxOne.HasValue))
{
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.ApplyTaxOne.Set(merch.ApplyTaxOne.Value);
}
if ((evt.TaxRateTwo != null) && (merch.ApplyTaxTwo.HasValue))
{
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.ApplyTaxTwo.Set(merch.ApplyTaxTwo.Value);
}
if (merch.DiscountCodes.Count != 0)
{
string discountCodeString = CustomFieldCode.GenerateBulkCodes(merch.DiscountCodes);
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.DiscountCodes.Type(discountCodeString);
}
PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.SaveAndClose_Click();
}
示例5: AuswertungsFunktion
public AuswertungsFunktion(String NameIDParameter, String HeaderStringParameter, DataCollection<Object> ChildrenParameter)
{
NameID = NameIDParameter;
HeaderText = HeaderStringParameter;
Children = ChildrenParameter;
ID = new Guid();
}
示例6: LoadTypTree
private void LoadTypTree(DataCollection<TreeEntryClass> _typTree)
{
foreach (DataRow RootDataTemplateRow in DataModell.DataSetForStaticTables.Tables["RootDataTemplates"].Rows)
{
RootDataTemplates RootTyp = new RootDataTemplates(RootDataTemplateRow);
_typTree.Add(new TreeEntryClass()
{
Parent = null,
HeadLine = RootTyp.NameID,
ConnectedObject = RootTyp
});
foreach (DataRow TypRow in DataModell.DataSetForStaticTables.Tables["Typ"].Rows)
{
if (((Guid)TypRow["RootFormat"]) != RootTyp.ID)
continue;
Typ SelectableTyp = new Typ(TypRow);
_typTree.Last().Childs.Add(new TreeEntryClass()
{
Parent = _typTree.Last(),
HeadLine = SelectableTyp.NameID,
ConnectedObject = SelectableTyp
});
}
}
}
示例7: LoadAccessRights
private void LoadAccessRights(DataCollection<AccessRights> _selectableAccessRights)
{
foreach (DataRow AccessEntryRow in DataModell.DataSetForStaticTables.Tables["AccessRights"].Rows)
{
_selectableAccessRights.Add(new AccessRights(AccessEntryRow));
}
}
示例8:
public DataCollection<CommonSearchClass> GetLastModifiedWerbung
(DateTime? LastModifiedFrom = null, DateTime? LastModifiedTo = null, int MaxNumber = 10)
{
DataCollection<CommonSearchClass> Result = new DataCollection<CommonSearchClass>();
return Result;
}
示例9: LoadDataCollectionFile
public static DataCollection LoadDataCollectionFile(string FName)
{
DataCollection res = new DataCollection();
StreamReader F = new StreamReader(FName);
res = LoadDataCollectionFromJSON(F.ReadToEnd());
F.Close();
return res;
}
示例10: ConvertToDataTable
/// <summary>
///
/// </summary>
/// <param name="datas"></param>
/// <returns></returns>
private DataTable ConvertToDataTable(DataCollection datas)
{
DataTable tbl = new DataTable();
if (datas.Count > 0)
{
IData last = datas[datas.Count - 1];
Type lastType = last.GetType();
//ReportItemCollection reportItems = last.GetReportItems();
//foreach (ReportItem ri in reportItems)
//{
// Type valueType = ri.Value.GetType();
// DataColumn column = new DataColumn(ri.Name, valueType);
// tbl.Columns.Add(column);
//}
//foreach (IData data in datas)
//{
// if (data.GetType() != lastType)
// {
// continue;
// }
// object[] values = GetReportItemCollectionValues(data.GetReportItems());
// tbl.Rows.Add(values);
//}
AttributePropertyInfoPairCollection ss = last.GetDeviceDataItemAttributes();
foreach (AttributePropertyInfoPair s in ss)
{
Type valueType = s.PropertyInfo.PropertyType;
DataItemAttribute diAttribute = s.Attribute;
string columnName = diAttribute.Name;
DataColumn column = new DataColumn(columnName, valueType);
column.ExtendedProperties["unit"] = diAttribute.Unit.Text;
column.ExtendedProperties["format"] = diAttribute.Format;
column.ExtendedProperties["name"] = diAttribute.Name;
tbl.Columns.Add(column);
}
foreach (IData data in datas)
{
if (data.GetType() != lastType)
{
continue;
}
object[] values = new object[ss.Count];
int idx = 0;
foreach (AttributePropertyInfoPair s in ss)
{
object v= s.PropertyInfo.GetValue(data, null);
values[idx++] = v;
}
tbl.Rows.Add(values);
}
}
return tbl;
}
示例11: SignInAndRecreateEventAndGetEventId
public void SignInAndRecreateEventAndGetEventId(
EventFolders.Folders folder,
DataCollection.Event evt,
bool recreateEvent = true,
bool deleteTestReg = false)
{
this.SignIn(folder);
this.RecreateEventAndGetEventId(evt, recreateEvent, deleteTestReg);
}
示例12: CFType_Select
public void CFType_Select(DataCollection.FormData.CustomFieldType type)
{
Clickable Type = new Clickable(
string.Format("//div[@id='divMoreFormats']//span[text()='{0}']", CustomStringAttribute.GetCustomString(type)),
LocateBy.XPath);
Type.WaitForDisplay();
Type.Click();
}
示例13: On_GnomanEmpire_LoadGame
public static void On_GnomanEmpire_LoadGame(GnomanEmpire self, string file, bool fallen)
{
var dc = new DataCollection();
dc.ToString();
//var seri = new System.Web.Script.Serialization.JavaScriptSerializer();
//var text = seri.Serialize(dc);
var text = Newtonsoft.Json.JsonConvert.SerializeObject(dc, Newtonsoft.Json.Formatting.Indented);
System.IO.File.WriteAllText(@"C:\Users\Faark\Documents\Visual Studio 2010\Projects\GnomoriaModding\Release\Data.js", text);
}
示例14: LoadKandidaten
public static DataCollection<Kandidat> LoadKandidaten(MBRWahlDataModell Parent)
{
DataCollection<Kandidat> KandidatenEntries = new DataCollection<Kandidat>();
foreach (DataRow Entry in MBRWahlDataWrapper.Instance.StaticDataSetForInternet.Tables ["Kandidaten"].Rows)
{
KandidatenEntries.Add (new Kandidat (Entry) {Parent = Parent});
}
return KandidatenEntries;
}
示例15:
private DataCollection<UseForRootDataTemplates> LoadAvailableUseForRootDataTemplatesForSelectedDataDependencyEntry
(DataDependency Selected)
{
DataCollection<UseForRootDataTemplates> Result = new DataCollection<UseForRootDataTemplates> ();
foreach (Guid EntryGuid in AssignedUseForRootDataTemplates.Keys)
foreach (UseForRootDataTemplates Entry in AssignedUseForRootDataTemplates [EntryGuid])
if (Entry.DataDependencyID == Selected.Id)
Result.Add(Entry);
return Result;
}