Class AttachedFile
نام ها : Aspose.Note جمع آوری: Aspose.Note.dll (25.4.0)
یک فایل اضافه شده را نشان می دهد.
public class AttachedFile : Node, IPageChildNode, IOutlineElementChildNode, ITaggable, INode
{
private string _path;
public string Path
{
get { return this._path; }
set { this._path = value; }
}
}
Inheritance
object ← Node ← AttachedFile
Implements
IPageChildNode , IOutlineElementChildNode , ITaggable , INode
اعضای ارثی
Node.Accept(DocumentVisitor) , Node.Document , Node.IsComposite , Node.NodeType , Node.ParentNode , Node.PreviousSibling , Node.NextSibling , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
نشان می دهد که چگونه محتوای یک فایل پیوسته را دریافت کنید.
string dataDir = RunExamples.GetDataDir_Attachments();
Document oneFile = new Document(dataDir + "Sample1.one");
IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();
foreach (AttachedFile file in nodes)
{
using (Stream outputStream = new MemoryStream(file.Bytes))
{
using (System.IO.FileStream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
{
CopyStream(outputStream, fileStream);
}
}
}
نشان می دهد که چگونه یک فایل را به یک سند با استفاده از مسیر فایل اضافه کنید.
string dataDir = RunExamples.GetDataDir_Attachments();
Document doc = new Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
OutlineElement outlineElem = new OutlineElement(doc);
AttachedFile attachedFile = new AttachedFile(doc, dataDir + "attachment.txt");
outlineElem.AppendChildLast(attachedFile);
outline.AppendChildLast(outlineElem);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir += "AttachFileByPath_out.one";
doc.Save(dataDir);
نشان می دهد که چگونه یک فایل را از یک جریان به یک سند اضافه کنید.
string dataDir = RunExamples.GetDataDir_Attachments();
Document doc = new Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
OutlineElement outlineElem = new OutlineElement(doc);
using (var stream = File.OpenRead(dataDir + "icon.jpg"))
{
AttachedFile attachedFile = new AttachedFile(doc, dataDir + "attachment.txt", stream, ImageFormat.Jpeg);
outlineElem.AppendChildLast(attachedFile);
}
outline.AppendChildLast(outlineElem);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir += "AttachFileAndSetIcon_out.one";
doc.Save(dataDir);
Constructors
بایگانی برچسب ها: String
یک مثال جدید از کلاس Aspose.Note.AttachedFile را آغاز می کند.
public AttachedFile(string path)
{
}
Parameters
path
string
یک نوار که حاوی مسیر به فایل است که از آن برای ایجاد Aspose.Note.AttachedFile.
بایگانی برچسب ها: String, Stream, ImageFormat
یک مثال جدید از کلاس Aspose.Note.AttachedFile را آغاز می کند.
public AttachedFile(string path, Stream icon, ImageFormat iconFormat)
{
}
Parameters
path
string
یک نوار که حاوی مسیر به فایل است که از آن برای ایجاد Aspose.Note.AttachedFile.
icon
Stream
یک آیکون برای فایل اضافه شده
iconFormat
ImageFormat
یک فرمت از آیکون فایل پیوسته.
بایگانی برچسب ها: String, Stream
یک مثال جدید از کلاس Aspose.Note.AttachedFile را آغاز می کند.
public AttachedFile(string fileName, Stream attachedFileStream)
{
}
Parameters
fileName
string
یک نام از فایل اضافه شده.
attachedFileStream
Stream
یک جریان که حاوی بایت های فایل پیوسته است.
بایگانی برچسب ها: String, Stream, ImageFormat
یک مثال جدید از کلاس Aspose.Note.AttachedFile را آغاز می کند.
public AttachedFile(
string fileName,
Stream attachedFileStream,
Stream icon,
ImageFormat iconFormat)
{
}
Parameters
fileName
string
یک نام از فایل اضافه شده.
attachedFileStream
Stream
یک جریان که حاوی بایت های فایل پیوسته است.
icon
Stream
یک آیکون برای فایل اضافه شده
iconFormat
ImageFormat
یک فرمت از آیکون فایل پیوسته.
بایگانی برچسب ها:
یک مثال جدید از کلاس Aspose.Note.AttachedFile را آغاز می کند.
public AttachedFile()
{
}
Properties
Alignment
قرار دادن یا تنظیم هماهنگی.
public HorizontalAlignment Alignment
{
get;
set;
}
ارزش املاک
AlternativeTextDescription
دریافت یا تنظیم یک جسم یک متن جایگزین برای آیکون فایل پیوسته.
public string AlternativeTextDescription
{
get;
set;
}
ارزش املاک
AlternativeTextTitle
دریافت یا تنظیم یک عنوان متن جایگزین برای آیکون فایل پیوسته.
public string AlternativeTextTitle
{
get;
set;
}
ارزش املاک
Bytes
دریافت داده های باینری برای یک فایل ساخته شده.
public byte[] Bytes
{
get;
}
ارزش املاک
byte [ ]
Examples
نشان می دهد که چگونه محتوای یک فایل پیوسته را دریافت کنید.
string dataDir = RunExamples.GetDataDir_Attachments();
Document oneFile = new Document(dataDir + "Sample1.one");
IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();
foreach (AttachedFile file in nodes)
{
using (Stream outputStream = new MemoryStream(file.Bytes))
{
using (System.IO.FileStream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
{
CopyStream(outputStream, fileStream);
}
}
}
Extension
اضافه کردن یک فایل ساخته شده است.
public string Extension
{
get;
}
ارزش املاک
FileName
نام این فایل را وارد کنید.
public string FileName
{
get;
}
ارزش املاک
FilePath
راه را به فایل اصلی می رساند.
public string FilePath
{
get;
}
ارزش املاک
Height
ارتفاع اصلی آیکون فایل ساخته شده را دریافت می کند.
public float Height
{
get;
}
ارزش املاک
HorizontalOffset
به صورت افقی و یا به صورت افقی پرداخت می شود.
public float HorizontalOffset
{
get;
set;
}
ارزش املاک
Icon
دریافت داده های باینری برای آیکون که با فایل ساخته شده مرتبط است.
public byte[] Icon
{
get;
}
ارزش املاک
byte [ ]
IconExtension
برای تمدید آیکون استفاده کنید.
public string IconExtension
{
get;
}
ارزش املاک
IsPrintout
دریافت یا تنظیم یک مقدار نشان می دهد که آیا نمایش فایل چاپ شده است.
public bool IsPrintout
{
get;
set;
}
ارزش املاک
IsSizeSetByUser
دریافت یا تنظیم یک مقدار نشان می دهد که آیا مقدار اندازه آیکون به طور صریح توسط کاربر به روز شده است.
public bool IsSizeSetByUser
{
get;
set;
}
ارزش املاک
LastModifiedTime
دریافت یا تنظیم آخرین زمان اصلاح شده.
public DateTime LastModifiedTime
{
get;
set;
}
ارزش املاک
MaxHeight
دریافت یا حداکثر ارتفاع را برای نمایش آیکون فایل ساخته شده تنظیم کنید.
public float MaxHeight
{
get;
set;
}
ارزش املاک
MaxWidth
دریافت یا حداکثر عرض را برای نمایش آیکون فایل ساخته شده تنظیم کنید.
public float MaxWidth
{
get;
set;
}
ارزش املاک
ParsingErrorInfo
دریافت اطلاعات مربوط به خطا که در هنگام دسترسی به فایل رخ داده است.
public ParsingErrorInfo ParsingErrorInfo
{
get;
}
ارزش املاک
Tags
لیست تمام برچسب های یک پاراگراف را دریافت کنید.
public List<ITag> Tags { get; }
ارزش املاک
Text
به دست آوردن یا تنظیم نمایندگی متن از فایل ساخته شده. نوار نباید حاوی هر کاراکتر از ارزش 10 (فید خطی) یا 13 (پرداخت حمل و نقل).
public string Text
{
get { return this._text; }
set { this._text = value; }
}
private string _text;
ارزش املاک
VerticalOffset
دریافت و یا قرار دادن تخفیف عمودی.
public float VerticalOffset
{
get;
set;
}
ارزش املاک
Width
عرض اصلی آیکون فایل ساخته شده را دریافت می کند.
public float Width
{
get;
}
ارزش املاک
Methods
پذیرش (DocumentVisitor)
بازدیدکننده ی گره را پذیرفته است.
public override void Accept(DocumentVisitor visitor)
{
}
Parameters
visitor
DocumentVisitor
موضوع یک کلاس از Aspose.Note.DocumentVisitor گرفته شده است.