Esempio n. 1
0
        public void TestWriterPropertyTable()
        {
            HeaderBlock   headerBlock = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
            PropertyTable table       = new PropertyTable(headerBlock);

            DocumentProperty workbook = new DocumentProperty("Workbook", 0x00046777);

            workbook.StartBlock = 0;

            DocumentProperty summary1 = new DocumentProperty("\x0005SummaryInformation", 0x00001000);

            summary1.StartBlock = 0x00000234;

            DocumentProperty summary2 = new DocumentProperty("\x0005DocumentSummaryInformation", 0x00001000);

            summary2.StartBlock = 0x0000023C;
            table.AddProperty(workbook);
            RootProperty root = table.Root;

            root.AddChild(workbook);
            table.AddProperty(summary1);
            root = table.Root;
            root.AddChild(summary1);
            table.AddProperty(summary2);
            root = table.Root;
            root.AddChild(summary2);
            table.PreWrite();

            string[] testblock =
            {
                "52 00 6F 00 6F 00 74 00 20 00 45 00 6E 00 74 00 72 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "16 00 05 01 FF FF FF FF FF FF FF FF 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FE FF FF FF 00 00 00 00 00 00 00 00",
                "57 00 6F 00 72 00 6B 00 62 00 6F 00 6F 00 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "12 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 67 04 00 00 00 00 00",
                "05 00 53 00 75 00 6D 00 6D 00 61 00 72 00 79 00 49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00",
                "69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 01 00 00 00 03 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 02 00 00 00 10 00 00 00 00 00 00",
                "05 00 44 00 6F 00 63 00 75 00 6D 00 65 00 6E 00 74 00 53 00 75 00 6D 00 6D 00 61 00 72 00 79 00",
                "49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00 69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00",
                "38 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3C 02 00 00 00 10 00 00 00 00 00 00",
            };

            ConfirmBlockEncoding(testblock, table);

            table.RemoveProperty(summary1);
            root = table.Root;
            root.DeleteChild(summary1);
            table.PreWrite();

            string[] testblock2 =
            {
                "52 00 6F 00 6F 00 74 00 20 00 45 00 6E 00 74 00 72 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "16 00 05 01 FF FF FF FF FF FF FF FF 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FE FF FF FF 00 00 00 00 00 00 00 00",
                "57 00 6F 00 72 00 6B 00 62 00 6F 00 6F 00 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "12 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 67 04 00 00 00 00 00",
                "05 00 44 00 6F 00 63 00 75 00 6D 00 65 00 6E 00 74 00 53 00 75 00 6D 00 6D 00 61 00 72 00 79 00",
                "49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00 69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00",
                "38 00 02 01 01 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3C 02 00 00 00 10 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
            };
            ConfirmBlockEncoding(testblock2, table);

            table.AddProperty(summary1);
            root = table.Root;
            root.AddChild(summary1);
            table.PreWrite();

            string[] testblock3 =
            {
                "52 00 6F 00 6F 00 74 00 20 00 45 00 6E 00 74 00 72 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "16 00 05 01 FF FF FF FF FF FF FF FF 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FE FF FF FF 00 00 00 00 00 00 00 00",
                "57 00 6F 00 72 00 6B 00 62 00 6F 00 6F 00 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "12 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 67 04 00 00 00 00 00",
                "05 00 44 00 6F 00 63 00 75 00 6D 00 65 00 6E 00 74 00 53 00 75 00 6D 00 6D 00 61 00 72 00 79 00",
                "49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00 69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00",
                "38 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3C 02 00 00 00 10 00 00 00 00 00 00",
                "05 00 53 00 75 00 6D 00 6D 00 61 00 72 00 79 00 49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00",
                "69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 01 00 00 00 02 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 02 00 00 00 10 00 00 00 00 00 00",
            };
            ConfirmBlockEncoding(testblock3, table);
        }
Esempio n. 2
0
        /// <remarks>Useful for querying about an area of FLEx that the user is not in.</remarks>
        internal static string GetProjectConfigurationDirectory(PropertyTable propertyTable, string area)
        {
            var cache = propertyTable.GetValue <LcmCache>("cache");

            return(area == null ? null : Path.Combine(LcmFileHelper.GetConfigSettingsDir(cache.ProjectId.ProjectFolder), area));
        }
Esempio n. 3
0
        internal static void DisplayEntries(LcmCache cache, IWin32Window owner, Mediator mediator, PropertyTable propertyTable,
                                            IHelpTopicProvider helpProvider, string helpFileKey, ITsString tssWfIn, IWfiAnalysis wfa)
        {
            ITsString tssWf   = tssWfIn;
            var       entries = FindEntriesForWordformUI(cache, tssWf, wfa);

            IVwStylesheet styleSheet = GetStyleSheet(cache, propertyTable);

            if (entries == null || entries.Count == 0)
            {
                ILexEntry entry = ShowFindEntryDialog(cache, mediator, propertyTable, tssWf, owner);
                if (entry == null)
                {
                    return;
                }
                entries = new List <ILexEntry>(1);
                entries.Add(entry);
            }
            DisplayEntriesRecursive(cache, owner, mediator, propertyTable, styleSheet, helpProvider, helpFileKey, entries, tssWf);
        }
Esempio n. 4
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Launch the Find Entry dialog, and if one is created or selected return it.
 /// </summary>
 /// <param name="cache">The cache.</param>
 /// <param name="mediator">The mediator.</param>
 /// <param name="propertyTable"></param>
 /// <param name="tssForm">The TSS form.</param>
 /// <param name="owner">The owner.</param>
 /// <returns>The HVO of the selected or created entry</returns>
 /// ------------------------------------------------------------------------------------
 internal static ILexEntry ShowFindEntryDialog(LcmCache cache, Mediator mediator, PropertyTable propertyTable,
                                               ITsString tssForm, IWin32Window owner)
 {
     using (EntryGoDlg entryGoDlg = new EntryGoDlg())
     {
         // Temporarily set TopMost to true so it will launch above any calling app (e.g. Paratext)
         // but reset after activated.
         SetCurrentModalForm(entryGoDlg);
         var wp = new WindowParams
         {
             m_btnText = FdoUiStrings.ksShow,
             m_title   = FdoUiStrings.ksFindInDictionary,
             m_label   = FdoUiStrings.ksFind_
         };
         if (owner == null)
         {
             entryGoDlg.StartPosition = FormStartPosition.CenterScreen;
         }
         entryGoDlg.Owner = owner as Form;
         entryGoDlg.SetDlgInfo(cache, wp, mediator, propertyTable, tssForm);
         entryGoDlg.SetHelpTopic("khtpFindInDictionary");
         if (entryGoDlg.ShowDialog() == DialogResult.OK)
         {
             var entry = entryGoDlg.SelectedObject as ILexEntry;
             Debug.Assert(entry != null);
             return(entry);
         }
     }
     return(null);
 }
Esempio n. 5
0
        public void Read(ReaderContext ctxt)
        {
            var reader = ctxt.GetTablesReader();

            var actualReserved0 = reader.ReadUInt32();

            if (actualReserved0 != reserved0)
            {
                throw new PEException("invalid MetadataTable header");
            }
            var actualMajorVersion = reader.ReadByte();

            if (actualMajorVersion != majorVersion)
            {
                throw new PEException("invalid MetadataTable header");
            }
            var actualMinorVersion = reader.ReadByte();

            if (actualMinorVersion != minorVersion)
            {
                throw new PEException("invalid MetadataTable header");
            }
            var heapSizes = reader.ReadByte();

            IsStringStreamBig = (heapSizes & 0x01) != 0;
            IsGuidStreamBig   = (heapSizes & 0x02) != 0;
            IsBlobStreamBig   = (heapSizes & 0x04) != 0;
            Reserved1         = reader.ReadByte();

            var valid  = new IntSet64(reader.ReadUInt64());
            var sorted = new IntSet64(reader.ReadUInt64());

            for (var i = 0; i < 64; i++)
            {
                var numRows = 0;
                if (valid[i])
                {
                    numRows = (int)reader.ReadUInt32();
                }

                switch ((TableTag)i)
                {
                case TableTag.Module:
                    ModuleTable = new ModuleTable(numRows);
                    break;

                case TableTag.Assembly:
                    AssemblyTable = new AssemblyTable(numRows);
                    break;

                case TableTag.AssemblyOS:
                    AssemblyOSTable = new AssemblyOSTable(numRows);
                    break;

                case TableTag.AssemblyProcessor:
                    AssemblyProcessorTable = new AssemblyProcessorTable(numRows);
                    break;

                case TableTag.AssemblyRef:
                    AssemblyRefTable = new AssemblyRefTable(numRows);
                    break;

                case TableTag.AssemblyRefOS:
                    AssemblyRefOSTable = new AssemblyRefOSTable(numRows);
                    break;

                case TableTag.AssemblyRefProcessor:
                    AssemblyRefProcessorTable = new AssemblyRefProcessorTable(numRows);
                    break;

                case TableTag.ClassLayout:
                    ClassLayoutTable = new ClassLayoutTable(numRows);
                    break;

                case TableTag.Constant:
                    ConstantTable = new ConstantTable(numRows);
                    break;

                case TableTag.CustomAttribute:
                    CustomAttributeTable = new CustomAttributeTable(numRows);
                    break;

                case TableTag.DeclSecurity:
                    DeclSecurityTable = new DeclSecurityTable(numRows);
                    break;

                case TableTag.EventMap:
                    EventMapTable = new EventMapTable(numRows);
                    break;

                case TableTag.Event:
                    EventTable = new EventTable(numRows);
                    break;

                case TableTag.ExportedType:
                    ExportedTypeTable = new ExportedTypeTable(numRows);
                    break;

                case TableTag.Field:
                    FieldTable = new FieldTable(numRows);
                    break;

                case TableTag.FieldLayout:
                    FieldLayoutTable = new FieldLayoutTable(numRows);
                    break;

                case TableTag.FieldMarshal:
                    FieldMarshalTable = new FieldMarshalTable(numRows);
                    break;

                case TableTag.FieldRVA:
                    FieldRVATable = new FieldRVATable(numRows);
                    break;

                case TableTag.File:
                    FileTable = new FileTable(numRows);
                    break;

                case TableTag.GenericParam:
                    GenericParamTable = new GenericParamTable(numRows);
                    break;

                case TableTag.GenericParamConstraint:
                    GenericParamConstraintTable = new GenericParamConstraintTable(numRows);
                    break;

                case TableTag.ImplMap:
                    ImplMapTable = new ImplMapTable(numRows);
                    break;

                case TableTag.InterfaceImpl:
                    InterfaceImplTable = new InterfaceImplTable(numRows);
                    break;

                case TableTag.ManifestResource:
                    ManifestResourceTable = new ManifestResourceTable(numRows);
                    break;

                case TableTag.MemberRef:
                    MemberRefTable = new MemberRefTable(numRows);
                    break;

                case TableTag.MethodDef:
                    MethodDefTable = new MethodDefTable(numRows);
                    break;

                case TableTag.MethodImpl:
                    MethodImplTable = new MethodImplTable(numRows);
                    break;

                case TableTag.MethodSemantics:
                    MethodSemanticsTable = new MethodSemanticsTable(numRows);
                    break;

                case TableTag.MethodSpec:
                    MethodSpecTable = new MethodSpecTable(numRows);
                    break;

                case TableTag.ModuleRef:
                    ModuleRefTable = new ModuleRefTable(numRows);
                    break;

                case TableTag.NestedClass:
                    NestedClassTable = new NestedClassTable(numRows);
                    break;

                case TableTag.Param:
                    ParamTable = new ParamTable(numRows);
                    break;

                case TableTag.Property:
                    PropertyTable = new PropertyTable(numRows);
                    break;

                case TableTag.PropertyMap:
                    PropertyMapTable = new PropertyMapTable(numRows);
                    break;

                case TableTag.StandAloneSig:
                    StandAloneSigTable = new StandAloneSigTable(numRows);
                    break;

                case TableTag.TypeDef:
                    TypeDefTable = new TypeDefTable(numRows);
                    break;

                case TableTag.TypeRef:
                    TypeRefTable = new TypeRefTable(numRows);
                    break;

                case TableTag.TypeSpec:
                    TypeSpecTable = new TypeSpecTable(numRows);
                    break;

                default:
                    // Ignore
                    break;
                }
            }

            DetermineIndexCodingSizes();

            for (var i = 0; i < 64; i++)
            {
                if (valid[i])
                {
                    switch ((TableTag)i)
                    {
                    case TableTag.Module:
                        ModuleTable.Read(ctxt, reader);
                        break;

                    case TableTag.Assembly:
                        AssemblyTable.Read(ctxt, reader);
                        break;

                    case TableTag.AssemblyOS:
                        AssemblyOSTable.Read(ctxt, reader);
                        break;

                    case TableTag.AssemblyProcessor:
                        AssemblyProcessorTable.Read(ctxt, reader);
                        break;

                    case TableTag.AssemblyRef:
                        AssemblyRefTable.Read(ctxt, reader);
                        break;

                    case TableTag.AssemblyRefOS:
                        AssemblyRefOSTable.Read(ctxt, reader);
                        break;

                    case TableTag.AssemblyRefProcessor:
                        AssemblyRefProcessorTable.Read(ctxt, reader);
                        break;

                    case TableTag.ClassLayout:
                        ClassLayoutTable.Read(ctxt, reader);
                        break;

                    case TableTag.Constant:
                        ConstantTable.Read(ctxt, reader);
                        break;

                    case TableTag.CustomAttribute:
                        CustomAttributeTable.Read(ctxt, reader);
                        break;

                    case TableTag.DeclSecurity:
                        DeclSecurityTable.Read(ctxt, reader);
                        break;

                    case TableTag.EventMap:
                        EventMapTable.Read(ctxt, reader);
                        break;

                    case TableTag.Event:
                        EventTable.Read(ctxt, reader);
                        break;

                    case TableTag.ExportedType:
                        ExportedTypeTable.Read(ctxt, reader);
                        break;

                    case TableTag.Field:
                        FieldTable.Read(ctxt, reader);
                        break;

                    case TableTag.FieldLayout:
                        FieldLayoutTable.Read(ctxt, reader);
                        break;

                    case TableTag.FieldMarshal:
                        FieldMarshalTable.Read(ctxt, reader);
                        break;

                    case TableTag.FieldRVA:
                        FieldRVATable.Read(ctxt, reader);
                        break;

                    case TableTag.File:
                        FileTable.Read(ctxt, reader);
                        break;

                    case TableTag.GenericParam:
                        GenericParamTable.Read(ctxt, reader);
                        break;

                    case TableTag.GenericParamConstraint:
                        GenericParamConstraintTable.Read(ctxt, reader);
                        break;

                    case TableTag.ImplMap:
                        ImplMapTable.Read(ctxt, reader);
                        break;

                    case TableTag.InterfaceImpl:
                        InterfaceImplTable.Read(ctxt, reader);
                        break;

                    case TableTag.ManifestResource:
                        ManifestResourceTable.Read(ctxt, reader);
                        break;

                    case TableTag.MemberRef:
                        MemberRefTable.Read(ctxt, reader);
                        break;

                    case TableTag.MethodDef:
                        MethodDefTable.Read(ctxt, reader);
                        break;

                    case TableTag.MethodImpl:
                        MethodImplTable.Read(ctxt, reader);
                        break;

                    case TableTag.MethodSemantics:
                        MethodSemanticsTable.Read(ctxt, reader);
                        break;

                    case TableTag.MethodSpec:
                        MethodSpecTable.Read(ctxt, reader);
                        break;

                    case TableTag.ModuleRef:
                        ModuleRefTable.Read(ctxt, reader);
                        break;

                    case TableTag.NestedClass:
                        NestedClassTable.Read(ctxt, reader);
                        break;

                    case TableTag.Param:
                        ParamTable.Read(ctxt, reader);
                        break;

                    case TableTag.Property:
                        PropertyTable.Read(ctxt, reader);
                        break;

                    case TableTag.PropertyMap:
                        PropertyMapTable.Read(ctxt, reader);
                        break;

                    case TableTag.StandAloneSig:
                        StandAloneSigTable.Read(ctxt, reader);
                        break;

                    case TableTag.TypeDef:
                        TypeDefTable.Read(ctxt, reader);
                        break;

                    case TableTag.TypeRef:
                        TypeRefTable.Read(ctxt, reader);
                        break;

                    case TableTag.TypeSpec:
                        TypeSpecTable.Read(ctxt, reader);
                        break;

                    default:
                        throw new PEException("unexpected table tag in MetadataTable body");
                    }
                }
            }

            ModuleTable.ResolveIndexes(ctxt);
            TypeRefTable.ResolveIndexes(ctxt);
            TypeDefTable.ResolveIndexes(ctxt);
            FieldTable.ResolveIndexes(ctxt);
            MethodDefTable.ResolveIndexes(ctxt);
            ParamTable.ResolveIndexes(ctxt);
            InterfaceImplTable.ResolveIndexes(ctxt);
            MemberRefTable.ResolveIndexes(ctxt);
            ConstantTable.ResolveIndexes(ctxt);
            CustomAttributeTable.ResolveIndexes(ctxt);
            FieldMarshalTable.ResolveIndexes(ctxt);
            DeclSecurityTable.ResolveIndexes(ctxt);
            ClassLayoutTable.ResolveIndexes(ctxt);
            FieldLayoutTable.ResolveIndexes(ctxt);
            StandAloneSigTable.ResolveIndexes(ctxt);
            EventMapTable.ResolveIndexes(ctxt);
            EventTable.ResolveIndexes(ctxt);
            PropertyMapTable.ResolveIndexes(ctxt);
            PropertyTable.ResolveIndexes(ctxt);
            MethodSemanticsTable.ResolveIndexes(ctxt);
            MethodImplTable.ResolveIndexes(ctxt);
            ModuleRefTable.ResolveIndexes(ctxt);
            TypeSpecTable.ResolveIndexes(ctxt);
            ImplMapTable.ResolveIndexes(ctxt);
            FieldRVATable.ResolveIndexes(ctxt);
            AssemblyTable.ResolveIndexes(ctxt);
            AssemblyProcessorTable.ResolveIndexes(ctxt);
            AssemblyOSTable.ResolveIndexes(ctxt);
            AssemblyRefTable.ResolveIndexes(ctxt);
            AssemblyRefProcessorTable.ResolveIndexes(ctxt);
            AssemblyRefOSTable.ResolveIndexes(ctxt);
            FileTable.ResolveIndexes(ctxt);
            ExportedTypeTable.ResolveIndexes(ctxt);
            ManifestResourceTable.ResolveIndexes(ctxt);
            NestedClassTable.ResolveIndexes(ctxt);
            GenericParamTable.ResolveIndexes(ctxt);
            MethodSpecTable.ResolveIndexes(ctxt);
            GenericParamConstraintTable.ResolveIndexes(ctxt);
        }
