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

C# BindableCollection类代码示例

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

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



BindableCollection类属于命名空间,在下文中一共展示了BindableCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TypeOfPaymentViewModel

 public TypeOfPaymentViewModel(INavigationService navigationService)
     : base(navigationService)
 {
     _navigationService = navigationService;
     _title = "Type of Payment - Step 2/4";
     AvailablePayments = new BindableCollection<PaymentMethod>();
 }
开发者ID:pawelsawicz,项目名称:Primula.W8,代码行数:7,代码来源:TypeOfPaymentViewModel.cs


示例2: DeviceWizard_LocalNetworkViewModel

 public DeviceWizard_LocalNetworkViewModel(DeviceInstallationWizardViewModel conductor)
 {
     this._conductor = conductor;
     this._availableClients = new BindableCollection<ClientInfoListItemViewModel>();
     this.IsScanning = false;
     Task.Factory.StartNew(UpdateAvailableClients, TaskCreationOptions.LongRunning);
 }
开发者ID:fcin,项目名称:RemindMe,代码行数:7,代码来源:DeviceWizard_LocalNetworkViewModel.cs


示例3: InvoicePopupViewModel

        public InvoicePopupViewModel(IInvoiceService invoiceService, IProductService productService)
        {
            InvoiceService = invoiceService;
            ProductService = productService;

            Items = new BindableCollection<SaleItemViewModel>();
        }
开发者ID:edjo23,项目名称:shop,代码行数:7,代码来源:InvoicePopupViewModel.cs


示例4: DatabaseModel

		public DatabaseModel(string name, DocumentStore documentStore)
		{
			this.name = name;
			this.documentStore = documentStore;

			Tasks = new BindableCollection<TaskModel>(x => x.Name)
			{
				new ImportTask(),
				new ExportTask(),
				new StartBackupTask(),
				new IndexingTask(),
				new SampleDataTask()
			};

			SelectedTask = new Observable<TaskModel> { Value = Tasks.FirstOrDefault() };
			Statistics = new Observable<DatabaseStatistics>();
			Status = new Observable<string>
			{
				Value = "Offline"
			};

			asyncDatabaseCommands = name.Equals(Constants.SystemDatabase, StringComparison.OrdinalIgnoreCase)
											? documentStore.AsyncDatabaseCommands.ForDefaultDatabase()
											: documentStore.AsyncDatabaseCommands.ForDatabase(name);

		    DocumentChanges.Select(c => Unit.Default).Merge(IndexChanges.Select(c => Unit.Default))
		        .SampleResponsive(TimeSpan.FromSeconds(2))
		        .Subscribe(_ => RefreshStatistics(), exception => ApplicationModel.Current.Server.Value.IsConnected.Value = false);

			RefreshStatistics();
		}
开发者ID:arelee,项目名称:ravendb,代码行数:31,代码来源:DatabaseModel.cs


示例5: CalendarWeekViewModel

 public CalendarWeekViewModel(IWindsorContainer container, IAppointmentService service)
 {
     this.container = container;
     this.appointmentService = service;
     Days = new BindableCollection<DayTileViewModel>();
     BuildUp();
 }
开发者ID:schultyy,项目名称:octocal,代码行数:7,代码来源:CalendarWeekViewModel.cs


示例6: CollectionsModel

		public CollectionsModel()
		{
			ModelUrl = "/collections";
			ApplicationModel.Current.Server.Value.RawUrl = null;
            Collections = new BindableCollection<CollectionModel>(model => model.Name);
            SelectedCollection = new Observable<CollectionModel>();

            DocumentsForSelectedCollection.SetChangesObservable(d =>  d.IndexChanges
                                 .Where(n =>n.Name.Equals(CollectionsIndex,StringComparison.InvariantCulture))
                                 .Select(m => Unit.Default));

		    DocumentsForSelectedCollection.DocumentNavigatorFactory =
		        (id, index) =>
		        DocumentNavigator.Create(id, index, CollectionsIndex,
		                                 new IndexQuery() {Query = "Tag:" + GetSelectedCollectionName()});

            SelectedCollection.PropertyChanged += (sender, args) =>
            {
                PutCollectionNameInTheUrl();
                CollectionSource.CollectionName = GetSelectedCollectionName();

                DocumentsForSelectedCollection.Context = "Collection/" + GetSelectedCollectionName();
            };

		    SortedCollectionsList = new CollectionViewSource()
		    {
		        Source = Collections,
		        SortDescriptions =
		        {
		            new SortDescription("Count", ListSortDirection.Descending)
		        }
		    };
		}
开发者ID:nberardi,项目名称:ravendb,代码行数:33,代码来源:CollectionsModel.cs


示例7: FingerTrackingOptionsViewModel

        public FingerTrackingOptionsViewModel()
        {
            Colors = new BindableCollection<Color>();

            foreach (var property in typeof(Color).GetProperties().Where(p => p.PropertyType == typeof(Color)))
            {
                Colors.Add((Color)property.GetValue(new Color()));
            }

            MinContourArea = 100;
            ConvexHullCW = false;

            ConvexHullColor = Color.Green;
            ContourHighlightColor = Color.Blue;
            DefectStartPointHighlightColor = Color.Violet;
            DefectDepthPointHighlightColor = Color.Black;
            DefectEndPointHighlightColor = Color.Yellow;
            DefectLinesColor = Color.Red;

            SelectedMethod = 2;

            TrackOnlyControlPoint = false;

            if (Execute.InDesignMode)
                LoadDesignTimeData();
        }
开发者ID:vladimirdjurdjevic,项目名称:soft,代码行数:26,代码来源:FingerTrackingOptionsViewModel.cs


示例8: BuscarModosPago

        public BindableCollection<ModoPago> BuscarModosPago()
        {
            BindableCollection<ModoPago> listaModoPagos = new BindableCollection<ModoPago>(); ;
            SqlConnection conn = new SqlConnection(Properties.Settings.Default.inf245g4ConnectionString);
            SqlCommand cmd = new SqlCommand();
            SqlDataReader reader;

            cmd.CommandText = "SELECT * FROM ModoPago";
            cmd.CommandType = CommandType.Text;
            cmd.Connection = conn;

            try
            {
                conn.Open();
                reader = cmd.ExecuteReader();

                while (reader.Read())
                {
                    ModoPago mp = new ModoPago();
                    mp.IdModoPago = reader.IsDBNull(reader.GetOrdinal("idModoPago")) ? -1 : (int)reader["idModoPago"];
                    mp.Nombre = reader.IsDBNull(reader.GetOrdinal("nombre")) ? null : reader["nombre"].ToString();
                    listaModoPagos.Add(mp);
                }

                conn.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.StackTrace.ToString());
            }

            return listaModoPagos;
        }
开发者ID:alfonsobp,项目名称:made-in-house,代码行数:33,代码来源:ModoPagoSQL.cs


示例9: ShellViewModel

		public ShellViewModel(IEventAggregator eventAggregator, MessageHandler messageHandler)
		{
			this.eventAggregator = eventAggregator;
			LogMessages = new BindableCollection<LogEntry>();

			ViewAttached += OnViewAttachedEventHandler;
		}
开发者ID:vcaraulean,项目名称:CaliburnMicro.AsyncDemo,代码行数:7,代码来源:ShellViewModel.cs


示例10: EditClearancesViewModel

 public EditClearancesViewModel()
 {
     Courses =
         new BindableCollection<CourseViewModel>(
             JsonConvert.DeserializeObject<List<Course>>(File.ReadAllText(_courseDataPath, Encoding.UTF8))
                 .Select(c => new CourseViewModel(c)));
 }
开发者ID:twreid,项目名称:PracticumEmailer,代码行数:7,代码来源:EditClearancesViewModel.cs


示例11: ContinueNearestSearchOnUiThread

        protected async void ContinueNearestSearchOnUiThread()
        {
            Haltestellen = null;
            NotifyOfPropertyChange(() => Haltestellen);

            var posResult = await _locationService.GetCurrentPosition();

            if (posResult.Succeeded)
            {
                var pos = posResult.Position;
                InfoMessage = String.Format("{0}: {1:F2} {2:F2}", AppResources.PositionMessage_YourPosition, pos.Coordinate.Point.Position.Longitude, pos.Coordinate.Point.Position.Latitude);

                MyLocation = new Wgs84Location(pos.Coordinate);

                var haltestellen = await _dataService.GetNearestHaltestellenAsync(MyLocation);

                if (!haltestellen.Any())
                {
                    InfoMessage = String.Format("{0}: {1:F2} {2:F2}", AppResources.PositionMessage_NoStopsFoundNear,
                        pos.Coordinate.Point.Position.Longitude, pos.Coordinate.Point.Position.Latitude);
                }
                else
                {
                    Haltestellen = new BindableCollection<Haltestelle>(haltestellen.OrderBy(h => h.Distanz));
                    NotifyOfPropertyChange(() => Haltestellen);
                }
            }
            else
            {
                InfoMessage = posResult.ErrorMessage;
            }
        }
开发者ID:christophwille,项目名称:viennarealtime,代码行数:32,代码来源:NearbyStationsViewModel.cs


示例12: ObtenerSubLineas

        public BindableCollection<SubLineaProducto> ObtenerSubLineas(int id)
        {
            db.cmd.CommandText = "SELECT * FROM SubLineaProducto WHERE [email protected]";
            db.cmd.Parameters.AddWithValue("idLinea", id);
            SqlDataReader reader;
            BindableCollection<SubLineaProducto> lstSubLinea = new BindableCollection<SubLineaProducto>();
            try
            {
                db.conn.Open();
                reader=db.cmd.ExecuteReader();
                while (reader.Read())
                {
                    SubLineaProducto slp = new SubLineaProducto();
                    slp.IdLinea = id;
                    slp.Nombre=reader["Nombre"].ToString();
                    slp.IdSubLinea = Int32.Parse(reader["IdSubLinea"].ToString());
                    slp.Abreviatura = reader["Abreviatura"].ToString();
                    lstSubLinea.Add(slp);
                }
                db.cmd.Parameters.Clear();
                reader.Close();
                db.conn.Close();

            }
            catch (SqlException e)
            {
                Console.WriteLine(e);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace.ToString());
            }

            return lstSubLinea;
        }
开发者ID:alfonsobp,项目名称:made-in-house,代码行数:35,代码来源:SubLineaProductoSQL.cs


示例13: ServerModel

		private ServerModel(string url)
		{
			this.url = url;
			Databases = new BindableCollection<DatabaseModel>(model => model.Name);
			SelectedDatabase = new Observable<DatabaseModel>();
			Initialize();
		}
开发者ID:maurodx,项目名称:ravendb,代码行数:7,代码来源:ServerModel.cs


示例14: SearchPresenter

 public SearchPresenter(IYearToVerseSearchService searchService, IHebrewNumberConverter hebrewNumberConverter)
 {
     this.searchService = searchService;
     this.hebrewNumberConverter = hebrewNumberConverter;
     jewishYear = new Observable<string>("5770");
     Verses = new BindableCollection<Verse>();
 }
开发者ID:Yitzchok,项目名称:YearToBibleVerse,代码行数:7,代码来源:SearchPresenter.cs


示例15: ChartViewModel

        public ChartViewModel(ISevenDigitalClient sevenDigitalClient, INavigationService navigationService)
        {
            this.sevenDigitalClient = sevenDigitalClient;
            this.navigationService = navigationService;

            Items = new BindableCollection<ChartItem>();
        }
开发者ID:krisgithub123,项目名称:windows-10-demos,代码行数:7,代码来源:ChartViewModel.cs


示例16: CharitiesViewModel

 public CharitiesViewModel(INavigationService navigationService)
 {
     _navigationService = navigationService;
     _justGivingCharityRepository = new JustGivingCharityRepository();
     Charities = new BindableCollection<Chairty>();
     LoadCharities();
 }
开发者ID:pawelsawicz,项目名称:LearnPledgeChallenge.WP8,代码行数:7,代码来源:CharitiesViewModel.cs


示例17: AdministrationCodeTableService

 /// <summary>
 /// Initializes a new instance of the <see cref="AdministrationCodeTableService"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="errorService">The error service.</param>
 public AdministrationCodeTableService(AdministrationCodeTableDomainContext context, IErrorService errorService)
 {
     _codeTableDomainContext = context;
     _errorService = errorService;
     _groups=new BindableCollection<Group>();
     _userProfessions=new BindableCollection<UserProfession>();
 }
开发者ID:Marbulinek,项目名称:NIS,代码行数:12,代码来源:AdministrationCodeTableService.cs


示例18: EditTemplatesViewModel

 public EditTemplatesViewModel()
 {
     var info = new DirectoryInfo(_templatesPath);
     _files =
         new BindableCollection<string>(
             info.EnumerateFiles("*.html").Select(fi => fi.Name.Remove(fi.Name.IndexOf('.')).ToUpper()));
 }
开发者ID:twreid,项目名称:PracticumEmailer,代码行数:7,代码来源:EditTemplatesViewModel.cs


示例19: ApplicationModel

		private ApplicationModel()
		{
			Notifications = new BindableCollection<Notification>(x=>x.Message);
			LastNotification = new Observable<string>();
			Server = new Observable<ServerModel> {Value = new ServerModel()};
		    State = new ApplicationState();
		}
开发者ID:royra,项目名称:ravendb,代码行数:7,代码来源:ApplicationModel.cs


示例20: CustomersAndOrdersViewModel

 public CustomersAndOrdersViewModel(IValidationRepository validationRepository, IOrderDetailsViewModel orderDetailsViewModel)
 {
     this.validationRepository = validationRepository;
     this.orderDetailsViewModel = orderDetailsViewModel;
     var customers = validationRepository.ListDocuments<Customer>();
     Customers = new BindableCollection<Customer>(customers);
 }
开发者ID:silverforge,项目名称:CKValidationNew,代码行数:7,代码来源:CustomersAndOrdersViewModel.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# BindableObject类代码示例发布时间:2022-05-24
下一篇:
C# BindValueKind类代码示例发布时间: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