コード例 #1
0
        /// <summary> Go out to the session and request a list of files
        /// But we dump ones that have a name collision.
        /// Also if selectedSwf is set then we only add files
        /// that are contained within the given swf.
        /// </summary>
        internal virtual void  loadCache()
        {
            bool worked = true;             // check that all worked correctly

            System.Collections.ArrayList files = new System.Collections.ArrayList();
            SwfInfo[] swfs = Swfs;
            for (int i = 0; i < swfs.Length; i++)
            {
                if (swfs[i] != null)
                {
                    worked = loadSwfFiles(files, swfs[i])?worked:false;
                }
            }

            // trim the file list
            System.Collections.ArrayList fa = trimFileList(files);
            m_files = (SourceFile[])SupportClass.ICollectionSupport.ToArray(fa, new SourceFile[fa.Count]);

            // sort this array in place so calls to getFileList will be ordered
            ArrayUtil.sort(m_files, this);

            // mark our cache complete if all was good.
            if (worked)
            {
                m_swfsLoaded = swfs.Length;
            }
        }
コード例 #2
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is ZoneRecord))
            {
                ZoneRecord record = (ZoneRecord)object_Renamed;
                if (numZoneData == record.numZoneData && ArrayUtil.equals(zoneData, record.zoneData) && zoneMask == record.zoneMask)
                {
                    isEqual = true;
                }
            }
            return(isEqual);
        }
