• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataCollection的典型用法代码示例。如果您正苦于以下问题:C# DataCollection类的具体用法?C# DataCollection怎么用?C# DataCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataCollection类属于命名空间,在下文中一共展示了DataCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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");
        }
开发者ID:Sektu,项目名称:MindwaveApp,代码行数:36,代码来源:MainWindow.xaml.cs


示例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);
        }
开发者ID:aliaksandr-trush,项目名称:csharp-automaton,代码行数:32,代码来源:SignInToManager.cs


示例3: LoadAllTimingTypen

		private void LoadAllTimingTypen(DataCollection<TimingTypen> _allTimingTypen)
			{
			foreach (DataRow TimingTypenRow in DataModell.DataSetForStaticTables.Tables["TimingTypen"].Rows)
				{
				_allTimingTypen.Add(new TimingTypen(TimingTypenRow));
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:7,代码来源:TimingTypenCache.cs


示例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();
        }
开发者ID:aliaksandr-trush,项目名称:csharp-automaton,代码行数:60,代码来源:AddMerchandise.cs


示例5: AuswertungsFunktion

		public AuswertungsFunktion(String NameIDParameter, String HeaderStringParameter, DataCollection<Object> ChildrenParameter)
			{
			NameID = NameIDParameter;
			HeaderText = HeaderStringParameter;
			Children = ChildrenParameter;
			ID = new Guid();
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:7,代码来源:AuswertungsFunktion.cs


示例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
						});
					}
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:25,代码来源:TreeEntryClassCache.cs


示例7: LoadAccessRights

		private void LoadAccessRights(DataCollection<AccessRights> _selectableAccessRights)
			{
			foreach (DataRow AccessEntryRow in DataModell.DataSetForStaticTables.Tables["AccessRights"].Rows)
				{
				_selectableAccessRights.Add(new AccessRights(AccessEntryRow));
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:7,代码来源:AccessRightsCache.cs


示例8:

        public DataCollection<CommonSearchClass> GetLastModifiedWerbung
            (DateTime? LastModifiedFrom = null, DateTime? LastModifiedTo = null, int MaxNumber = 10)
            {
            DataCollection<CommonSearchClass> Result = new DataCollection<CommonSearchClass>();

            return Result;
            }
开发者ID:heinzsack,项目名称:DEV,代码行数:7,代码来源:SearchInformationenModell.cs


示例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;
 }
开发者ID:metropolian,项目名称:DmScrCap,代码行数:8,代码来源:JSONConfig.cs


示例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;
        }
开发者ID:hkiaipc,项目名称:C3,代码行数:63,代码来源:frmDeviceHistoryData.cs


示例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);
 }
开发者ID:aliaksandr-trush,项目名称:csharp-automaton,代码行数:9,代码来源:SignInToManager.cs


示例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();
        }
开发者ID:aliaksandr-trush,项目名称:csharp-automaton,代码行数:9,代码来源:CustomFieldDefine.cs


示例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);
 }
开发者ID:Gnomodia,项目名称:Gnomodia,代码行数:9,代码来源:getData.cs


示例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;
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:9,代码来源:Kandidat.cs


示例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;
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:10,代码来源:UseForRootDataTemplatesCache.cs


示例16: LoadSelectableZielGruppe

		private void LoadSelectableZielGruppe(DataCollection<ZielGruppen> _selectableZielGruppe)
			{
			foreach (DataRow ZielGruppenRow in DataModell.DataSetForStaticTables.Tables["ZielGruppen"].Rows)
				{
				_selectableZielGruppe.Add(new ZielGruppen(ZielGruppenRow)
					{

					});
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:10,代码来源:ZielGruppenCache.cs


示例17: PropertiesForClass

		public DataCollection<PropertyInfo> PropertiesForClass (String ClassName)
			{
			DataCollection<PropertyInfo> Result = new DataCollection<PropertyInfo> ();
			if (!String.IsNullOrEmpty (ClassName))
				foreach (PropertyInfo PropInfo in DataWrapper.GetTypeToCreate (ClassName).GetProperties ())
					{
					Result.Add (PropInfo);
					}
			return Result;
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:10,代码来源:InformationenTableFieldSelectorModell.cs


示例18: SelectParentEvent

        public void SelectParentEvent(DataCollection.Event evt)
        {
            Utility.ThreadSleep(1);
            this.ParentEventList.WaitForDisplay();

            this.ParentEventList.SelectWithText(string.Format(
                "{0} ({1})",
                evt.StartPage.AdvancedSettings.ParentEvent.Title,
                evt.StartPage.AdvancedSettings.ParentEvent.Id));
        }
开发者ID:aliaksandr-trush,项目名称:csharp-automaton,代码行数:10,代码来源:EventAdvancedSettings.cs


示例19: LoadAvailableFullTypForRoot

		//private Dictionary<Guid,DataCollection<FullUseForTyp>> _availableFullTypForTypOrRoot;
		//public Dictionary<Guid, DataCollection<FullUseForTyp>> AvailableFullTypForTypOrRoot
		//	{
		//	get
		//		{
		//		if (_availableFullTypForTypOrRoot == null)
		//			_availableFullTypForTypOrRoot = new Dictionary<Guid, DataCollection<FullUseForTyp>>();
		//		if (Profile.ActiveTyp != null)
		//			{
		//			if (!_availableFullTypForTypOrRoot.ContainsKey(Profile.ActiveTyp.ID))
		//				_availableFullTypForTypOrRoot[Profile.ActiveTyp.ID] = LoadAvailableFullTypForTyp(Profile.ActiveTyp);
		//			}
		//		else
		//			{
		//			if (Profile.ActiveRootDataTemplates != null)
		//				{
		//				if (!_availableFullTypForTypOrRoot.ContainsKey(Profile.ActiveRootDataTemplates.ID))
		//					_availableFullTypForTypOrRoot[Profile.ActiveRootDataTemplates.ID] = LoadAvailableFullTypForRoot(Profile.ActiveRootDataTemplates);
		//				}
		//			}

		//		return _availableFullTypForTypOrRoot;
		//		}
		//	set { SetProperty (ref _availableFullTypForTypOrRoot, value); }
		//	}
		private DataCollection<FullUseForTyp> LoadAvailableFullTypForRoot(RootDataTemplates RootToSearchFor)
			{
			DataCollection<FullUseForTyp> Result = new DataCollection<FullUseForTyp>();
			foreach (FullUseForTyp Entry in AvailableFullTyp.Values)
				{
				if (Entry.ConnectedID == RootToSearchFor.ID)
					Result.Add(Entry);
				}
			return Result;
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:35,代码来源:FullUseForTypCache.cs


示例20: LoadSelectableTyp

		private void LoadSelectableTyp(DataCollection<Typ> _selectableTyp)
			{
			foreach (DataRow TypRow in DataModell.DataSetForStaticTables.Tables["Typ"].Rows)
				{
				_selectableTyp.Add(new Typ(TypRow)
					{

					});
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:10,代码来源:TypCache.cs



注:本文中的DataCollection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataColumn类代码示例发布时间:2022-05-24
下一篇:
C# DataClassesDataContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap