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


C# CmsWebServiceClient.GetAllPropertyListsAsync方法代码示例

本文整理汇总了C#中CmsWebServiceClient.GetAllPropertyListsAsync方法的典型用法代码示例。如果您正苦于以下问题:C# CmsWebServiceClient.GetAllPropertyListsAsync方法的具体用法?C# CmsWebServiceClient.GetAllPropertyListsAsync怎么用?C# CmsWebServiceClient.GetAllPropertyListsAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CmsWebServiceClient的用法示例。


在下文中一共展示了CmsWebServiceClient.GetAllPropertyListsAsync方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateAndBindDynamicProperties

        private void CreateAndBindDynamicProperties(InstrumentComponent instrumentComponent, List<String> pidDocuments, List<String> specDocuments)
        {
            int rowCount = 5;

            var controlSystemComponentProperies = instrumentComponent.InstrumentComponentType.InstrumentComponentTypeProperties.OrderBy(x => x.Ordinal).ToList();

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAllPropertyListsCompleted += (s, e) =>
            {

                foreach (var controlSystemComponentProperty in controlSystemComponentProperies.Where(x => x.InstrumentProperty.IsVisible))
                {

                    Label label = new Label();

                    Binding labelBinding = new Binding("Name")
                    {
                        Mode = BindingMode.OneTime,
                        Source = controlSystemComponentProperty.InstrumentProperty
                    };

                    label.SetBinding(ContentControl.ContentProperty, labelBinding);
                    label.VerticalAlignment = VerticalAlignment.Center;
                    label.Margin = new Thickness(1);

                    PropertiesGrid.Children.Add(label);
                    Grid.SetRow(label, rowCount);
                    Grid.SetColumn(label, 0);

                    var propertyValue = GetPropertyValue(instrumentComponent, controlSystemComponentProperty);

                    var element = Utils.BindElement(controlSystemComponentProperty.InstrumentProperty, propertyValue, e.Result,
                        ComponentPropertyWrapViewModels, ControlChanged, pidDocuments, specDocuments);

                    PropertiesGrid.Children.Add(element);
                    Grid.SetRow((FrameworkElement)element, rowCount);
                    Grid.SetColumn((FrameworkElement)element, 1);

                    PropertiesGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(element.Height + 2) });

                    rowCount++;
                }

                LastInspectedTextBox.ResetOriginalValue();
                LastInspectedTextBox.ControlChanged += ControlChanged;

                NextInspectionTextBox.ResetOriginalValue();
                NextInspectionTextBox.ControlChanged += ControlChanged;

            };
            cmsWebServiceClient.GetAllPropertyListsAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:52,代码来源:InstrumentPropertiesControl.xaml.cs

示例2: GetAllPropertyLists

 public static Task<List<PropertyList>> GetAllPropertyLists()
 {
     var task = new TaskCompletionSource<List<PropertyList>>();
     var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
     cee.GetAllPropertyListsCompleted += (s, e) => task.SetResult(e.Result);
     cee.GetAllPropertyListsAsync();
     return task.Task;
 }
开发者ID:barrett2474,项目名称:CMS2,代码行数:8,代码来源:DatabaseLoader.cs

示例3: CreateAndBindDynamicProperties

        private void CreateAndBindDynamicProperties(ControlSystemComponent controlSystemComponent, List<String> pidDocuments, List<String> specDocuments)
        {
            int rowCount = 5;

            var controlSystemComponentProperies = controlSystemComponent.ControlSystemComponentType.ControlSystemComponentTypeProperties.ToList();

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAllPropertyListsCompleted += (s, e) =>
            {
                List<ComponentTypeGroup> addedGroups = new List<ComponentTypeGroup>();

                foreach (var controlSystemComponentProperty in controlSystemComponentProperies.OrderBy(x => x.Ordinal).ThenBy(x => x.GroupOrdinal))
                {
                    //Skip Properties that are not visible
                    if (controlSystemComponentProperty.ControlSystemPropertyId.HasValue && !controlSystemComponentProperty.ControlSystemProperty.IsVisible) continue;

                    //Render Group
                    if (controlSystemComponentProperty.ComponentTypeGroupId.HasValue && !addedGroups.Contains(controlSystemComponentProperty.ComponentTypeGroup))
                    {
                        Label groupLabel = new Label
                        {
                            Content = controlSystemComponentProperty.ComponentTypeGroup.Name,
                            VerticalAlignment = VerticalAlignment.Center,
                            Margin = new Thickness(1),
                            FontWeight = FontWeights.Bold
                        };

                        PropertiesGrid.Children.Add(groupLabel);
                        Grid.SetRow(groupLabel, rowCount);
                        Grid.SetColumn(groupLabel, 0);
                        PropertiesGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(26) });
                        rowCount++;
                        addedGroups.Add(controlSystemComponentProperty.ComponentTypeGroup);

                        //This is a empty Group so don't need to render a Property
                        if (!controlSystemComponentProperty.ControlSystemPropertyId.HasValue) continue;
                    }

                    Label label = new Label();

                    Binding labelBinding = new Binding("Name")
                    {
                        Mode = BindingMode.OneTime,
                        Source = controlSystemComponentProperty.ControlSystemProperty
                    };

                    label.SetBinding(ContentControl.ContentProperty, labelBinding);
                    label.VerticalAlignment = VerticalAlignment.Center;
                    label.Margin = new Thickness(1);

                    PropertiesGrid.Children.Add(label);
                    Grid.SetRow(label, rowCount);
                    Grid.SetColumn(label, 0);

                    var propertyValue = GetPropertyValue(controlSystemComponent, controlSystemComponentProperty);

                    FrameworkElement element = Utils.BindElement(controlSystemComponentProperty.ControlSystemProperty, propertyValue,
                        e.Result, ComponentPropertyWrapViewModels, ControlChanged, pidDocuments, specDocuments);

                    PropertiesGrid.Children.Add(element);
                    Grid.SetRow((FrameworkElement)element, rowCount);
                    Grid.SetColumn((FrameworkElement)element, 1);

                    PropertiesGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(element.Height + 2) });

                    rowCount++;
                }

                LastInspectedTextBox.ResetOriginalValue();
                LastInspectedTextBox.ControlChanged += ControlChanged;

                NextInspectionTextBox.ResetOriginalValue();
                NextInspectionTextBox.ControlChanged += ControlChanged;
            };
            cmsWebServiceClient.GetAllPropertyListsAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:76,代码来源:ControlSystemPropertiesControl.xaml.cs

示例4: OkButtonHander

        private void OkButtonHander(object parameter)
        {
            if (AreAllValid())
            {
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.SavePropertyListNameCompleted +=
                    (s1, e1) =>
                    {
                        View.PropertyListName = e1.Result.EntityResult;

                        cmsWebServiceClient.GetAllPropertyListsCompleted += (s, e) =>
                        {
                            var exisitingPropertyList = (from x in e.Result where x.Id == View.PropertyListName.PropertyListId select x).FirstOrDefault();
                            if (exisitingPropertyList != null)
                            {
                                var exisitingPropertyListName = (from x in exisitingPropertyList.PropertyListNames where x.Id == View.PropertyListName.Id select x).FirstOrDefault();
                                if (exisitingPropertyListName != null)
                                {
                                    exisitingPropertyListName.Name = View.PropertyListName.Name;
                                    exisitingPropertyListName.Ordinal = View.PropertyListName.Ordinal;
                                }
                                else
                                {
                                    exisitingPropertyList.PropertyListNames.Add(View.PropertyListName);
                                }
                            }

                            View.DialogResult = true;

                        };
                        cmsWebServiceClient.GetAllPropertyListsAsync();

                    };
                cmsWebServiceClient.SavePropertyListNameAsync(mPropertyListName);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:37,代码来源:AddEditPropertyListNameViewModel.cs

示例5: LoadAllPropertyLists

        private void LoadAllPropertyLists()
        {
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAllPropertyListsCompleted += (s, e) =>
            {
                PropertyLists = e.Result;
                mListsLoaded = true;
                OnDataLoaded();

            };
            cmsWebServiceClient.GetAllPropertyListsAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:12,代码来源:AddEditEquipmentPropertyViewModel.cs

示例6: PopulatePropertyValues


//.........这里部分代码省略.........
                        };

                        PropertiesGrid.Children.Add(groupLabel);
                        Grid.SetRow(groupLabel, rowCount);
                        Grid.SetColumn(groupLabel, 0);
                        PropertiesGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(26) });
                        rowCount++;
                        addedGroups.Add(controlSystemComponentTypeTuningProperty.ComponentTypeGroup);
                    }

                    //Property Label
                    Label label = new Label();

                    Binding labelBinding = new Binding("Name")
                    {
                        Mode = BindingMode.OneTime,
                        Source = controlSystemComponentTypeTuningProperty.ControlSystemTuningProperty
                    };

                    label.SetBinding(ContentControl.ContentProperty, labelBinding);
                    label.VerticalAlignment = VerticalAlignment.Center;
                    label.Margin = new Thickness(1);

                    Silverlight.Controls.ToolTips.ToolTip nameTip = new Silverlight.Controls.ToolTips.ToolTip
                    {
                        Content = controlSystemComponentTypeTuningProperty.ControlSystemTuningProperty.Description
                    };
                    ToolTipService.SetToolTip(label, nameTip);

                    PropertiesGrid.Children.Add(label);
                    Grid.SetRow(label, rowCount);
                    Grid.SetColumn(label, 0);

                    var propertyValue = GetPropertyValue(controlSystemComponent, controlSystemComponentTypeTuningProperty);

                    var tuningPropertyWrapViewModel = new TuningPropertyWrapViewModel(controlSystemComponentTypeTuningProperty.ControlSystemTuningProperty, propertyValue);
                    TuningPropertyWrapViewModels.Add(tuningPropertyWrapViewModel);

                    //Property VALUE
                    var element = BindElementValue(tuningPropertyWrapViewModel, e.Result);
                    PropertiesGrid.Children.Add(element);
                    Grid.SetRow((FrameworkElement) element, rowCount);
                    Grid.SetColumn((FrameworkElement) element, 1);

                    //PCS Value
                    var pcsValueElement = BindElementPcsvalue(tuningPropertyWrapViewModel, "PcsValue");
                    pcsValueElement.IsHitTestVisible = false;
                    //((CmsTextBox)pcsValueElement).Background = new SolidColorBrush(Color.FromArgb(255, 239, 239, 239));

                    PropertiesGrid.Children.Add(pcsValueElement);
                    Grid.SetRow((FrameworkElement) pcsValueElement, rowCount);
                    Grid.SetColumn((FrameworkElement) pcsValueElement, 2);

                    //Trended
                    var trendedElement = BindCheckBoxElement(tuningPropertyWrapViewModel, "Trended");
                    ((FrameworkElement) trendedElement).HorizontalAlignment = HorizontalAlignment.Center;

                    PropertiesGrid.Children.Add(trendedElement);
                    Grid.SetRow((FrameworkElement) trendedElement, rowCount);
                    Grid.SetColumn((FrameworkElement) trendedElement, 3);

                    //Notes
                    var notesElement = BindElementTextBox(tuningPropertyWrapViewModel, "Notes");

                    PropertiesGrid.Children.Add(notesElement);
                    Grid.SetRow((FrameworkElement) notesElement, rowCount);
                    Grid.SetColumn((FrameworkElement) notesElement, 4);

                    //Accept
                    Button acceptButton = new Button {Content = "Accept"};
                    acceptButton.Height = 23;
                    acceptButton.DataContext = tuningPropertyWrapViewModel;
                    acceptButton.Command = tuningPropertyWrapViewModel.AcceptCommand;
                    acceptButton.IsEnabled = controlSystemComponentTypeTuningProperty.ControlSystemTuningProperty.IsEditable;

                    Binding visibilityBinding = new Binding("AcceptButtonVisibility")
                    {
                        Mode = BindingMode.OneWay,
                        Source = tuningPropertyWrapViewModel
                    };
                    acceptButton.SetBinding(VisibilityProperty, visibilityBinding);

                    acceptButton.Width = 60;
                    PropertiesGrid.Children.Add(acceptButton);
                    Grid.SetRow((FrameworkElement) acceptButton, rowCount);
                    Grid.SetColumn((FrameworkElement) acceptButton, 5);

                    //ModfiedUserDate
                    var modfiedUserDate = BindElementLabel(tuningPropertyWrapViewModel, "ModfiedUserDate");
                    PropertiesGrid.Children.Add(modfiedUserDate);
                    Grid.SetRow((FrameworkElement) modfiedUserDate, rowCount);
                    Grid.SetColumn((FrameworkElement) modfiedUserDate, 6);

                    PropertiesGrid.RowDefinitions.Add(new RowDefinition {Height = new GridLength(rowHeight)});

                    rowCount++;
                }
            };
            cmsWebServiceClient.GetAllPropertyListsAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:101,代码来源:ControlSystemTuningPropertiesControl.xaml.cs


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