Esempio n. 6
0
        internal static void DisplayEntry(LcmCache cache, IWin32Window owner, Mediator mediator, PropertyTable propertyTable,
                                          IHelpTopicProvider helpProvider, string helpFileKey, ITsString tssWfIn)
        {
            ITsString  tssWf = tssWfIn;
            LexEntryUi leui  = null;

            try
            {
                leui = FindEntryForWordform(cache, tssWf);

                // if we do not find a match for the word then try converting it to lowercase and see if there
                // is an entry in the lexicon for the Wordform in lowercase. This is needed for occurences of
                // words which are capitalized at the beginning of sentences.  LT-7444 RickM
                if (leui == null)
                {
                    //We need to be careful when converting to lowercase therefore use Icu.ToLower()
                    //get the WS of the tsString
                    int wsWf = TsStringUtils.GetWsAtOffset(tssWf, 0);
                    //use that to get the locale for the WS, which is used for
                    string       wsLocale = cache.ServiceLocator.WritingSystemManager.Get(wsWf).IcuLocale;
                    string       sLower   = Icu.UnicodeString.ToLower(tssWf.Text, wsLocale);
                    ITsTextProps ttp      = tssWf.get_PropertiesAt(0);
                    tssWf = TsStringUtils.MakeString(sLower, ttp);
                    leui  = FindEntryForWordform(cache, tssWf);
                }

                EnsureWindowConfiguration(propertyTable);
                IVwStylesheet styleSheet = GetStyleSheet(cache, propertyTable);
                if (leui == null)
                {
                    ILexEntry entry = ShowFindEntryDialog(cache, mediator, propertyTable, tssWf, owner);
                    if (entry == null)
                    {
                        return;
                    }
                    leui = new LexEntryUi(entry);
                }
                if (mediator != null)
                {
                    leui.Mediator = mediator;
                }
                if (propertyTable != null)
                {
                    leui.PropTable = propertyTable;
                }
                leui.ShowSummaryDialog(owner, tssWf, helpProvider, helpFileKey, styleSheet);
            }
            finally
            {
                if (leui != null)
                {
                    leui.Dispose();
                }
            }
        }
Esempio n. 7
0
 public dlgMethodTest()
 {
     InitializeComponent();
     parameters = new PropertyTable();
     propertyGrid1.SelectedObject = parameters;
 }
 public virtual void VisitPropertyTable(PropertyTable table)
 {
 }
Esempio n. 9
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="mediator"></param>
 /// <param name="propertyTable"></param>
 public AutomicReferencePOSDisabledSlice(LcmCache cache, ICmObject obj, int flid, Mediator mediator, PropertyTable propertyTable)
     : base(cache, obj, flid, mediator, propertyTable)
 {
     if (m_tree != null)
     {
         m_tree.ForeColor = SystemColors.GrayText;
     }
 }
Esempio n. 10
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="mediator"></param>
        /// <param name="propertyTable"></param>
        public AtomicReferencePOSSlice(LcmCache cache, ICmObject obj, int flid, Mediator mediator, PropertyTable propertyTable)
            : base(new UserControl(), cache, obj, flid)
        {
            IVwStylesheet stylesheet = FontHeightAdjuster.StyleSheetFromPropertyTable(propertyTable);
            CoreWritingSystemDefinition defAnalWs = m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem;

            m_tree = new TreeCombo();
            m_tree.WritingSystemFactory = cache.WritingSystemFactory;
            m_tree.WritingSystemCode    = defAnalWs.Handle;
            m_tree.Font       = new Font(defAnalWs.DefaultFontName, 10);
            m_tree.StyleSheet = stylesheet;
            if (!Application.RenderWithVisualStyles)
            {
                m_tree.HasBorder = false;
            }
            // We embed the tree combo in a layer of UserControl, so it can have a fixed width
            // while the parent window control is, as usual, docked 'fill' to work with the splitter.
            m_tree.Dock  = DockStyle.Left;
            m_tree.Width = 200;
            Control.Controls.Add(m_tree);
            if (m_pOSPopupTreeManager == null)
            {
                ICmPossibilityList list;
                int ws;
                if (obj is IReversalIndexEntry)
                {
                    var rie = obj as IReversalIndexEntry;
                    list = rie.ReversalIndex.PartsOfSpeechOA;
                    ws   = m_cache.ServiceLocator.WritingSystemManager.GetWsFromStr(rie.ReversalIndex.WritingSystem);
                }
                else
                {
                    list = m_cache.LanguageProject.PartsOfSpeechOA;
                    ws   = m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem.Handle;
                }
                m_tree.WritingSystemCode           = ws;
                m_pOSPopupTreeManager              = new POSPopupTreeManager(m_tree, m_cache, list, ws, false, mediator, propertyTable, propertyTable.GetValue <Form>("window"));
                m_pOSPopupTreeManager.AfterSelect += m_pOSPopupTreeManager_AfterSelect;
            }
            try
            {
                m_handlingMessage = true;
                m_pOSPopupTreeManager.LoadPopupTree(POS == null ? 0 : POS.Hvo);
            }
            finally
            {
                m_handlingMessage = false;
            }
            Control.Height = m_tree.PreferredHeight;
            // m_tree has sensible PreferredHeight once the text is set, UserControl does not.
            // we need to set the Height after m_tree.Text has a value set to it.
        }
Esempio n. 11
0
 public void SetMediator(Mediator mediator, PropertyTable propertyTable)
 {
     m_interestingTexts = GetInterestingTextList(mediator, propertyTable, m_services);
     m_interestingTexts.InterestingTextsChanged += m_interestingTexts_InterestingTextsChanged;
 }
Esempio n. 12
0
 public TestClerk(Mediator mediator, PropertyTable propertyTable, IStText stText)
 {
     m_mediator      = mediator;
     m_propertyTable = propertyTable;
     m_stText        = stText;
 }
Esempio n. 13
0
 public PublicationActivator(PropertyTable propertyTable)
 {
     m_currentPublication = propertyTable.GetStringProperty("SelectedPublication", null);
     m_propertyTable      = propertyTable;
 }
Esempio n. 14
0
 /// <summary>
 /// Returns the path to the current Dictionary or ReversalIndex configuration file, based on client specification or the current tool
 /// Guarantees that the path is set to an existing configuration file, which may cause a redisplay of the XHTML view.
 /// </summary>
 public static string GetCurrentConfiguration(PropertyTable propertyTable, string innerConfigDir = null)
 {
     return(GetCurrentConfiguration(propertyTable, true, innerConfigDir));
 }
Esempio n. 15
0
        /// <summary>
        /// Create and initialize the browse view, storing the data it will display.
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="stylesheet">The stylesheet.</param>
        /// <param name="mediator">The mediator.</param>
        /// <param name="propertyTable"></param>
        /// <param name="xnConfig">The config node.</param>
        /// <param name="objs">The objs.</param>
        public void Initialize(LcmCache cache, IVwStylesheet stylesheet, Mediator mediator, PropertyTable propertyTable,
                               XmlNode xnConfig, IEnumerable <ICmObject> objs)
        {
            CheckDisposed();
            m_cache         = cache;
            m_stylesheet    = stylesheet;
            m_mediator      = mediator;
            m_propertyTable = propertyTable;
            m_configNode    = xnConfig;
            SuspendLayout();
            m_listPublisher = new ObjectListPublisher(cache.DomainDataByFlid as ISilDataAccessManaged, ObjectListFlid);

            StoreData(objs);
            m_bvList = new BrowseViewer(m_configNode, m_cache.LanguageProject.Hvo, ObjectListFlid, m_cache, m_mediator, m_propertyTable,
                                        null, m_listPublisher);
            m_bvList.Location = new Point(0, 0);
            m_bvList.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom |
                                AnchorStyles.Right;
            m_bvList.Name              = "m_bvList";
            m_bvList.Sorter            = null;
            m_bvList.TabStop           = true;
            m_bvList.StyleSheet        = m_stylesheet;
            m_bvList.Dock              = DockStyle.Fill;
            m_bvList.SelectionChanged += m_bvList_SelectionChanged;
            Controls.Add(m_bvList);
            ResumeLayout(false);
        }
Esempio n. 16
0
		private static void AddProperty(PropertyTable propertyTable, ICollection<PropertyBinding> memberList, Type declaringType, PropertyBinding memberBinding, MemberInfo memberInfo)
		{
			// Check if we already have a member with the same name declared.
			PropertyTable.Entry exisitingMemberEntry = propertyTable[memberBinding.Name];
	
			if (exisitingMemberEntry != null)
			{
				// Ok we have one. Check if the existing member is not more specific.
				if (ExistingMemberIsMoreSpecific(declaringType, exisitingMemberEntry.MemberInfo, memberInfo))
				{
					// The existing member is more specific. So we don't add the new one.
					return;
				}
				else
				{
					// The new member is more specific. Remove the old one.
					propertyTable.Remove(exisitingMemberEntry);
					memberList.Remove(exisitingMemberEntry.PropertyBinding);
				}
			}
	
			// Either the new member is more specific or we don't had
			// a member with same name.
			propertyTable.Add(memberBinding, memberInfo);
			memberList.Add(memberBinding);
		}
