public ParModel(IReport parent, Stream stream, string fileName, IGetFileName getFileName) : base(parent, fileName, getFileName) { try { _parFile = new ParFile(stream); SetBrowserEntries(); } catch { Dispose(); throw; } }
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; } }
public ParModel(IReport parent, ParFile parFile, string fileName, IGetFileName getFileName) : base(parent, fileName, getFileName) { try { _parFile = parFile; SetBrowserEntries(); } catch { Dispose(); throw; } }
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; } }
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); }
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>(); }
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); } }
public GetFileContent(IGetFileName getFileName, IGetFullFilePath getFullFilePath) { _getFileName = getFileName; _getFullFilePath = getFullFilePath; }
protected RenderableModel(IReport parent, string fileName, IGetFileName getFileName) : base(parent, fileName) { this.getFileName = getFileName; }