private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            System.Windows.Data.CollectionViewSource itemsECLViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("itemsECLViewSource")));
            // Load data by setting the CollectionViewSource.Source property:
            // itemsECLViewSource.Source = [generic data source]
            System.Windows.Data.CollectionViewSource attributeValuesECLViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("attributeValuesECLViewSource")));
            // Load data by setting the CollectionViewSource.Source property:
            // attributeValuesECLViewSource.Source = [generic data source]

            // Initialize the Schema so it is available when we start accessing items.
            HIS.Library.HISSchema schema = HIS.Library.Common.HISSchema;
        }
        private void GetItems()
        {
            long   startTicks = PLLog.Trace("HISSchema Start()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1);
            double beginTicks;
            double bindingTicks;
            double firstTicks = startTicks;
            double frequency  = Stopwatch.Frequency;

            beginTicks = startTicks;

            // Initialize the Schema so it is available when we start accessing items.
            HIS.Library.HISSchema schema = HIS.Library.Common.HISSchema;

            itemsAll = HIS.Library.ItemsAll2.Get();

            itemsECLDataGrid.ItemsSource = itemsAll.Items;


            ////HIS.Library.HISSchema_ChildLoad hisSchema = HIS.Library.HISSchema_ChildLoad.Get();
            //hisSchema = HIS.Library.HISSchema_ChildLoad.Get();

            //startTicks = PLLog.Trace("HISSchemaECL_ChildLoad.Get", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //lblLoadTimeHISSchema.Content = string.Format("HISSchemaECL_ChildLoad.Get Parent Time ({0:f4}) seconds", (startTicks - beginTicks) / frequency);

            //beginTicks = startTicks;
            ////HIS.Library.ConstrainedValueListsECBL _ConstrainedValueLists = hisSchema.ConstrainedValueLists;
            //HIS.Library.ConstrainedValueListsECL _ConstrainedValueLists = hisSchema.ConstrainedValueLists;
            //bindingTicks = PLLog.Trace("HISSchemaECL_ChildLoad.ConstrainedValueLists()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            ////constrainedValueListsECBLBindingSource.DataSource = _ConstrainedValueLists;
            //constrainedValueListsECLDataGrid.ItemsSource = _ConstrainedValueLists;
            //startTicks = PLLog.Trace("HISSchemaECL_ChildLoad.ConstrainedValueLists() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //lblConstrainedValueLists.Content = string.Format("ConstrainedValueLists Time {0:f4} ({1:f4}) seconds", (startTicks - bindingTicks) / frequency, (bindingTicks - beginTicks) / frequency);

            //beginTicks = startTicks;
            //HIS.Library.ConstrainedValuesECL _ConstrainedValues = hisSchema.ConstrainedValues;
            //bindingTicks = PLLog.Trace("HISSchemaECL_ChildLoad.Tables()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            //// This shows all the values in the ConstrainedValues
            ////constrainedValuesECLDataGrid.ItemsSource = _ConstrainedValues;
            //// Instead we will selective load them from the SelectionChanged event.

            //startTicks = PLLog.Trace("HISSchemaECL_ChildLoad.ConstrainedValues() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //lblConstrainedValues.Content = string.Format("ConstrainedValues Time {0:f4} ({1:f4}) seconds", (startTicks - bindingTicks) / frequency, (bindingTicks - beginTicks) / frequency);

            //lblLoadTimeTotal.Content = string.Format("Total Time ({0:f4}) seconds", (startTicks - firstTicks) / frequency);
        }
Ejemplo n.º 3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     // Initialize the Schema so it is available when we start accessing items.
     _schema = HIS.Library.Common.HISSchema;
 }
        private void LoadHISSchema()
        {
            long   startTicks = PLLog.Trace("HISSchema Start()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1);
            long   fetchTicks;
            long   bindingTicks = 0;
            long   firstTicks   = startTicks;
            double frequency    = Stopwatch.Frequency;

            //HIS.Library.HISSchema HISSchema = HIS.Library.HISSchema.Get();
            HIS.Library.HISSchema HISSchema = HIS.Library.Common.HISSchema;

            //his.library.hisschemaerlp hisschemaerlp = his.library.hisschemaerlp.neweditablerootparent();
            fetchTicks = PLLog.Trace("HISSchemaECL.Get", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            lblLoadTimeHISSchema.Content = string.Format("HISSchemaECL.Get Parent Load Time ({0:f4}) seconds", (fetchTicks - startTicks) / frequency);

            bindingTicks = fetchTicks;

            startTicks = bindingTicks;
            HIS.Library.TypesECL _Types = HISSchema.Types;
            fetchTicks = PLLog.Trace("HISSchemaECL.Types()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //typesECBLBindingSource.DataSource = _Types;
            typesECBLDataGrid.ItemsSource = _Types;
            bindingTicks = PLLog.Trace("HISSchemaECL.Types() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblTypes.Content = string.Format("Types Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                             (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            startTicks = bindingTicks;
            HIS.Library.AttributesECL _Attributes = HISSchema.Attributes;
            fetchTicks = PLLog.Trace("HISSchemaECL.Attributes()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //attributesECBLBindingSource.DataSource = _Attributes;
            attributesECBLDataGrid.ItemsSource = _Attributes;
            bindingTicks = PLLog.Trace("HISSchemaECL.Attributes() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblAttributes.Content = string.Format("Attributes Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                                  (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            startTicks = fetchTicks;
            HIS.Library.TypeAttributesECL _TypeAttributes = HISSchema.TypeAttributes;
            fetchTicks = PLLog.Trace("HISSchemaECL.TypeAttributes()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //typeAttributesECBLBindingSource.DataSource = _TypeAttributes;
            typeAttributesECBLDataGrid.ItemsSource = _TypeAttributes;
            bindingTicks = PLLog.Trace("HISSchemaECL.TypeAttributes() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblTypeAttributes.Content = string.Format("TypeAttributes Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                                      (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            startTicks = bindingTicks;
            HIS.Library.DataTypesECL _DataTypesECBL = HISSchema.DataTypes;
            fetchTicks = PLLog.Trace("HISSchemaECL.DataTypes()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //dataTypesECBLBindingSource.DataSource = _DataTypesECBL;
            dataTypesECBLDataGrid.ItemsSource = _DataTypesECBL;
            bindingTicks = PLLog.Trace("HISSchemaECL.DataTypes() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblDataTypes.Content = string.Format("DataTypes Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                                 (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            startTicks = bindingTicks;
            HIS.Library.CharacteristicsECL _Chacteristics = HISSchema.Characteristics;
            fetchTicks = PLLog.Trace("HISSchemaECL.Characteristics()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //characteristicsECBLBindingSource.DataSource = _Chacteristics;
            characteristicsECBLDataGrid.ItemsSource = _Chacteristics;
            bindingTicks = PLLog.Trace("HISSchemaECL.Characteristics() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblCharacteristics.Content = string.Format("Characteristics Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                                       (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            startTicks = bindingTicks;
            HIS.Library.TablesECL _TablesECBL = HISSchema.Tables;
            fetchTicks = PLLog.Trace("HISSchemaECL.Tables()", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);
            //tablesECBLBindingSource.DataSource = _TablesECBL;
            tablesECBLDataGrid.ItemsSource = _TablesECBL;
            bindingTicks = PLLog.Trace("HISSchemaECL.Tables() Binding", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks);

            lblTables.Content = string.Format("Tables Time {0:f4} (F:{1:f4} B:{2:f4}) seconds",
                                              (bindingTicks - startTicks) / frequency, (fetchTicks - startTicks) / frequency, (bindingTicks - fetchTicks) / frequency);

            lblLoadTimeTotal.Content = string.Format("LoadTime Total ({0:f4}) seconds", (bindingTicks - firstTicks) / frequency);
        }