-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRsharpDevVscode.vb
More file actions
56 lines (43 loc) · 1.64 KB
/
RsharpDevVscode.vb
File metadata and controls
56 lines (43 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Imports System.IO
Imports System.Text
Imports Microsoft.VisualBasic.ComponentModel
Imports Microsoft.VisualBasic.Net.Protocols.ContentTypes
Imports Microsoft.VisualBasic.Text
Imports RDev
Imports WeifenLuo.WinFormsUI.Docking
Public Class RsharpDevVscode
Implements ISaveHandle
Implements IFileReference
Implements Viewer
''' <summary>
''' the file path of the script file
''' </summary>
''' <returns></returns>
Public Property FilePath As String Implements IFileReference.FilePath
Public ReadOnly Property MimeType As ContentType() Implements IFileReference.MimeType
Dim WithEvents vscode As New VsCodeEditor
Private Sub RsharpDevVscode_Load(sender As Object, e As EventArgs) Handles Me.Load
Controls.Add(vscode)
vscode.Dock = DockStyle.Fill
TabText = "New script"
Text = TabText
End Sub
Public Function View(file As String) As DockContent Implements Viewer.View
If file.FileExists Then
FilePath = file
TabText = FilePath.FileName
Text = TabText
ElseIf file.StringEmpty(, True) Then
TabText = "New script"
Text = TabText
End If
vscode.FilePath = FilePath
Return Me
End Function
Public Function Save(path As String, encoding As Encoding) As Boolean Implements ISaveHandle.Save
End Function
Public Function Save(path As String, Optional encoding As Encodings = Encodings.UTF8) As Boolean Implements ISaveHandle.Save
End Function
Public Function Save(file As Stream, encoding As Encoding) As Boolean Implements ISaveHandle.Save
End Function
End Class