Exemplo n.º 1
0
        private void SetBitflagParam()
        {
            XActors actors;

            Int16[] bitDictionary = new Int16[16];
            actors = XActors.LoadFromFile(OcaXmlFileLocation);

            for (int i = 0; i < 16; i++)
            {
                bitDictionary[i] = (Int16)(1 << i);
            }

            foreach (XActor actor in actors.Actor)
            {
                var value = from v in actor.Variables
                            where bitDictionary.Contains(GetCaptureMask(v.Capture))
                            select v;

                foreach (var v in value)
                {
                    if (v.UI.name == UITypes.@default)
                    {
                        v.UI.name = UITypes.bitflag;
                    }
                }
            }
            outRichTextBox.Text = actors.Serialize();
        }