simonerom wrote:
1. The software must authenticate the user: for example, some users can only start/stop the machine, others can change settings and make backups, others can only read settings, and so on...
I would not prefer to use authentication based on windows users for this, is there any good example on how to implement some base authentication system, maybe using database?
Sure - you can use a database. You need to define users, who occupy roles, each of which have permissions. A user can have one or more roles, and roles can have one or more permissions.
I wrote an article about user authentication:
User Login For WinForm Applications[
^]
simonerom wrote:
2. I also need to trace user activity (who/when logged, what he has modified) and machine statistics (how many parts worked per session, session results, and so on...)
I know this is not so specific point, but I actually have to decide what to implement and how, so just need some good ideas about what approach to use (maybe database logging, or xml files?.
This is an implementation detail, but I would use the database for logging. You can always export to XML if you want to later on. Either way, you're going to have to develop an interface to view the user activity log.
simonerom wrote:
3. Last question is about software settings: where to store settings, considering that I will need to export/import them? If I use standard .NET "properties" class, I don't know how to export/import. Is there any good example/library on how to manage settings in database and/or xml file?
.Net supports XML settings - unless there's a need to import/export existing settings from another application, you shouldn't have to worry about it. BTW, any application data/settings should be saved int he user's applicationdata folder. DotNet provies a method for yyou to determine that foldername on the fly, but it IS *Windows user* specific. If multiple users can log into the application, I would use the global applicationdata folder instead of the user-specific one. Again, .Net gives you a way to determine this folder name through code.