Class AttachedFile

Class AttachedFile

İsim alanı : Aspose.Note Toplama: Aspose.Note.dll (25.4.0)

Bir eklenen dosyayı temsil eder.

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

mirasçı üyeleri

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

Bir eklenen dosyadan içeriği nasıl elde edeceğini gösterir.

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);
           }
       }
   }

Dosya yolu kullanarak bir belgeye bir dosya nasıl eklendiğini gösterir.

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);

Bir dosyayı bir akımdan bir belgeye nasıl ekleyeceğinizi gösterir.

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

Çevrimiçi ( String )

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(string path)
   {
   }

Parameters

path string

Aspose.Note.AttachedFile oluşturmak için hangi dosyaya giden yolu içeren bir çubuk.

AttachedFile (string, Stream ve ImageFormat)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(string path, Stream icon, ImageFormat iconFormat)
   {
   }

Parameters

path string

Aspose.Note.AttachedFile oluşturmak için hangi dosyaya giden yolu içeren bir çubuk.

icon Stream

eklenen dosya için bir simge.

iconFormat ImageFormat

Eklenen dosya simgesinin bir biçimi.

AttachedFile (string ve akış)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(string fileName, Stream attachedFileStream)
   {
   }

Parameters

fileName string

eklenen dosyanın adıdır.

attachedFileStream Stream

Bağlantılı dosya baytlarını içeren bir akım.

AttachedFile (string, Stream, Akış, ImageFormat)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(
       string fileName,
       Stream attachedFileStream,
       Stream icon,
       ImageFormat iconFormat)
   {
   }

Parameters

fileName string

eklenen dosyanın adıdır.

attachedFileStream Stream

Bağlantılı dosya baytlarını içeren bir akım.

icon Stream

eklenen dosya için bir simge.

iconFormat ImageFormat

Eklenen dosya simgesinin bir biçimi.

Sürücüleri ( )

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile()
   {
   }

Properties

Alignment

Birleştirme veya düzeltme yapılır.

public HorizontalAlignment Alignment
   {
      get;
      set;
   }

Mülkiyet Değer

HorizontalAlignment

AlternativeTextDescription

Bir vücudu eklenen dosya simgesine alternatif bir metin alır veya ayarlar.

public string AlternativeTextDescription
   {
      get;
      set;
   }

Mülkiyet Değer

string

AlternativeTextTitle

Bağlantılı dosya simgesine alternatif bir metin başlığı alır veya ayarlar.

public string AlternativeTextTitle
   {
      get;
      set;
   }

Mülkiyet Değer

string

Bytes

Bir yerleşik dosya için ikili verileri alır.

public byte[] Bytes
   {
      get;
   }

Mülkiyet Değer

byte […]

Examples

Bir eklenen dosyadan içeriği nasıl elde edeceğini gösterir.

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

Yerleşik bir dosyanın uzantısını alır.

public string Extension
   {
      get;
   }

Mülkiyet Değer

string

FileName

Yerleşik dosyanın adını alır.

public string FileName
   {
      get;
   }

Mülkiyet Değer

string

FilePath

Orijinal dosyaya doğru ilerliyor.

public string FilePath
   {
      get;
   }

Mülkiyet Değer

string

Height

Yerleşik dosya simgesinin orijinal yüksekliğini alır.

public float Height
   {
      get;
   }

Mülkiyet Değer

float

HorizontalOffset

Orjinal ödemeyi alır veya ayarlar.

public float HorizontalOffset
   {
      get;
      set;
   }

Mülkiyet Değer

float

Icon

Yerleşik dosyaya bağlı olan simge için ikili verileri alır.

public byte[] Icon
   {
      get;
   }

Mülkiyet Değer

byte […]

IconExtension

Ikonun uzantısını alır.

public string IconExtension
   {
      get;
   }

Mülkiyet Değer

string

IsPrintout

Dosya görüntüsünün basılı olup olmadığını gösteren bir değer alır veya ayarlar.

public bool IsPrintout
   {
      get;
      set;
   }

Mülkiyet Değer

bool

IsSizeSetByUser

Kullanıcı tarafından simge boyutunun değerinin açıkça güncellenmiş olup olmadığını gösteren bir değer alır veya ayarlar.

public bool IsSizeSetByUser
   {
      get;
      set;
   }

Mülkiyet Değer

bool

LastModifiedTime

Son değiştirilmiş zaman alır veya ayarlar.

public DateTime LastModifiedTime
   {
      get;
      set;
   }

Mülkiyet Değer

DateTime

MaxHeight

Entegre dosya simgesini görüntülemek için maksimum yüksekliği alır veya ayarlar.

public float MaxHeight
   {
      get;
      set;
   }

Mülkiyet Değer

float

MaxWidth

Entegre dosya simgesini görüntülemek için maksimum genişliği alır veya ayarlar.

public float MaxWidth
   {
      get;
      set;
   }

Mülkiyet Değer

float

ParsingErrorInfo

Dosyaya erişirken meydana gelen hata ile ilgili verileri alır.

public ParsingErrorInfo ParsingErrorInfo
   {
      get;
   }

Mülkiyet Değer

ParsingErrorInfo

Tags

Bir paragrafın tüm etiketlerinin listesini alır.

public List<ITag> Tags { get; }

Mülkiyet Değer

List &lt için; ITag >

Text

Belirlenmiş dosyanın metin görüntüsünü alır veya ayarlar. satır 10 (line feed) veya 13 (carriage return) değerinin herhangi bir karakterini içermemelidir.

public string Text
   {
      get { return this._text; }
      set { this._text = value; }
   }
   private string _text;

Mülkiyet Değer

string

VerticalOffset

Vertikal ödemeyi alır veya ayarlar.

public float VerticalOffset
   {
      get;
      set;
   }

Mülkiyet Değer

float

Width

Yerleşik dosya simgesinin orijinal genişliğini alır.

public float Width
   {
      get;
   }

Mülkiyet Değer

float

Methods

Başvuru Sayısı (DokumentVisitor)

Ziyaretçi düğümünü kabul eder.

public override void Accept(DocumentVisitor visitor)
   {
   }

Parameters

visitor DocumentVisitor

Bir sınıfın nesnesi Aspose.Note.DocumentVisitor’dan kaynaklanmaktadır.

 Türkçe