1 | #Region "Microsoft.VisualBasic::aecaeac84a7bc06b34db9cc0314b7be1, Microsoft.VisualBasic.Core\ComponentModel\File\FileSaveHandle.vb" |
2 | |
3 | ' Author: |
4 | ' |
5 | ' asuka (amethyst.asuka@gcmodeller.org) |
6 | ' xie (genetics@smrucc.org) |
7 | ' xieguigang (xie.guigang@live.com) |
8 | ' |
9 | ' Copyright (c) 2018 GPL3 Licensed |
10 | ' |
11 | ' |
12 | ' GNU GENERAL PUBLIC LICENSE (GPL3) |
13 | ' |
14 | ' |
15 | ' This program is free software: you can redistribute it and/or modify |
16 | ' it under the terms of the GNU General Public License as published by |
17 | ' the Free Software Foundation, either version 3 of the License, or |
18 | ' (at your option) any later version. |
19 | ' |
20 | ' This program is distributed in the hope that it will be useful, |
21 | ' but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | ' GNU General Public License for more details. |
24 | ' |
25 | ' You should have received a copy of the GNU General Public License |
26 | ' along with this program. If not, see <http://www.gnu.org/licenses/>. |
27 | |
28 | |
29 | |
30 | ' /********************************************************************************/ |
31 | |
32 | ' Summaries: |
33 | |
34 | ' Interface ISaveHandle |
35 | ' |
36 | ' Function: (+2 Overloads) Save |
37 | ' |
38 | ' Interface IFileReference |
39 | ' |
40 | ' Properties: FilePath |
41 | ' |
42 | ' Interface IDocumentEditor |
43 | ' |
44 | ' Properties: DocumentPath |
45 | ' |
46 | ' Function: LoadDocument |
47 | ' |
48 | ' |
49 | ' /********************************************************************************/ |
50 | |
51 | #End Region |
52 | |
53 | Imports System.Text |
54 | Imports Microsoft.VisualBasic.Text |
55 | |
56 | Namespace ComponentModel |
57 | |
58 | ''' <summary> |
59 | ''' This is a file object which have a handle to save its data to the filesystem.(这是一个带有文件数据保存方法的文件模型) |
60 | ''' </summary> |
61 | ''' <remarks></remarks> |
62 | Public Interface ISaveHandle |
63 | |
64 | ''' <summary> |
65 | ''' Handle for saving the file data.(保存文件的方法) |
66 | ''' </summary> |
67 | ''' <param name="path">The file path that will save data to.(进行文件数据保存的文件路径)</param> |
68 | ''' <param name="encoding">The text encoding value for the text document.(文本文档的编码格式)</param> |
69 | ''' <returns></returns> |
70 | ''' <remarks></remarks> |
71 | Function Save(Optional path$ = "", Optional encoding As Encoding = Nothing) As Boolean |
72 | Function Save(Optional path$ = "", Optional encoding As Encodings = Encodings.UTF8) As Boolean |
73 | End Interface |
74 | |
75 | ''' <summary> |
76 | ''' 表示一个对文件的引用接口 |
77 | ''' </summary> |
78 | Public Interface IFileReference |
79 | ''' <summary> |
80 | ''' 进行文件引用的路径 |
81 | ''' </summary> |
82 | ''' <returns></returns> |
83 | Property FilePath As String |
84 | End Interface |
85 | |
86 | Public Interface IDocumentEditor : Inherits ISaveHandle |
87 | Property DocumentPath As String |
88 | Function LoadDocument(path As String) As Boolean |
89 | End Interface |
90 | End Namespace |