Forums > csharp >

Text editor.json save


New Reply

Nydia

sussy baka

Posts: 19

Threads: 4

Joined: Mar, 2021

Reputation: 0

Posted

How do i make it so that when the user exits the application, every character in the text editor saves to a json file, so that when they re-open the app its still there?

I stayed tune for too long :flushed:

Posts: 190

Threads: 17

Joined: Feb, 2021

Reputation: 4

Replied

i dont recommended using json for that. its really easy if you using 

File.WriteAllText()

and 

File.ReadAllText()

i dont really understand what you mean but i think u wanna save the text of the editor.

[Console] => Hi OrbitRBX , Welcome To Wearedevs!

dead_locust

Insectman

Mention

Posts: 1280

Threads: 45

Joined: Dec, 2020

Reputation: 15

Replied

Simply write the text in the editor to a text file when the user exits. Then when the user opens the application again, read the text from the text file and put it in the editor.

Owner of Cyrup  |  Cool developer [GITHUB]  |  #antiswitchcase

Nydia

sussy baka

Mention

Posts: 19

Threads: 4

Joined: Mar, 2021

Reputation: 0

Replied

@OrbitRBX i chose .json for an example because thats what im most familiar with

Added

@OrbitRBX also, do i need to make a preset textfile because doesnt writealltext() require a path?

I stayed tune for too long :flushed:

Posts: 190

Threads: 17

Joined: Feb, 2021

Reputation: 4

Replied

Added

@Nydia using json its same thing as writealltext and readalltext but just using json reader / loader

[Console] => Hi OrbitRBX , Welcome To Wearedevs!

Nydia

sussy baka

Mention

Posts: 19

Threads: 4

Joined: Mar, 2021

Reputation: 0

Replied

@OrbitRBX sick, tahnks charrs

I stayed tune for too long :flushed:


New Reply