コード例 #3
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is FlashUUID)
            {
                FlashUUID flashUUID = (FlashUUID)object_Renamed;
                if (ArrayUtil.equals(flashUUID.bytes, this.bytes))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #4
0
        public override bool Equals(System.Object obj)
        {
            bool isEqual = false;

            if (base.Equals(obj) && (obj is DefineFunction))
            {
                DefineFunction defineFunction = (DefineFunction)obj;

                if (equals(defineFunction.name, this.name) && ArrayUtil.equals(defineFunction.params_Renamed, this.params_Renamed) && equals(defineFunction.actionList, this.actionList) && ArrayUtil.equals(defineFunction.paramReg, this.paramReg) && (defineFunction.regCount == this.regCount) && (defineFunction.flags == this.flags))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #5
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineBinaryData))
            {
                DefineBinaryData defineBinaryData = (DefineBinaryData)object_Renamed;

                if (ArrayUtil.equals(defineBinaryData.data, this.data))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #6
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is ConstantPool))
            {
                ConstantPool constantPool = (ConstantPool)object_Renamed;

                if (ArrayUtil.equals(constantPool.pool, this.pool))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #7
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineBitsJPEG3))
            {
                DefineBitsJPEG3 defineBitsJPEG3 = (DefineBitsJPEG3)object_Renamed;

                if ((defineBitsJPEG3.alphaDataOffset == this.alphaDataOffset) && ArrayUtil.equals(defineBitsJPEG3.alphaData, this.alphaData))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #8
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is Unknown))
            {
                Unknown unknown = (Unknown)object_Renamed;

                if (ArrayUtil.equals(unknown.data, this.data))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #9
0
        public override bool Equals(System.Object obj)
        {
            bool isEqual = false;

            if (base.Equals(obj) && (obj is DefineButton))
            {
                DefineButton defineButton = (DefineButton)obj;

                if (ArrayUtil.equals(defineButton.buttonRecords, this.buttonRecords) && equals(defineButton.sounds, this.sounds) && equals(defineButton.cxform, this.cxform) && (defineButton.trackAsMenu == this.trackAsMenu) && ArrayUtil.equals(defineButton.condActions, this.condActions))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #10
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineBits))
            {
                DefineBits defineBits = (DefineBits)object_Renamed;

                if (ArrayUtil.equals(defineBits.data, this.data) && equals(defineBits.jpegTables, this.jpegTables))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #11
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is ActionList)
            {
                ActionList actionList = (ActionList)object_Renamed;

                if (ArrayUtil.equals(actionList.actions, this.actions))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #12
0
        /*
         * @see Flash.Tools.Debugger.Value#getMembers(Flash.Tools.Debugger.Session)
         */
        public override Variable[] getMembers(Session s)
        {
            obtainMembers(s);

            /* find out the size of the array */
            int count = getMemberCount(s);

            DVariable[] ar = new DVariable[count];

            if (count > 0)
            {
                m_members.Values.CopyTo(ar, 0);

                // sort the member list by name
                ArrayUtil.sort(ar);
            }

            return(ar);
        }
コード例 #13
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is SoundInfo)
            {
                SoundInfo soundInfo = (SoundInfo)object_Renamed;

                if ((soundInfo.syncStop == this.syncStop) && (soundInfo.syncNoMultiple == this.syncNoMultiple) && (soundInfo.inPoint == this.inPoint) && (soundInfo.outPoint == this.outPoint) && (soundInfo.loopCount == this.loopCount) && ArrayUtil.equals(soundInfo.records, this.records))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #14
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is TextRecord)
            {
                TextRecord textRecord = (TextRecord)object_Renamed;

                if ((textRecord.flags == this.flags) && (textRecord.color == this.color) && (textRecord.xOffset == this.xOffset) && (textRecord.yOffset == this.yOffset) && (textRecord.height == this.height) && (textRecord.font == this.font) && (ArrayUtil.equals(textRecord.entries, this.entries)))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #15
0
        /// <summary> Return a array of SourceFiles whose names match
        /// the specified string. The array is sorted by name.
        /// The input can be mx.controls.xxx which will
        /// </summary>
        public virtual SourceFile[] getFiles(String matchString)
        {
            bool doStartsWith = false;
            bool doIndexOf    = false;
            bool doEndsWith   = false;

            bool leadingAsterisk  = matchString.StartsWith("*") && matchString.Length > 1; //$NON-NLS-1$
            bool trailingAsterisk = matchString.EndsWith("*");                             //$NON-NLS-1$
            bool usePath          = matchString.IndexOf('.') > -1;

            if (leadingAsterisk && trailingAsterisk)
            {
                matchString = matchString.Substring(1, (matchString.Length - 1) - (1));
                doIndexOf   = true;
            }
            else if (leadingAsterisk)
            {
                matchString = matchString.Substring(1);
                doEndsWith  = true;
            }
            else if (trailingAsterisk)
            {
                matchString  = matchString.Substring(0, (matchString.Length - 1) - (0));
                doStartsWith = true;
            }
            else if (usePath)
            {
                doIndexOf = true;
            }
            else
            {
                doStartsWith = true;
            }

            SourceFile[] files = FileList;
            System.Collections.ArrayList fileList = new System.Collections.ArrayList();
            int n          = files.Length;
            int exactHitAt = -1;
            // If the matchString already starts with "." (e.g. ".as" or ".mxml"), then dotMatchString
            // will be equal to matchString; otherwise, dotMatchString will be "." + matchString
            String dotMatchString = (matchString.StartsWith("."))?matchString:("." + matchString);             //$NON-NLS-1$ //$NON-NLS-2$

            for (int i = 0; i < n; i++)
            {
                SourceFile sourceFile = files[i];
                bool       pathExists = (usePath && new System.Text.RegularExpressions.Regex(@".*[/\\].*").Match(sourceFile.FullPath).Success); //$NON-NLS-1$
                String     name       = pathExists?sourceFile.FullPath:sourceFile.Name;

                // if we are using the full path string, then prefix a '.' to our matching string so that abc.as and Gabc.as don't both hit
                String match = (usePath && pathExists)?dotMatchString:matchString;

                name = name.Replace('/', '.');                 // get rid of path identifiers and use dots
                name = name.Replace('\\', '.');                // would be better to modify the input string, but we don't know which path char will be used.

                // exact match? We are done
                if (name.Equals(match))
                {
                    exactHitAt = i;
                    break;
                }
                else if (doStartsWith && name.StartsWith(match))
                {
                    fileList.Add(sourceFile);
                }
                else if (doEndsWith && name.EndsWith(match))
                {
                    fileList.Add(sourceFile);
                }
                else if (doIndexOf && name.IndexOf(match) > -1)
                {
                    fileList.Add(sourceFile);
                }
            }

            // trim all others if we have an exact file match
            if (exactHitAt > -1)
            {
                fileList.Clear();
                fileList.Add(files[exactHitAt]);
            }

            SourceFile[] fileArray = (SourceFile[])SupportClass.ICollectionSupport.ToArray(fileList, new SourceFile[fileList.Count]);
            ArrayUtil.sort(fileArray, this);
            return(fileArray);
        }
コード例 #16
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineFontAlignZones))
            {
                DefineFontAlignZones alignZones = (DefineFontAlignZones)object_Renamed;

                if (font.Equals(alignZones.font) && csmTableHint == alignZones.csmTableHint && ArrayUtil.equals(zoneTable, alignZones.zoneTable))
                {
                    isEqual = true;
                }
            }
            return(isEqual);
        }
