Hexman768 / Notepad-Sharp

A general purpose text editor that supports multiple programming languages for code editing.
GNU General Public License v3.0
21 stars 3 forks source link

Create Style Configurator #78

Open Hexman768 opened 5 years ago

Hexman768 commented 5 years ago

There should be a settings page where users can customize their various settings. These settings will be stored within a text or json file in the temporary directory.

PoLaKoSz commented 4 years ago

What about storing in an SQLite DB (with Entity Framework Core for example as an ORM)? I can understand why a simple (json) file, but on a long run i think a lightweight DB could be better.

Hexman768 commented 4 years ago

I would be willing to this but, for this project specifically I think it's going to be more beneficial to create an easy-to-edit JSON file perhaps rather than even creating an entire settings page. The idea would be something along this lines of what visual studio code is doing. The users would be able to actually open the JSON file, make their changes, then they would save those changes and restart the editor to see those changes take effect. The only question is really where should we store this file?

Hexman768 commented 4 years ago

With that being said if you had some pros and cons to convince me not to make this move, I would be open to hearing them because I'm very unsure at this point.

Hexman768 commented 4 years ago

Looking at some sqllite code, I'm starting to like the idea. But if we are going to have a full-stack application on our hands here, we probably want to use the MVC architecture from now on. I'll get to work on implementing the db.

PoLaKoSz commented 4 years ago

Hi! Sorry for this late replay. So what You sad about VS Code like settings is a great idea (and i really like it), but maybe they still store the settings in an actual table (i don't know just a guess), and when needed just query the DB and parse the response in a JSON format.

Hexman768 commented 4 years ago

I'm gonna run with your idea. But I am changing the idea behind this settings page. Since I currently don't have any ideas as for what to put on the settings page, I will basically just create a style configurator which will store data in a SQLite DB.

Hexman768 commented 4 years ago

To allow for simple modification of each languages style properties, I would suggest we add a class of properties for each supported language since each one may have different properties. We would now just have to come up with a way for the FastColoredTextBox instance to inherit the properties, we would also have to manage this when manually changing languages, and opening new files, even when doing something as simple as changing tabs.

Hexman768 commented 2 years ago

I am going to go ahead and choose to use a JSON file for this issue. It should be easier to implement and text editor users are familiar with this format. I'm wanting to start off with just the JSON to open when users click the settings option in the menu. Later I want to add a small menu, however I highly doubt that the menu will have as many options as the JSON settings.