Esempio n. 17
0
        private void AddBinding(PropertyTable table, string label, Hotkey hotkey, string tooltip = null)
        {
            var           hk       = FetchBinding(hotkey);
            string        hkstring = CreateBindingText(hotkey);
            LabelProperty prop     = new LabelProperty(null)
            {
                Value = hkstring,
                Name  = hotkey.ToString(),
            };
            var row = table.Add(label, prop);

            if (tooltip != null)
            {
                row.Tooltip = tooltip;
            }
            prop.Clicked += (o, e) =>
            {
                ShowHotkeyWindow(hotkey, prop, 0);
            };
            prop.RightClicked += (o, e) =>
            {
                Menu opt = new Menu(_canvas);
                opt.AddItem("Change Primary").Clicked += (_o, _e) =>
                {
                    ShowHotkeyWindow(hotkey, prop, 0);
                };
                opt.AddItem("Change Secondary").Clicked += (_o, _e) =>
                {
                    ShowHotkeyWindow(hotkey, prop, 1);
                };
                opt.AddItem("Remove Secondary").Clicked += (_o, _e) =>
                {
                    var k = Settings.Keybinds[hotkey];
                    if (k.Count > 1)
                    {
                        k.RemoveAt(1);
                        prop.Value = CreateBindingText(hotkey);
                        Settings.Save();
                    }
                };
                opt.AddItem("Restore Default").Clicked += (_o, _e) =>
                {
                    var def = Settings.GetHotkeyDefault(hotkey);
                    if (def != null && def.Count != 0)
                    {
                        int idx  = 0;
                        var keys = Settings.Keybinds[hotkey];
                        keys.Clear();
                        foreach (var defaultbind in def)
                        {
                            var conflict = Settings.CheckConflicts(defaultbind, hotkey);
                            if (conflict != Hotkey.None)
                            {
                                RemoveKeybind(conflict, defaultbind);
                            }
                            ChangeKeybind(prop, hotkey, idx++, defaultbind);
                        }
                        Settings.Save();
                    }
                };
                opt.Open(Pos.Center);
            };
        }
Esempio n. 18
0
 /// <returns>true iff activation was needed (the requested Reversal Index was not already active)</returns>
 private static bool ActivateReversalIndexIfNeeded(string newReversalGuid, PropertyTable propertyTable, RecordClerk clerk, out string oldReversalGuid)
 {
     oldReversalGuid = propertyTable.GetStringProperty("ReversalIndexGuid", null);
     if (newReversalGuid == null || newReversalGuid == oldReversalGuid)
     {
         return(false);
     }
     // Set the reversal index guid property so that the right guid is found down in DictionaryPublicationDecorater.GetEntriesToPublish,
     // and manually call OnPropertyChanged to cause LexEdDll ReversalClerk.ChangeOwningObject(guid) to be called. This causes the
     // right reversal content to be exported, fixing LT-17011.
     propertyTable.SetProperty("ReversalIndexGuid", newReversalGuid, true);
     if (clerk != null)
     {
         clerk.OnPropertyChanged("ReversalIndexGuid");
     }
     return(true);
 }
Esempio n. 19
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public PhonologicalFeaturePopupTreeManager(TreeCombo treeCombo, LcmCache cache, bool useAbbr, Mediator mediator, PropertyTable propertyTable, Form parent, int wsDisplay, IFsClosedFeature closedFeature)
     : base(treeCombo, cache, mediator, propertyTable, cache.LanguageProject.PartsOfSpeechOA, wsDisplay, useAbbr, parent)
 {
     m_closedFeature = closedFeature;
 }
Esempio n. 20
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="hvoSrc"></param>
        /// <param name="tagSrc"></param>
        /// <param name="wsSrc"></param>
        /// <param name="ichMin"></param>
        /// <param name="ichLim"></param>
        /// <param name="owner"></param>
        /// <param name="mediator"></param>
        /// <param name="propertyTable"></param>
        /// <param name="helpProvider"></param>
        /// <param name="helpFileKey">string key to get the help file name</param>
        /// ------------------------------------------------------------------------------------
        public static void DisplayOrCreateEntry(LcmCache cache, int hvoSrc, int tagSrc, int wsSrc,
                                                int ichMin, int ichLim, IWin32Window owner, Mediator mediator, PropertyTable propertyTable,
                                                IHelpTopicProvider helpProvider, string helpFileKey)
        {
            ITsString tssContext = cache.DomainDataByFlid.get_StringProp(hvoSrc, tagSrc);

            if (tssContext == null)
            {
                return;
            }

            string text = tssContext.Text;

            // If the string is empty, it might be because it's multilingual.  Try that alternative.
            // (See TE-6374.)
            if (text == null && wsSrc != 0)
            {
                tssContext = cache.DomainDataByFlid.get_MultiStringAlt(hvoSrc, tagSrc, wsSrc);
                if (tssContext != null)
                {
                    text = tssContext.Text;
                }
            }
            ITsString tssWf = null;

            if (text != null)
            {
                tssWf = tssContext.GetSubstring(ichMin, ichLim);
            }
            if (tssWf == null || tssWf.Length == 0)
            {
                return;
            }
            // We want to limit the lookup to the current word's current analysis, if one exists.
            // See FWR-956.
            IWfiAnalysis wfa = null;

            if (tagSrc == StTxtParaTags.kflidContents)
            {
                IAnalysis  anal = null;
                IStTxtPara para = cache.ServiceLocator.GetInstance <IStTxtParaRepository>().GetObject(hvoSrc);
                foreach (ISegment seg in para.SegmentsOS)
                {
                    if (seg.BeginOffset <= ichMin && seg.EndOffset >= ichLim)
                    {
                        bool exact;
                        AnalysisOccurrence occurrence = seg.FindWagform(ichMin - seg.BeginOffset, ichLim - seg.BeginOffset, out exact);
                        if (occurrence != null)
                        {
                            anal = occurrence.Analysis;
                        }
                        break;
                    }
                }
                if (anal != null)
                {
                    if (anal is IWfiAnalysis)
                    {
                        wfa = anal as IWfiAnalysis;
                    }
                    else if (anal is IWfiGloss)
                    {
                        wfa = (anal as IWfiGloss).OwnerOfClass <IWfiAnalysis>();
                    }
                }
            }
            DisplayEntries(cache, owner, mediator, propertyTable, helpProvider, helpFileKey, tssWf, wfa);
        }
Esempio n. 21
0
        public DapPropertiesDialog(DapSource source)
            : base(// Translators: {0} is the name assigned to a Digital Audio Player by its owner
            String.Format(Catalog.GetString("{0} Properties"), source.Name),
            null,
            DialogFlags.Modal,
            Stock.Close,
            ResponseType.Close)
        {
            this.source = source;

            HBox iconbox = new HBox();
            iconbox.Spacing = 10;
            //Image icon = new Image (source.Properties.Get<string> ("Icon.Names")[0], IconSize.Dialog);
            //icon.Yalign = 0.0f;
            //icon.Pixbuf = device.GetIcon(48);
            //iconbox.PackStart(icon, false, false, 0);

            VBox box = new VBox();
            box.Spacing = 10;

            PropertyTable table = new PropertyTable();
            table.ColumnSpacing = 10;
            table.RowSpacing = 5;

            if(!source.IsReadOnly && source.CanRename) {
                nameEntry = table.AddEntry(Catalog.GetString("Device name"), source.Name);
                nameEntry.Changed += OnEntryChanged;
            } else {
                table.AddLabel(Catalog.GetString("Device name"), source.Name);
            }

            /*if(device.ShowOwner) {
                if(!device.IsReadOnly && device.CanSetOwner) {
                    ownerEntry = table.AddEntry(Catalog.GetString("Owner name"), device.Owner);
                    ownerEntry.Changed += OnEntryChanged;
                } else {
                    table.AddLabel(Catalog.GetString("Owner name"), device.Owner);
                }
            }*/

            if(!source.IsReadOnly) {
                try {
                    VBox profile_description_box = new VBox();
                    ProfileComboBoxConfigurable profile_box = new ProfileComboBoxConfigurable(ServiceManager.MediaProfileManager,
                        source.UniqueId, profile_description_box);
                    profile_box.Combo.MimeTypeFilter = source.AcceptableMimeTypes;
                    table.AddWidget(Catalog.GetString("Encode to"), profile_box);
                    table.AddWidget(null, profile_description_box);
                    profile_description_box.Show();

                    table.AddSeparator();
                } catch(Exception e) {
                    Console.WriteLine(e);
                }
            }

            table.AddWidget(Catalog.GetString("Capacity used"), UsedProgressBar);

            box.PackStart(table, true, true, 0);

            PropertyTable extTable = new PropertyTable();
            extTable.ColumnSpacing = 10;
            extTable.RowSpacing = 5;

            foreach(DapSource.DapProperty property in source.DapProperties) {
                extTable.AddLabel(property.Name, property.Value);
            }

            Expander expander = new Expander(Catalog.GetString("Advanced details"));
            expander.Add(extTable);
            box.PackStart(expander, false, false, 0);

            BorderWidth = 10;
            Resizable = false;
            iconbox.PackStart(box, true, true, 0);
            iconbox.ShowAll();
            ContentArea.Add(iconbox);
        }
Esempio n. 22
0
 // Currently only called from WCF (11/21/2013 - AP)
 public static void DisplayEntry(LcmCache cache, Mediator mediatorIn, PropertyTable propertyTable,
                                 IHelpTopicProvider helpProvider, string helpFileKey, ITsString tssWfIn, IWfiAnalysis wfa)
 {
     DisplayEntries(cache, null, mediatorIn, propertyTable, helpProvider, helpFileKey, tssWfIn, wfa);
 }
Esempio n. 23
0
 public FocusBoxControllerForDisplay(Mediator mediator, PropertyTable propertyTable, IVwStylesheet stylesheet, InterlinLineChoices lineChoices, bool rightToLeft)
     : base(mediator, propertyTable, stylesheet, lineChoices)
 {
     m_fRightToLeft = rightToLeft;
 }
Esempio n. 24
0
 // Currently only called from WCF (11/21/2013 - AP)
 public static void DisplayRelatedEntries(LcmCache cache, Mediator mediatorIn, PropertyTable propertyTable,
                                          IHelpTopicProvider helpProvider, string helpFileKey, ITsString tss)
 {
     DisplayRelatedEntries(cache, null, mediatorIn, propertyTable, helpProvider, helpFileKey, tss, true);
 }
Esempio n. 25
0
 public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configurationParameters)
 {
     // Do nothing.
 }
Esempio n. 26
0
        public void TestReadingConstructor()
        {
            string[] raw_data_array =
            {
                "52 00 6F 00 6F 00 74 00 20 00 45 00 6E 00 74 00 72 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "16 00 05 01 FF FF FF FF FF FF FF FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A 00 00 00 80 07 00 00 00 00 00 00",
                "44 00 65 00 61 00 6C 00 20 00 49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00 69 00 6F 00 6E 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "22 00 01 01 FF FF FF FF FF FF FF FF 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "46 00 55 00 44 00 20 00 47 00 72 00 69 00 64 00 20 00 49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00",
                "74 00 69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2A 00 02 01 FF FF FF FF 0E 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "44 00 6F 00 75 00 62 00 6C 00 65 00 20 00 44 00 65 00 61 00 6C 00 69 00 6E 00 67 00 20 00 49 00",
                "6E 00 64 00 69 00 63 00 61 00 74 00 6F 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "32 00 02 01 FF FF FF FF 09 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00",
                "43 00 68 00 69 00 6C 00 64 00 20 00 50 00 65 00 72 00 63 00 65 00 6E 00 74 00 61 00 67 00 65 00",
                "20 00 50 00 65 00 72 00 6D 00 69 00 74 00 74 00 65 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "36 00 02 01 FF FF FF FF 07 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 04 00 00 00 00 00 00 00",
                "43 00 61 00 6E 00 63 00 65 00 6C 00 6C 00 61 00 74 00 69 00 6F 00 6E 00 20 00 46 00 65 00 65 00",
                "20 00 46 00 69 00 78 00 65 00 64 00 20 00 56 00 61 00 6C 00 75 00 65 00 00 00 00 00 00 00 00 00",
                "3A 00 02 01 FF FF FF FF 06 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 04 00 00 00 00 00 00 00",
                "55 00 6D 00 62 00 72 00 65 00 6C 00 6C 00 61 00 20 00 4C 00 69 00 6E 00 6B 00 73 00 20 00 61 00",
                "6E 00 64 00 20 00 50 00 61 00 73 00 73 00 65 00 6E 00 67 00 65 00 72 00 73 00 00 00 00 00 00 00",
                "3C 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "43 00 61 00 6E 00 63 00 65 00 6C 00 6C 00 61 00 74 00 69 00 6F 00 6E 00 20 00 46 00 65 00 65 00",
                "20 00 50 00 65 00 72 00 63 00 65 00 6E 00 74 00 61 00 67 00 65 00 00 00 00 00 00 00 00 00 00 00",
                "38 00 02 01 FF FF FF FF 05 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00",
                "49 00 6E 00 66 00 61 00 6E 00 74 00 20 00 44 00 69 00 73 00 63 00 6F 00 75 00 6E 00 74 00 20 00",
                "50 00 65 00 72 00 6D 00 69 00 74 00 74 00 65 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "34 00 02 01 FF FF FF FF 04 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 04 00 00 00 00 00 00 00",
                "43 00 61 00 6E 00 63 00 65 00 6C 00 6C 00 61 00 74 00 69 00 6F 00 6E 00 20 00 46 00 65 00 65 00",
                "20 00 43 00 75 00 72 00 72 00 65 00 6E 00 63 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "34 00 02 01 FF FF FF FF 08 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 07 00 00 00 00 00 00 00",
                "4F 00 75 00 74 00 62 00 6F 00 75 00 6E 00 64 00 20 00 54 00 72 00 61 00 76 00 65 00 6C 00 20 00",
                "44 00 61 00 74 00 65 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2C 00 02 01 FF FF FF FF 0B 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 21 00 00 00 00 00 00 00",
                "42 00 75 00 73 00 69 00 6E 00 65 00 73 00 73 00 20 00 4A 00 75 00 73 00 74 00 69 00 66 00 69 00",
                "63 00 61 00 74 00 69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2E 00 02 01 FF FF FF FF 03 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 04 00 00 00 00 00 00 00",
                "49 00 6E 00 66 00 61 00 6E 00 74 00 20 00 44 00 69 00 73 00 63 00 6F 00 75 00 6E 00 74 00 20 00",
                "56 00 61 00 6C 00 75 00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2C 00 02 01 FF FF FF FF 0D 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 04 00 00 00 00 00 00 00",
                "4F 00 74 00 68 00 65 00 72 00 20 00 43 00 61 00 72 00 72 00 69 00 65 00 72 00 20 00 53 00 65 00",
                "63 00 74 00 6F 00 72 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2C 00 02 01 FF FF FF FF 0A 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 04 00 00 00 00 00 00 00",
                "4E 00 75 00 6D 00 62 00 65 00 72 00 20 00 6F 00 66 00 20 00 50 00 61 00 73 00 73 00 65 00 6E 00",
                "67 00 65 00 72 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "2A 00 02 01 FF FF FF FF 0C 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A 00 00 00 04 00 00 00 00 00 00 00",
                "53 00 61 00 6C 00 65 00 73 00 20 00 41 00 72 00 65 00 61 00 20 00 43 00 6F 00 64 00 65 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "20 00 02 01 1C 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0B 00 00 00 04 00 00 00 00 00 00 00",
                "4F 00 74 00 68 00 65 00 72 00 20 00 52 00 65 00 66 00 75 00 6E 00 64 00 20 00 54 00 65 00 78 00",
                "74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "24 00 02 01 17 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00 00 04 00 00 00 00 00 00 00",
                "4D 00 61 00 78 00 69 00 6D 00 75 00 6D 00 20 00 53 00 74 00 61 00 79 00 20 00 50 00 65 00 72 00",
                "69 00 6F 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 FF FF FF FF 14 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 00 00 00 04 00 00 00 00 00 00 00",
                "4E 00 65 00 74 00 20 00 52 00 65 00 6D 00 69 00 74 00 20 00 50 00 65 00 72 00 6D 00 69 00 74 00",
                "74 00 65 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 FF FF FF FF 13 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0E 00 00 00 04 00 00 00 00 00 00 00",
                "50 00 65 00 72 00 63 00 65 00 6E 00 74 00 61 00 67 00 65 00 20 00 6F 00 66 00 20 00 59 00 69 00",
                "65 00 6C 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 FF FF FF FF 02 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F 00 00 00 04 00 00 00 00 00 00 00",
                "4E 00 61 00 74 00 75 00 72 00 65 00 20 00 6F 00 66 00 20 00 56 00 61 00 72 00 69 00 61 00 74 00",
                "69 00 6F 00 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 FF FF FF FF 12 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 50 00 00 00 00 00 00 00",
                "46 00 55 00 44 00 20 00 47 00 72 00 69 00 64 00 20 00 44 00 69 00 6D 00 65 00 6E 00 73 00 69 00",
                "6F 00 6E 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "28 00 02 01 10 00 00 00 11 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 00 00 04 00 00 00 00 00 00 00",
                "44 00 65 00 61 00 6C 00 20 00 44 00 65 00 73 00 63 00 72 00 69 00 70 00 74 00 69 00 6F 00 6E 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "22 00 02 01 19 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 00 00 00 09 00 00 00 00 00 00 00",
                "54 00 52 00 56 00 41 00 20 00 49 00 6E 00 66 00 6F 00 72 00 6D 00 61 00 74 00 69 00 6F 00 6E 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "22 00 02 01 18 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 00 00 04 00 00 00 00 00 00 00",
                "50 00 72 00 6F 00 72 00 61 00 74 00 65 00 20 00 43 00 6F 00 6D 00 6D 00 65 00 6E 00 74 00 73 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "22 00 02 01 16 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "43 00 6F 00 6D 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 20 00 56 00 61 00 6C 00 75 00 65 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "22 00 02 01 0F 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 15 00 00 00 04 00 00 00 00 00 00 00",
                "4D 00 61 00 78 00 69 00 6D 00 75 00 6D 00 20 00 53 00 74 00 61 00 79 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "1A 00 02 01 20 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 00 00 00 05 00 00 00 00 00 00 00",
                "44 00 65 00 61 00 6C 00 20 00 43 00 75 00 72 00 72 00 65 00 6E 00 63 00 79 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "1C 00 02 01 1D 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 00 00 00 07 00 00 00 00 00 00 00",
                "43 00 6F 00 6E 00 73 00 6F 00 72 00 74 00 69 00 61 00 20 00 43 00 6F 00 64 00 65 00 73 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "20 00 02 01 1B 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "42 00 75 00 73 00 69 00 6E 00 65 00 73 00 73 00 20 00 54 00 79 00 70 00 65 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "1C 00 02 01 1A 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18 00 00 00 04 00 00 00 00 00 00 00",
                "44 00 65 00 61 00 6C 00 20 00 54 00 79 00 70 00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "14 00 02 01 23 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19 00 00 00 04 00 00 00 00 00 00 00",
                "53 00 75 00 72 00 63 00 68 00 61 00 72 00 67 00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "14 00 02 01 21 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1A 00 00 00 04 00 00 00 00 00 00 00",
                "41 00 67 00 65 00 6E 00 74 00 73 00 20 00 4E 00 61 00 6D 00 65 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "18 00 02 01 1F 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1B 00 00 00 04 00 00 00 00 00 00 00",
                "46 00 61 00 72 00 65 00 20 00 54 00 79 00 70 00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "14 00 02 01 1E 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1C 00 00 00 04 00 00 00 00 00 00 00",
                "53 00 75 00 62 00 20 00 44 00 65 00 61 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "12 00 02 01 24 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1D 00 00 00 04 00 00 00 00 00 00 00",
                "41 00 4C 00 43 00 20 00 43 00 6F 00 64 00 65 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "14 00 02 01 22 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "52 00 65 00 6D 00 61 00 72 00 6B 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "10 00 02 01 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 03 00 47 42 50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 1D 00 28 41 29 31 36 2D 4F 63 74 2D 32 30 30 31 20 74 6F 20 31 36 2D 4F 63 74 2D 32 30 30",
                "31 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 01 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00",
                "02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00",
                "02 00 00 00 08 00 00 00 02 00 00 00 08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 18 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 05 00 6A 61 6D 65 73 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 01 00 31 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 03 00 47 42 50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "08 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "02 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF",
                "FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF",
                "11 00 00 00 FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF",
                "FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FE FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00",
                "09 00 00 00 FE FF FF FF 0B 00 00 00 0C 00 00 00 0D 00 00 00 FE FF FF FF FE FF FF FF FE FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
                "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF",
            };
            RawDataBlockList dataBlocks = new RawDataBlockList(new MemoryStream(RawDataUtil.Decode(raw_data_array)), POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);

            int[] batArray = { 15 };

            new BlockAllocationTableReader(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 1, batArray, 0, -2, dataBlocks);

            HeaderBlock headerBock = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);

            headerBock.PropertyStart = 0;

            // Get property table from the document
            PropertyTable table = new PropertyTable(headerBock, dataBlocks);

            Assert.AreEqual(30 * 64, table.Root.Size);
            int count = 0;

            NStorage.Properties.Property child = null;
            IEnumerator <NStorage.Properties.Property> iter = table.Root.Children;

            while (iter.MoveNext())
            {
                child = (NStorage.Properties.Property)iter.Current;
                ++count;
            }
            if (child == null)
            {
                throw new Exception("no children found");
            }

            Assert.AreEqual(1, count);
            Assert.IsTrue(child.IsDirectory);
            iter  = ((DirectoryProperty)child).Children;
            count = 0;
            while (iter.MoveNext())
            {
                count++;
            }
            Assert.AreEqual(35, count);
        }
