コード例 #1
0
            public bool End()
            {
                if (_EAs == null)
                    return true;

                AlbumDescriptorExchanger eas = new AlbumDescriptorExchanger() { Albums = _EAs };
                return eas.Export(_FD);
            }
コード例 #2
0
            public bool End()
            {
                if ((_Dic == null) || (_Dic.Count == 0))
                    return true;

                AlbumDescriptorExchanger eas = new AlbumDescriptorExchanger() { Albums = _EAs };
                
                if (eas.Export(_Father._IIC.Folders.Temp, @".\") == false)
                    return false;

                _Dic.Add(XMLName, eas.CurrentPath);

                string name = CustoMode ? "Albums.mcc" : "Albums.7z";
                string path = FileInternalToolBox.CreateNewAvailableName(Path.Combine(_FD, name));

                try
                {
                    using (Stream fs = File.Create(path))
                    {
                        _Compressor.CompressFileDictionary(_Dic, fs);
                    }
                }
                catch (Exception e)
                {
                    Trace.WriteLine("Problem creating compressed file"+e.ToString());
                    return false;
                }

                return true;
            }