Exemplo n.º 1
0
        public static TonePallet Load(string fileName)
        {
            try
            {
                string fullPath = "";
                if (fileName == null || fileName == "")
                {
                    fullPath = Common.settingFilePath;
                    fullPath = System.IO.Path.Combine(fullPath, "DefaultTonePallet.xml");
                }
                else
                {
                    fullPath = fileName;
                }

                System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(TonePallet), typeof(TonePallet).GetNestedTypes());
                using (System.IO.StreamReader sr = new System.IO.StreamReader(fullPath, new UTF8Encoding(false)))
                {
                    TonePallet pl = (TonePallet)serializer.Deserialize(sr);
                    return(pl);
                }
            }
            catch (Exception ex)
            {
                log.ForcedWrite(ex);
                return(new TonePallet());
            }
        }
Exemplo n.º 2
0
        public TonePallet Copy()
        {
            TonePallet TonePallet = new TonePallet();

            return(TonePallet);
        }