Ejemplo n.º 1
0
            internal void Backup()
            {
                int _coordinateIndex = ChaControl.fileStatus.coordinateType;

                List <ChaFileAccessory.PartsInfo> _parts = MoreAccessoriesSupport.ListPartsInfo(ChaControl, _coordinateIndex);

                PartsInfo.Clear();
                PartsResolveInfo.Clear();

                for (int i = 0; i < _parts.Count; i++)
                {
                    ChaFileAccessory.PartsInfo _part = MoreAccessoriesSupport.GetPartsInfo(ChaControl, _coordinateIndex, i);
                    if (_part.type > 120)
                    {
                        byte[] _byte = MessagePackSerializer.Serialize(_part);
                        PartsInfo[i] = MessagePackSerializer.Deserialize <ChaFileAccessory.PartsInfo>(_byte);

                        PartsResolveInfo[i] = UniversalAutoResolver.TryGetResolutionInfo((ChaListDefine.CategoryNo)_part.type, _part.id);
                    }
                }

                foreach (string _name in SupportList)
                {
                    Traverse.Create(this).Field(_name).Method("Backup").GetValue();
                }
            }
Ejemplo n.º 2
0
            internal void Reset()
            {
                FunctionEnable  = false;
                AutoCopyToBlank = false;
                ReferralIndex   = RefMax;
                PartsInfo.Clear();
                PartsResolveInfo.Clear();

                foreach (string _name in SupportList)
                {
                    Traverse.Create(this).Field(_name).Method("Reset").GetValue();
                }
            }