コード例 #17
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is VideoFrame))
            {
                VideoFrame videoFrame = (VideoFrame)object_Renamed;

                if (equals(videoFrame.stream, this.stream) && (videoFrame.frameNum == this.frameNum) && ArrayUtil.equals(videoFrame.videoData, this.videoData))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #18
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is MorphFillStyle)
            {
                MorphFillStyle morphFillStyle = (MorphFillStyle)object_Renamed;

                if ((morphFillStyle.type == this.type) && (morphFillStyle.startColor == this.startColor) && (morphFillStyle.endColor == this.endColor) && (morphFillStyle.ratio1 == this.ratio1) && (morphFillStyle.ratio2 == this.ratio2) && (((morphFillStyle.startGradientMatrix == null) && (this.startGradientMatrix == null)) || ((morphFillStyle.startGradientMatrix != null) && (this.startGradientMatrix != null) && morphFillStyle.startGradientMatrix.Equals(this.startGradientMatrix))) && (((morphFillStyle.endGradientMatrix == null) && (this.endGradientMatrix == null)) || ((morphFillStyle.endGradientMatrix != null) && (this.endGradientMatrix != null) && morphFillStyle.endGradientMatrix.Equals(this.endGradientMatrix))) && ArrayUtil.equals(morphFillStyle.gradRecords, this.gradRecords) && (((morphFillStyle.bitmap == null) && (this.bitmap == null)) || ((morphFillStyle.bitmap != null) && (this.bitmap != null) && morphFillStyle.bitmap.Equals(this.bitmap))) && (((morphFillStyle.startBitmapMatrix == null) && (this.startBitmapMatrix == null)) || ((morphFillStyle.startBitmapMatrix != null) && (this.startBitmapMatrix != null) && morphFillStyle.startBitmapMatrix.Equals(this.startBitmapMatrix))) && (((morphFillStyle.endBitmapMatrix == null) && (this.endBitmapMatrix == null)) || ((morphFillStyle.endBitmapMatrix != null) && (this.endBitmapMatrix != null) && morphFillStyle.endBitmapMatrix.Equals(this.endBitmapMatrix))))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #19
0
        public override bool Equals(System.Object o)
        {
            if (!(o is Gradient))
            {
                return(false);
            }

            Gradient otherGradient = (Gradient)o;

            return((otherGradient.spreadMode == spreadMode) && (otherGradient.interpolationMode == interpolationMode) && ArrayUtil.equals(otherGradient.records, records));
        }
コード例 #20
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineSound))
            {
                DefineSound defineSound = (DefineSound)object_Renamed;

                if ((defineSound.format == this.format) && (defineSound.rate == this.rate) && (defineSound.size == this.size) && (defineSound.type == this.type) && (defineSound.sampleCount == this.sampleCount) && ArrayUtil.equals(defineSound.data, this.data))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #21
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineBitsLossless))
            {
                DefineBitsLossless defineBitsLossless = (DefineBitsLossless)object_Renamed;

                if ((defineBitsLossless.format == this.format) && (defineBitsLossless.width == this.width) && (defineBitsLossless.height == this.height) && ArrayUtil.equals(defineBitsLossless.colorData, this.colorData))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
コード例 #22
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DefineFontInfo))
            {
                DefineFontInfo defineFontInfo = (DefineFontInfo)object_Renamed;

                // [paul] Checking that the font fields are equal would
                // lead to an infinite loop, because DefineFont contains a
                // reference to it's DefineFontInfo.
                if (equals(defineFontInfo.name, this.name) && (defineFontInfo.shiftJIS == this.shiftJIS) && (defineFontInfo.ansi == this.ansi) && (defineFontInfo.italic == this.italic) && (defineFontInfo.bold == this.bold) && ArrayUtil.equals(defineFontInfo.codeTable, this.codeTable) && (defineFontInfo.langCode == this.langCode))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }