Exemplo n.º 1
0
		public async void InitializeControl( Uri serverUri, Configuration configuration, CatalogCollection catalogs )
		{
			_Configuration = configuration;
			_Catalogs = catalogs;
			_RestDataServiceClient = new DataServiceRestClient( serverUri );
			_RestRawDataServiceClient = new RawDataServiceRestClient( serverUri );

			await FetchAllParts();
		}
Exemplo n.º 2
0
		public async void InitializeControl( Uri serverUri, Configuration configuration, CatalogCollection catalogs )
		{
			_Configuration = configuration;
			_Catalogs = catalogs;
			_RestDataServiceClient = new DataServiceRestClient( serverUri );
			_RestRawDataServiceClient = new RawDataServiceRestClient( serverUri );

			var partPath = PathHelper.String2PartPathInformation( _PartTextBox.Text );
			var parts = await _RestDataServiceClient.GetParts( partPath );
			var partsArray = parts as InspectionPlanPart[] ?? parts.ToArray();
			if( partsArray.Any() )
				_CurrentPart = partsArray.First();

			var chars = await _RestDataServiceClient.GetCharacteristics( partPath );
			var charsArray = chars as InspectionPlanCharacteristic[] ?? chars.ToArray();
			if( charsArray.Any() )
				_CurrentCharacteristics = charsArray;

			FillRawDataListView();
		}
Exemplo n.º 3
0
		private async void ConnectButtonClick( object sender, EventArgs e )
		{
			_ServerUri = new Uri( _ConnectionUrlTextBox.Text );

			_RestDataServiceClient = new DataServiceRestClient( _ServerUri );
			_RestRawDataServiceClient = new RawDataServiceRestClient( _ServerUri );

			await CheckConnection();
			await FetchConfiguration();
			await FetchCatalogs();

			_FetchDataControl.InitializeControl( _ServerUri, _Configuration, _Catalogs );
			_ModifyDataControl.InitializeControl( _ServerUri, _Configuration, _Catalogs );
		}