当前位置: 首页>>代码示例>>C#>>正文


C# BindableCollection类代码示例

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


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


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