Esempio n. 1
0
 public ParModel(IReport parent, Stream stream, string fileName, IGetFileName getFileName)
     : base(parent, fileName, getFileName)
 {
     try
     {
         _parFile = new ParFile(stream);
         SetBrowserEntries();
     }
     catch
     {
         Dispose();
         throw;
     }
 }
Esempio n. 2
0
 public PatchZipModel(IReport parent, string inPath, IGetFileName getFileName)
     : base(parent, inPath.Substring(inPath.LastIndexOf('\\') + 1), getFileName)
 {
     try
     {
         _patchZipFile = new PatchZipFile(inPath, PatchZipMode.Update);
         SetBrowserEntries();
     }
     catch
     {
         Dispose();
         throw;
     }
 }
Esempio n. 3
0
 public ParModel(IReport parent, ParFile parFile, string fileName, IGetFileName getFileName)
     : base(parent, fileName, getFileName)
 {
     try
     {
         _parFile = parFile;
         SetBrowserEntries();
     }
     catch
     {
         Dispose();
         throw;
     }
 }
Esempio n. 4
0
 public ArcModel(IReport parent, string inPath, IGetFileName getFileName)
     : base(parent, inPath.Substring(inPath.LastIndexOf('\\') + 1), getFileName)
 {
     ArcPath    = inPath;
     _fileModel = null;
     try
     {
         ArcFile = new ArcFile(inPath);
         SetBrowserEntries();
     }
     catch
     {
         Dispose();
         throw;
     }
 }
Esempio n. 5
0
 public bool SaveXml(string destPath, string guid, IGetFileName getName, IMessage mb, ISerializer ser)
 {
     if (!IsFileSelected())
     {
         mb.ShowMessage("Keine Datei ausgewählt!");
         return(false);
     }
     if (AreRequiredFieldsValid())
     {
         var newItem  = new MetadataItem(guid, Bezeichnung, (DateTime)ValutaDatum, SelectedTypItem, Stichwoerter, Erfassungsdatum, Benutzer);
         var fileName = getName.GetMetadataName(destPath, guid);
         ser.SerializeFile(newItem, fileName);
         return(true);
     }
     mb.ShowMessage("Es müssen alle Pflichtfelder ausgefüllt werden!");
     return(false);
 }
Esempio n. 6
0
        public UISpriteSheetModel(UISubcomponentModel subcomponent, string name, int index, IGetFileName getFileName) : base(subcomponent, name)
        {
            this.index = index;
            GTF gtf = subcomponent.GetSpritesheet(index);

            colorGtfs     = new ColorChannelGTF(gtf);
            _bitmapSource = BitmapSource.Create(
                gtf.Width,
                gtf.Height,
                96,
                96,
                PixelFormats.Bgra32,
                null,
                gtf.BitmapDataPtr,
                4 * gtf.Stride * gtf.Height,
                4 * gtf.Stride);
            _bitmapSource.Freeze();
            _getfileName = getFileName;
            Sprites      = new List <UISpriteModel>();
            Rectangles   = new ObservableCollection <UISpriteSheetRectangleModel>();
        }
Esempio n. 7
0
 public bool SaveDocument(IGetFileName getName, string destPath, string guid)
 {
     try
     {
         if (File.Exists(FilePath))
         {
             var destName = getName.GetContentName(FilePath, guid, destPath);
             if (IsRemoveFileEnabled)
             {
                 File.Move(FilePath, destName);
                 return(true);
             }
             File.Copy(FilePath, destName);
             return(true);
         }
         return(false);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Esempio n. 8
0
 public GetFileContent(IGetFileName getFileName, IGetFullFilePath getFullFilePath)
 {
     _getFileName     = getFileName;
     _getFullFilePath = getFullFilePath;
 }
Esempio n. 9
0
 protected RenderableModel(IReport parent, string fileName, IGetFileName getFileName) : base(parent, fileName)
 {
     this.getFileName = getFileName;
 }