Пример #1
0
        private void OnHighlightSelectedManagerTypes()
        {
            if (this.comp_manager == null)
            {
                return;
            }

            List <string> selected_managers = new List <string>(this.existing_manager_types.Where(x => x.IsSelected == true).Select(x => x.ObjectData));
            List <ComponentManagerType> sm  = new List <ComponentManagerType>();

            foreach (string man in selected_managers)
            {
                sm.Add(ComponentUtils.StringToComponentManagerType(man));
            }

            this.canv.Highlight(sm, this.managers_or);
        }
        private void ParseSummaryFile()
        {
            switch (this.FCode)
            {
            case (int)ParamStructCommonSaveCode.ENTITY_START:
                if (this.current_file_record != null)
                {
                    this.loaded_file_records.Add(this.current_file_record);
                }
                this.current_file_record          = new PartialFileRecord();
                this.current_file_record.FileName = DXFDistributedDecoder.ReconstructAbsolutePathFromRelative(this.SummaryFileName, this.FValue);
                break;

            case (int)ParamStructCommonSaveCode.ENTITY_KEY:
                if (this.current_file_record != null)
                {
                    this.current_file_record.Manager = ComponentUtils.StringToComponentManagerType(this.FValue);
                }
                break;

            case (int)ParamStructCommonSaveCode.TIME_STAMP:
                if (this.current_file_record != null)
                {
                    DateTime dt_tmp;
                    bool     success = DateTime.TryParse(this.FValue, ParamStructTypes.DT_FORMATTER, System.Globalization.DateTimeStyles.None, out dt_tmp);
                    if (success)
                    {
                        this.current_file_record.LastModified = dt_tmp;
                    }
                }
                break;

            case (int)ParamStructCommonSaveCode.X_VALUE:
                if (this.current_file_record != null)
                {
                    int  nr_locks;
                    bool success = Int32.TryParse(this.FValue, out nr_locks);
                    this.current_file_record.NrLocks = nr_locks;
                }
                break;
            }
        }