public DataPaneCallback(DataSchemaItem dataSchemaItem)
            {
                DataSchemaNode node = dataSchemaItem.DataSchemaNodePath.Node;

                this.property       = ((SampleCompositeType)node.Parent.SampleType).GetSampleProperty(node.PathName);
                this.configuration  = new SampleDataPropertyConfiguration(this.property);
                this.messageService = dataSchemaItem.ViewModel.DesignerContext.MessageDisplayService;
            }
示例#2
0
 public SampleDataPropertyConfiguration(SampleProperty sampleProperty)
 {
     this.activeType      = (SampleBasicType)sampleProperty.PropertySampleType;
     this.valueGenerators = new Dictionary <SampleBasicType, ISampleTypeConfiguration>();
     foreach (SampleBasicType sampleBasicType in SampleBasicType.SampleBasicTypes)
     {
         string format           = sampleBasicType == sampleProperty.PropertySampleType ? sampleProperty.Format : (string)null;
         string formatParameters = sampleBasicType == sampleProperty.PropertySampleType ? sampleProperty.FormatParameters : (string)null;
         ISampleTypeConfiguration configuration = SampleDataPropertyConfiguration.CreateConfiguration(sampleProperty.DeclaringDataSet, sampleBasicType, format, formatParameters);
         this.valueGenerators.Add(sampleBasicType, configuration);
     }
 }
示例#3
0
        public void UpdateSampleProperty()
        {
            SampleDataPropertyConfiguration typeConfiguration = this.SampleTypeConfiguration;
            SampleProperty sampleProperty = this.SampleProperty;

            if (typeConfiguration.SampleType == sampleProperty.PropertySampleType && typeConfiguration.Format == sampleProperty.Format && typeConfiguration.FormatParameters == sampleProperty.FormatParameters)
            {
                return;
            }
            this.Model.SetModified();
            this.SampleProperty.ChangeTypeAndFormat((Microsoft.Expression.DesignSurface.SampleData.SampleType)typeConfiguration.SampleType, typeConfiguration.Format, typeConfiguration.FormatParameters);
            if (sampleProperty.PropertySampleType == SampleBasicType.Image)
            {
                this.SampleDataSet.EnsureSampleImages();
            }
            this.Model.UpdateEditingCollection();
        }