Esempio n. 27
0
 /// <summary>
 /// Initialize the control, creating the BrowseViewer among other things.
 /// </summary>
 /// <param name="cache">The cache.</param>
 /// <param name="stylesheet">The stylesheet.</param>
 /// <param name="mediator">The mediator.</param>
 /// <param name="propertyTable"></param>
 /// <param name="configNode">The config node.</param>
 /// <param name="searchEngine">The search engine.</param>
 public void Initialize(LcmCache cache, IVwStylesheet stylesheet, Mediator mediator, PropertyTable propertyTable, XmlNode configNode,
                        SearchEngine searchEngine)
 {
     Initialize(cache, stylesheet, mediator, propertyTable, configNode, searchEngine, null);
 }
Esempio n. 28
0
        ///  <summary>
        ///
        ///  </summary>
        ///  <param name="cache"></param>
        ///  <param name="obj"></param>
        ///  <param name="flid"></param>
        ///  <param name="fieldName"></param>
        ///  <param name="persistProvider"></param>
        ///  <param name="mediator"></param>
        /// <param name="propertyTable"></param>
        /// <param name="displayNameProperty"></param>
        ///  <param name="displayWs"></param>
        public override void Initialize(LcmCache cache, ICmObject obj, int flid,
                                        string fieldName, IPersistenceProvider persistProvider, Mediator mediator, PropertyTable propertyTable,
                                        string displayNameProperty, string displayWs)
        {
            CheckDisposed();

            base.Initialize(cache, obj, flid, fieldName, persistProvider, mediator, propertyTable,
                            displayNameProperty, displayWs);
            m_view.Init(obj as ICmFile, flid, propertyTable);
        }
Esempio n. 29
0
        /// <summary>
        /// Initialize the control, creating the BrowseViewer among other things.
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="stylesheet">The stylesheet.</param>
        /// <param name="mediator">The mediator.</param>
        /// <param name="propertyTable"></param>
        /// <param name="configNode">The config node.</param>
        /// <param name="searchEngine">The search engine.</param>
        /// <param name="reversalWs">The reversal writing system.</param>
        public void Initialize(LcmCache cache, IVwStylesheet stylesheet, Mediator mediator, PropertyTable propertyTable, XmlNode configNode,
                               SearchEngine searchEngine, CoreWritingSystemDefinition reversalWs)
        {
            CheckDisposed();

            m_cache         = cache;
            m_stylesheet    = stylesheet;
            m_mediator      = mediator;
            m_propertyTable = propertyTable;
            m_searchEngine  = searchEngine;
            m_searchEngine.SearchCompleted += m_searchEngine_SearchCompleted;

            SuspendLayout();
            CreateBrowseViewer(configNode, reversalWs);
            ResumeLayout(false);
        }
Esempio n. 30
0
        /// <summary>
        /// Get the directory for the shipped default configurations for the part of FLEx the user is
        /// working in, such as Dictionary or Reversal Index.
        /// </summary>
        internal static string GetDefaultConfigurationDirectory(PropertyTable propertyTable)
        {
            var lastDirectoryPart = GetInnermostConfigurationDirectory(propertyTable);

            return(GetDefaultConfigurationDirectory(lastDirectoryPart));
        }
Esempio n. 31
0
 public UploadToWebonaryModel(PropertyTable propertyTable)
 {
     PropertyTable = propertyTable;
     LoadFromSettings();
 }
Esempio n. 32
0
        public void Read(ReaderContext ctxt)
        {
            var reader = ctxt.GetTablesReader();

            var actualReserved0 = reader.ReadUInt32();
            if (actualReserved0 != reserved0)
                throw new PEException("invalid MetadataTable header");
            var actualMajorVersion = reader.ReadByte();
            if (actualMajorVersion != majorVersion)
                throw new PEException("invalid MetadataTable header");
            var actualMinorVersion = reader.ReadByte();
            if (actualMinorVersion != minorVersion)
                throw new PEException("invalid MetadataTable header");
            var heapSizes = reader.ReadByte();
            IsStringStreamBig = (heapSizes & 0x01) != 0;
            IsGuidStreamBig = (heapSizes & 0x02) != 0;
            IsBlobStreamBig = (heapSizes & 0x04) != 0;
            Reserved1 = reader.ReadByte();

            var valid = new IntSet64(reader.ReadUInt64());
            var sorted = new IntSet64(reader.ReadUInt64());

            for (var i = 0; i < 64; i++)
            {
                var numRows = 0;
                if (valid[i])
                    numRows = (int)reader.ReadUInt32();

                switch ((TableTag)i)
                {
                case TableTag.Module:
                    ModuleTable = new ModuleTable(numRows);
                    break;
                case TableTag.Assembly:
                    AssemblyTable = new AssemblyTable(numRows);
                    break;
                case TableTag.AssemblyOS:
                    AssemblyOSTable = new AssemblyOSTable(numRows);
                    break;
                case TableTag.AssemblyProcessor:
                    AssemblyProcessorTable = new AssemblyProcessorTable(numRows);
                    break;
                case TableTag.AssemblyRef:
                    AssemblyRefTable = new AssemblyRefTable(numRows);
                    break;
                case TableTag.AssemblyRefOS:
                    AssemblyRefOSTable = new AssemblyRefOSTable(numRows);
                    break;
                case TableTag.AssemblyRefProcessor:
                    AssemblyRefProcessorTable = new AssemblyRefProcessorTable(numRows);
                    break;
                case TableTag.ClassLayout:
                    ClassLayoutTable = new ClassLayoutTable(numRows);
                    break;
                case TableTag.Constant:
                    ConstantTable = new ConstantTable(numRows);
                    break;
                case TableTag.CustomAttribute:
                    CustomAttributeTable = new CustomAttributeTable(numRows);
                    break;
                case TableTag.DeclSecurity:
                    DeclSecurityTable = new DeclSecurityTable(numRows);
                    break;
                case TableTag.EventMap:
                    EventMapTable = new EventMapTable(numRows);
                    break;
                case TableTag.Event:
                    EventTable = new EventTable(numRows);
                    break;
                case TableTag.ExportedType:
                    ExportedTypeTable = new ExportedTypeTable(numRows);
                    break;
                case TableTag.Field:
                    FieldTable = new FieldTable(numRows);
                    break;
                case TableTag.FieldLayout:
                    FieldLayoutTable = new FieldLayoutTable(numRows);
                    break;
                case TableTag.FieldMarshal:
                    FieldMarshalTable = new FieldMarshalTable(numRows);
                    break;
                case TableTag.FieldRVA:
                    FieldRVATable = new FieldRVATable(numRows);
                    break;
                case TableTag.File:
                    FileTable = new FileTable(numRows);
                    break;
                case TableTag.GenericParam:
                    GenericParamTable = new GenericParamTable(numRows);
                    break;
                case TableTag.GenericParamConstraint:
                    GenericParamConstraintTable = new GenericParamConstraintTable(numRows);
                    break;
                case TableTag.ImplMap:
                    ImplMapTable = new ImplMapTable(numRows);
                    break;
                case TableTag.InterfaceImpl:
                    InterfaceImplTable = new InterfaceImplTable(numRows);
                    break;
                case TableTag.ManifestResource:
                    ManifestResourceTable = new ManifestResourceTable(numRows);
                    break;
                case TableTag.MemberRef:
                    MemberRefTable = new MemberRefTable(numRows);
                    break;
                case TableTag.MethodDef:
                    MethodDefTable = new MethodDefTable(numRows);
                    break;
                case TableTag.MethodImpl:
                    MethodImplTable = new MethodImplTable(numRows);
                    break;
                case TableTag.MethodSemantics:
                    MethodSemanticsTable = new MethodSemanticsTable(numRows);
                    break;
                case TableTag.MethodSpec:
                    MethodSpecTable = new MethodSpecTable(numRows);
                    break;
                case TableTag.ModuleRef:
                    ModuleRefTable = new ModuleRefTable(numRows);
                    break;
                case TableTag.NestedClass:
                    NestedClassTable = new NestedClassTable(numRows);
                    break;
                case TableTag.Param:
                    ParamTable = new ParamTable(numRows);
                    break;
                case TableTag.Property:
                    PropertyTable = new PropertyTable(numRows);
                    break;
                case TableTag.PropertyMap:
                    PropertyMapTable = new PropertyMapTable(numRows);
                    break;
                case TableTag.StandAloneSig:
                    StandAloneSigTable = new StandAloneSigTable(numRows);
                    break;
                case TableTag.TypeDef:
                    TypeDefTable = new TypeDefTable(numRows);
                    break;
                case TableTag.TypeRef:
                    TypeRefTable = new TypeRefTable(numRows);
                    break;
                case TableTag.TypeSpec:
                    TypeSpecTable = new TypeSpecTable(numRows);
                    break;
                default:
                    // Ignore
                    break;
                }
            }

            DetermineIndexCodingSizes();

            for (var i = 0; i < 64; i++)
            {
                if (valid[i])
                {
                    switch ((TableTag)i)
                    {
                    case TableTag.Module:
                        ModuleTable.Read(ctxt, reader);
                        break;
                    case TableTag.Assembly:
                        AssemblyTable.Read(ctxt, reader);
                        break;
                    case TableTag.AssemblyOS:
                        AssemblyOSTable.Read(ctxt, reader);
                        break;
                    case TableTag.AssemblyProcessor:
                        AssemblyProcessorTable.Read(ctxt, reader);
                        break;
                    case TableTag.AssemblyRef:
                        AssemblyRefTable.Read(ctxt, reader);
                        break;
                    case TableTag.AssemblyRefOS:
                        AssemblyRefOSTable.Read(ctxt, reader);
                        break;
                    case TableTag.AssemblyRefProcessor:
                        AssemblyRefProcessorTable.Read(ctxt, reader);
                        break;
                    case TableTag.ClassLayout:
                        ClassLayoutTable.Read(ctxt, reader);
                        break;
                    case TableTag.Constant:
                        ConstantTable.Read(ctxt, reader);
                        break;
                    case TableTag.CustomAttribute:
                        CustomAttributeTable.Read(ctxt, reader);
                        break;
                    case TableTag.DeclSecurity:
                        DeclSecurityTable.Read(ctxt, reader);
                        break;
                    case TableTag.EventMap:
                        EventMapTable.Read(ctxt, reader);
                        break;
                    case TableTag.Event:
                        EventTable.Read(ctxt, reader);
                        break;
                    case TableTag.ExportedType:
                        ExportedTypeTable.Read(ctxt, reader);
                        break;
                    case TableTag.Field:
                        FieldTable.Read(ctxt, reader);
                        break;
                    case TableTag.FieldLayout:
                        FieldLayoutTable.Read(ctxt, reader);
                        break;
                    case TableTag.FieldMarshal:
                        FieldMarshalTable.Read(ctxt, reader);
                        break;
                    case TableTag.FieldRVA:
                        FieldRVATable.Read(ctxt, reader);
                        break;
                    case TableTag.File:
                        FileTable.Read(ctxt, reader);
                        break;
                    case TableTag.GenericParam:
                        GenericParamTable.Read(ctxt, reader);
                        break;
                    case TableTag.GenericParamConstraint:
                        GenericParamConstraintTable.Read(ctxt, reader);
                        break;
                    case TableTag.ImplMap:
                        ImplMapTable.Read(ctxt, reader);
                        break;
                    case TableTag.InterfaceImpl:
                        InterfaceImplTable.Read(ctxt, reader);
                        break;
                    case TableTag.ManifestResource:
                        ManifestResourceTable.Read(ctxt, reader);
                        break;
                    case TableTag.MemberRef:
                        MemberRefTable.Read(ctxt, reader);
                        break;
                    case TableTag.MethodDef:
                        MethodDefTable.Read(ctxt, reader);
                        break;
                    case TableTag.MethodImpl:
                        MethodImplTable.Read(ctxt, reader);
                        break;
                    case TableTag.MethodSemantics:
                        MethodSemanticsTable.Read(ctxt, reader);
                        break;
                    case TableTag.MethodSpec:
                        MethodSpecTable.Read(ctxt, reader);
                        break;
                    case TableTag.ModuleRef:
                        ModuleRefTable.Read(ctxt, reader);
                        break;
                    case TableTag.NestedClass:
                        NestedClassTable.Read(ctxt, reader);
                        break;
                    case TableTag.Param:
                        ParamTable.Read(ctxt, reader);
                        break;
                    case TableTag.Property:
                        PropertyTable.Read(ctxt, reader);
                        break;
                    case TableTag.PropertyMap:
                        PropertyMapTable.Read(ctxt, reader);
                        break;
                    case TableTag.StandAloneSig:
                        StandAloneSigTable.Read(ctxt, reader);
                        break;
                    case TableTag.TypeDef:
                        TypeDefTable.Read(ctxt, reader);
                        break;
                    case TableTag.TypeRef:
                        TypeRefTable.Read(ctxt, reader);
                        break;
                    case TableTag.TypeSpec:
                        TypeSpecTable.Read(ctxt, reader);
                        break;
                    default:
                        throw new PEException("unexpected table tag in MetadataTable body");
                    }
                }
            }

            ModuleTable.ResolveIndexes(ctxt);
            TypeRefTable.ResolveIndexes(ctxt);
            TypeDefTable.ResolveIndexes(ctxt);
            FieldTable.ResolveIndexes(ctxt);
            MethodDefTable.ResolveIndexes(ctxt);
            ParamTable.ResolveIndexes(ctxt);
            InterfaceImplTable.ResolveIndexes(ctxt);
            MemberRefTable.ResolveIndexes(ctxt);
            ConstantTable.ResolveIndexes(ctxt);
            CustomAttributeTable.ResolveIndexes(ctxt);
            FieldMarshalTable.ResolveIndexes(ctxt);
            DeclSecurityTable.ResolveIndexes(ctxt);
            ClassLayoutTable.ResolveIndexes(ctxt);
            FieldLayoutTable.ResolveIndexes(ctxt);
            StandAloneSigTable.ResolveIndexes(ctxt);
            EventMapTable.ResolveIndexes(ctxt);
            EventTable.ResolveIndexes(ctxt);
            PropertyMapTable.ResolveIndexes(ctxt);
            PropertyTable.ResolveIndexes(ctxt);
            MethodSemanticsTable.ResolveIndexes(ctxt);
            MethodImplTable.ResolveIndexes(ctxt);
            ModuleRefTable.ResolveIndexes(ctxt);
            TypeSpecTable.ResolveIndexes(ctxt);
            ImplMapTable.ResolveIndexes(ctxt);
            FieldRVATable.ResolveIndexes(ctxt);
            AssemblyTable.ResolveIndexes(ctxt);
            AssemblyProcessorTable.ResolveIndexes(ctxt);
            AssemblyOSTable.ResolveIndexes(ctxt);
            AssemblyRefTable.ResolveIndexes(ctxt);
            AssemblyRefProcessorTable.ResolveIndexes(ctxt);
            AssemblyRefOSTable.ResolveIndexes(ctxt);
            FileTable.ResolveIndexes(ctxt);
            ExportedTypeTable.ResolveIndexes(ctxt);
            ManifestResourceTable.ResolveIndexes(ctxt);
            NestedClassTable.ResolveIndexes(ctxt);
            GenericParamTable.ResolveIndexes(ctxt);
            MethodSpecTable.ResolveIndexes(ctxt);
            GenericParamConstraintTable.ResolveIndexes(ctxt);
        }
Esempio n. 33
0
 public virtual void VisitPropertyTable(PropertyTable table)
 {
 }
Esempio n. 34
0
		public PropertyBinding[] GetProperties(Type type)
		{
			if (type == null)
				throw ExceptionBuilder.ArgumentNull("type");

			PropertyTable propertyTable = new PropertyTable();
			List<PropertyBinding> propertyList = new List<PropertyBinding>();

			// Convert CLR Properties
			
			PropertyInfo[] propertyInfos = type.GetProperties(_bindingFlags);
			
			foreach (PropertyInfo currentPropertyInfo in propertyInfos)
			{
				// Ignore indexer
				ParameterInfo[] indexParameters = currentPropertyInfo.GetIndexParameters();
				if (indexParameters != null && indexParameters.Length > 0)
					continue;

				PropertyBinding property = CreateProperty(currentPropertyInfo);

				if (property != null)
					AddProperty(propertyTable, propertyList, type, property, currentPropertyInfo);
			}

			// Convert CLR Fields
			
			FieldInfo[] fieldInfos = type.GetFields(_bindingFlags);

			foreach (FieldInfo currentFieldInfo in fieldInfos)
			{
				PropertyBinding property = CreateProperty(currentFieldInfo);

				if (property != null)
					AddProperty(propertyTable, propertyList, type, property, currentFieldInfo);
			}

			return propertyList.ToArray();
		}
Esempio n. 35
0
        /// <summary>
        /// Initilize the gui control.
        /// </summary>
        /// <param name="mediator"></param>
        /// <param name="propertyTable"></param>
        /// <param name="configurationNode">NB: In this case it is the main 'window' element node,
        /// se we have to drill down to find the control definition node(s).</param>
        /// <param name="sourceObject"></param>
        public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configurationNode, ICmObject sourceObject)
        {
            CheckDisposed();

            Debug.Assert(mediator != null);
            Debug.Assert(configurationNode != null);
            Debug.Assert(sourceObject != null && (sourceObject is IWfiWordform || sourceObject is IWfiAnalysis || sourceObject is IWfiGloss));

            m_cache             = sourceObject.Cache;
            m_mediator          = mediator;
            m_propertyTable     = propertyTable;
            m_configurationNode = configurationNode;
            if (sourceObject is IWfiWordform)
            {
                m_wordform = (IWfiWordform)sourceObject;
            }
            else
            {
                var anal = sourceObject is IWfiAnalysis
                                                                                ? (IWfiAnalysis)sourceObject
                                                                                : sourceObject.OwnerOfClass <IWfiAnalysis>();
                m_wordform = anal.OwnerOfClass <IWfiWordform>();
            }

            helpProvider.HelpNamespace = m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider").HelpFile;
            helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
            helpProvider.SetHelpKeyword(this, m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider").GetHelpString(s_helpTopic));
            helpProvider.SetShowHelp(this, true);


            m_propertyTable.SetProperty("IgnoreStatusPanel", true, true);
            m_propertyTable.SetPropertyPersistence("IgnoreStatusPanel", false);
            m_progAdvInd = new ProgressReporting(m_toolStripProgressBar);

            // Gather up the nodes.
            const string xpathBase  = "/window/controls/parameters[@id='guicontrols']/guicontrol[@id='{0}']/parameters[@id='{1}']";
            var          xpath      = String.Format(xpathBase, "WordformConcordanceBrowseView", "WordformInSegmentsOccurrenceList");
            var          configNode = m_configurationNode.SelectSingleNode(xpath);
            // And create the RecordClerks.
            var clerk = RecordClerkFactory.CreateClerk(m_mediator, m_propertyTable, configNode, true);

            clerk.ProgressReporter = m_progAdvInd;
            m_recordClerks[WfiWordformTags.kClassId]       = clerk;
            m_configurationNodes[WfiWordformTags.kClassId] = configNode;

            xpath                  = String.Format(xpathBase, "AnalysisConcordanceBrowseView", "AnalysisInSegmentsOccurrenceList");
            configNode             = m_configurationNode.SelectSingleNode(xpath);
            clerk                  = RecordClerkFactory.CreateClerk(m_mediator, m_propertyTable, configNode, true);
            clerk.ProgressReporter = m_progAdvInd;
            m_recordClerks[WfiAnalysisTags.kClassId]       = clerk;
            m_configurationNodes[WfiAnalysisTags.kClassId] = configNode;

            xpath                  = String.Format(xpathBase, "GlossConcordanceBrowseView", "GlossInSegmentsOccurrenceList");
            configNode             = m_configurationNode.SelectSingleNode(xpath);
            clerk                  = RecordClerkFactory.CreateClerk(m_mediator, m_propertyTable, configNode, true);
            clerk.ProgressReporter = m_progAdvInd;
            m_recordClerks[WfiGlossTags.kClassId]       = clerk;
            m_configurationNodes[WfiGlossTags.kClassId] = configNode;

            Debug.Assert(m_wordform != null);
            Debug.Assert(sourceObject != null);

            tvSource.Font = new Font(MiscUtils.StandardSansSerif, 9);
            tvTarget.Font = new Font(MiscUtils.StandardSansSerif, 9);

            var srcTnWf = new TreeNode();
            var tarTnWf = new TreeNode();

            tarTnWf.Text = srcTnWf.Text = TsStringUtils.NormalizeToNFC(MEStrings.ksNoAnalysis);
            tarTnWf.Tag  = srcTnWf.Tag = m_wordform;
            tvSource.Nodes.Add(srcTnWf);
            tvTarget.Nodes.Add(tarTnWf);
            if (srcTnWf.Tag == sourceObject)
            {
                tvSource.SelectedNode = srcTnWf;
            }
            var cnt = 0;

            // Note: the left side source tree only has human approved analyses,
            // since only those can have instances from text-land pointing at them.
            foreach (var anal in m_wordform.HumanApprovedAnalyses)
            {
                var srcTnAnal = new TreeNode();
                var tarTnAnal = new TreeNode
                {
                    Text = srcTnAnal.Text = TsStringUtils.NormalizeToNFC(
                        String.Format(MEStrings.ksAnalysisX, (++cnt))),
                    Tag = srcTnAnal.Tag = anal
                };
                srcTnWf.Nodes.Add(srcTnAnal);
                tarTnWf.Nodes.Add(tarTnAnal);
                if (srcTnAnal.Tag == sourceObject)
                {
                    tvSource.SelectedNode = srcTnAnal;
                }
                foreach (var gloss in anal.MeaningsOC)
                {
                    var srcTnGloss = new TreeNode();
                    var tarTnGloss = new TreeNode();
                    var tss        = gloss.Form.BestAnalysisAlternative;
                    var props      = tss.get_PropertiesAt(0);
                    int nVar;
                    var ws       = props.GetIntPropValues((int)FwTextPropType.ktptWs, out nVar);
                    var fontname = m_wordform.Cache.ServiceLocator.WritingSystemManager.Get(ws).DefaultFontName;
                    tarTnGloss.NodeFont = new Font(fontname, 9);
                    srcTnGloss.NodeFont = new Font(fontname, 9);
                    tarTnGloss.Text     = srcTnGloss.Text = TsStringUtils.NormalizeToNFC(tss.Text);
                    tarTnGloss.Tag      = srcTnGloss.Tag = gloss;
                    srcTnAnal.Nodes.Add(srcTnGloss);
                    tarTnAnal.Nodes.Add(tarTnGloss);
                    if (srcTnGloss.Tag == sourceObject)
                    {
                        tvSource.SelectedNode = srcTnGloss;
                    }
                }
            }
            tvSource.ExpandAll();
            tvSource.SelectedNode.EnsureVisible();
            tvTarget.ExpandAll();
        }
        private void BuildWidget()
        {
            Spacing = 10;

            Label title = new Label();
            title.Markup = String.Format("<big><b>{0}</b></big>",
                             GLib.Markup.EscapeText(Catalog.GetString("iTunes Music Store")));
            title.Xalign = 0.0f;

            Label label = new Label(plugin.Description);
            label.Wrap = true;

            Alignment alignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
            alignment.LeftPadding = 10;
            alignment.RightPadding = 10;

            Frame frame = new Frame();
            Alignment frame_alignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
            frame_alignment.BorderWidth = 5;
            frame_alignment.LeftPadding = 10;
            frame_alignment.RightPadding = 10;
            frame_alignment.BottomPadding = 10;

            frame.LabelWidget = new Label (Catalog.GetString ("Account Information"));
            frame.ShadowType = ShadowType.EtchedIn;

            table = new PropertyTable();
            table.RowSpacing = 5;

            user_entry = table.AddEntry(Catalog.GetString("Username"), "", false);
            pass_entry = table.AddEntry(Catalog.GetString("Password"), "", false);
            pass_entry.Visibility = false;

            user_entry.Text = plugin.Username;
            pass_entry.Text = plugin.Password;
            user_entry.Changed += OnUserPassChanged;
            pass_entry.Changed += OnUserPassChanged;

            country_combo = ComboBox.NewText ();
            country_combo.Changed += OnCountryChanged;

            TreeIter loaded_iter = TreeIter.Zero;
            foreach (string country in FairStore.Countries.AllKeys) {
                TreeIter iter = ((ListStore)country_combo.Model).AppendValues (country);
                if (country == plugin.Country)
                    loaded_iter = iter;
            }
            country_combo.SetActiveIter (loaded_iter);

            table.AddWidget (Catalog.GetString ("Country"), country_combo, false);

            frame_alignment.Add(table);
            frame.Add(frame_alignment);

            Label copyright = new Label (Catalog.GetString ("Apple and iTunes Music Store are registered trademarks of Apple Computer, Inc."));

            PackStart(title, false, false, 0);
            PackStart(label, false, false, 0);
            PackStart(alignment, false, false, 0);
            PackStart(frame, true, false, 0);
            PackStart(copyright, false, false, 0);

            ShowAll();
        }
        private void BuildWidget()
        {
            Spacing = 10;

            Label title = new Label();
            title.Markup = String.Format("<big><b>{0}</b></big>",
                GLib.Markup.EscapeText(Catalog.GetString("Music Locker")));
            title.Xalign = 0.0f;

            Label label = new Label(Catalog.GetString("Enter your MP3tunes account information"));
            label.Xalign = 0.0f;

            Alignment account_alignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
            account_alignment.BorderWidth = 5;
            account_alignment.LeftPadding = 10;
            account_alignment.RightPadding = 10;
            account_alignment.BottomPadding = 10;

            table = new PropertyTable();
            table.RowSpacing = 5;
            table.ColumnSpacing = 5;

            user_entry = table.AddEntry(Catalog.GetString("Username"), "", false);
            pass_entry = table.AddEntry(Catalog.GetString("Password"), "", false);
            pass_entry.Visibility = false;
            user_entry.Text = plugin.Username;
            pass_entry.Text = plugin.Password;
            user_entry.Changed += OnUserPassChanged;
            pass_entry.Changed += OnUserPassChanged;

            account_alignment.Add(table);

            HBox logo_box = new HBox();
            logo_box.Spacing = 20;

            logo = new Image();
            logo.Pixbuf = Gdk.Pixbuf.LoadFromResource("locker-logo.png");
            logo.Xalign = 0.0f;

            VBox button_box = new VBox();
            Button create_account_button = new Button(Catalog.GetString("Create an account..."));
            create_account_button.Clicked += delegate(object o, EventArgs args) {
                plugin.CreateAccount();
            };
            button_box.PackStart(create_account_button, true, false, 0);

            logo_box.PackStart(logo, false, false, 0);
            logo_box.PackStart(button_box, true, true, 0);

            PackStart(title, false, false, 0);
            PackStart(label, false, false, 0);
            PackStart(account_alignment, false, false, 0);
            PackStart(logo_box, false, false, 0);

            ShowAll();
        }