Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
f230dc25
Commit
f230dc25
authored
Jun 21, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add binary test (file as resource)
parent
11c9d74e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Test/Applications/Base64/Form1.cs
Test/Applications/Base64/Form1.cs
+12
-2
No files found.
Test/Applications/Base64/Form1.cs
View file @
f230dc25
...
...
@@ -38,7 +38,7 @@ using System.Linq;
using
System.Text
;
using
System.Windows.Forms
;
using
System.IO
;
using
Microsoft.Office.Interop.Word
;
//
using Microsoft.Office.Interop.Word;
namespace
WindowsFormsApplication1
{
...
...
@@ -149,7 +149,17 @@ namespace WindowsFormsApplication1
}
numBytesToRead
=
bytes
.
Length
;
textBox2
.
Text
=
Convert
.
ToBase64String
(
bytes
,
Base64FormattingOptions
.
None
);
//textBox2.Text = Convert.ToBase64String(bytes, Base64FormattingOptions.None);
string
s
=
"static const unsigned char c_res["
+
Convert
.
ToString
(
bytes
.
Length
)
+
"] = {"
;
int
nLen
=
bytes
.
Length
;
for
(
int
i
=
0
;
i
<
nLen
;
i
++)
{
s
+=
Convert
.
ToString
(
bytes
[
i
]);
if
(
i
!=
(
nLen
-
1
))
s
+=
","
;
}
s
+=
"};"
;
textBox2
.
Text
=
s
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment