Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Different settings for the same application

Different settings for the same application

Scheduled Pinned Locked Moved C#
csharpwinformsquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Natza Mitzi
    wrote on last edited by
    #1

    Hi, I have a winforms application that I develop. The application is used for different projects and a variety of customers. Different projects require different features and I use the Settings of the application to control which features are available in each project. I am looking for a way to manage these features. Maybe have different settings files? I would like to be able to change these settings (as in user mode settings) Any suggestions are welcome. Thanks for your time

    Natza Mitzi

    C realJSOPR M 3 Replies Last reply
    0
    • N Natza Mitzi

      Hi, I have a winforms application that I develop. The application is used for different projects and a variety of customers. Different projects require different features and I use the Settings of the application to control which features are available in each project. I am looking for a way to manage these features. Maybe have different settings files? I would like to be able to change these settings (as in user mode settings) Any suggestions are welcome. Thanks for your time

      Natza Mitzi

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I would create a build for each customer and use defined constants inside each build to customise the app as required.

      Christian Graus Driven to the arms of OSX by Vista.

      N 1 Reply Last reply
      0
      • N Natza Mitzi

        Hi, I have a winforms application that I develop. The application is used for different projects and a variety of customers. Different projects require different features and I use the Settings of the application to control which features are available in each project. I am looking for a way to manage these features. Maybe have different settings files? I would like to be able to change these settings (as in user mode settings) Any suggestions are welcome. Thanks for your time

        Natza Mitzi

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        I think your best bet may be to write a utility that allows you to create an appropriate app.config file (the basis for user mode settings), and use this utility to create custom versions of the app.config.

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        N 1 Reply Last reply
        0
        • C Christian Graus

          I would create a build for each customer and use defined constants inside each build to customise the app as required.

          Christian Graus Driven to the arms of OSX by Vista.

          N Offline
          N Offline
          Natza Mitzi
          wrote on last edited by
          #4

          I am using msi installers. My thought was to add a custom action during the installation or on the first time the app is running and preset the variables. Even so I am not happy with the solution since it seems too loose and not easy to maintain. Thanks. If anyone has more ideas....

          Natza Mitzi

          1 Reply Last reply
          0
          • realJSOPR realJSOP

            I think your best bet may be to write a utility that allows you to create an appropriate app.config file (the basis for user mode settings), and use this utility to create custom versions of the app.config.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            N Offline
            N Offline
            Natza Mitzi
            wrote on last edited by
            #5

            Thata a general idea, I am looking for a nice solution "as typed as possible" and automated

            Natza Mitzi

            realJSOPR 1 Reply Last reply
            0
            • N Natza Mitzi

              Thata a general idea, I am looking for a nice solution "as typed as possible" and automated

              Natza Mitzi

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              I think you're going to have to write it yourself because it is specific to your application. You can certainly make it generic, but that would be a LOT of work. This is a pretty sticky problem, and I doubt you'll find many/any elegant solutions. Of course, you didn't provided enough info for a better answer. How many different configurations are required? Can the necessary settings be deduced from assemblies or files that accompany the application? Why can't you re-factor the code to self-determine its available feature set? I think that would be the *best* thing to do.

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              N 1 Reply Last reply
              0
              • N Natza Mitzi

                Hi, I have a winforms application that I develop. The application is used for different projects and a variety of customers. Different projects require different features and I use the Settings of the application to control which features are available in each project. I am looking for a way to manage these features. Maybe have different settings files? I would like to be able to change these settings (as in user mode settings) Any suggestions are welcome. Thanks for your time

                Natza Mitzi

                M Offline
                M Offline
                moon_stick
                wrote on last edited by
                #7

                Are you trying to hide functionality purely for useabilty's sake or are you wanting to provide a cut-down version of your overall application? If it's the latter you'll probably want to stay away from the idea of using the app.config file as anyone could edit it and get the extra functionality for free. I'd probably recommend building some sort of licensing system into your application where a given key will unlock only certain features in the application though this will probably involve a fair amount of work on your end (depending on your application architecture).

                It definitely isn't definatley

                N 1 Reply Last reply
                0
                • M moon_stick

                  Are you trying to hide functionality purely for useabilty's sake or are you wanting to provide a cut-down version of your overall application? If it's the latter you'll probably want to stay away from the idea of using the app.config file as anyone could edit it and get the extra functionality for free. I'd probably recommend building some sort of licensing system into your application where a given key will unlock only certain features in the application though this will probably involve a fair amount of work on your end (depending on your application architecture).

                  It definitely isn't definatley

                  N Offline
                  N Offline
                  Natza Mitzi
                  wrote on last edited by
                  #8

                  I am not too worried about someone enabling features and I think that the application settings are enough. It seems like this is a good idea. Encode the features inside the application license key but I have to think about it more. Any ideas about how to map the settings to an index that will not change during compilation? Maybe deterministic hashing? It will be awful,buggy and disgusting to maintain a map. I am also limited in the number of flags that I can have in such a key (even assuming that each one is a bit). Thanks a lot :) Another Idea is to create a post installer that will open the features in the application. That requires a wrap around the msi installer.

                  Natza Mitzi

                  modified on Wednesday, December 3, 2008 12:48 PM

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    I think you're going to have to write it yourself because it is specific to your application. You can certainly make it generic, but that would be a LOT of work. This is a pretty sticky problem, and I doubt you'll find many/any elegant solutions. Of course, you didn't provided enough info for a better answer. How many different configurations are required? Can the necessary settings be deduced from assemblies or files that accompany the application? Why can't you re-factor the code to self-determine its available feature set? I think that would be the *best* thing to do.

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    N Offline
                    N Offline
                    Natza Mitzi
                    wrote on last edited by
                    #9

                    The application I am developing is tough to develop as it moves from R&D to production very fast and many times. The application is installed to a variety of customers and different projects. "How many different configurations are required?" (-) Many and it is evolving. Can the necessary settings be deduced from assemblies or files that accompany the application? (-) Maybe but that is not the issue here. I do not want to deduct anything Why can't you re-factor the code to self-determine its available feature set? I think that would be the *best* thing to do. (-) This is not a matter of re factoring. Thank you :)

                    Natza Mitzi

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups