Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 788703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:24:33+00:00 2026-05-14T21:24:33+00:00

I am in the process of designing an application that will allow you to

  • 0

I am in the process of designing an application that will allow you to find pictures (screen shots) made from certain programs. I will provide the locations of a few of the program in the application itself to get the user started.

I was wondering how I should go about adding new locations as the time goes on, my first thought was simply hard coding it into the application but this will mean the user has to reinstall it to make the changes take affect.

My second idea was to use an XML file to contain all the locations as well as other data, such as the name of the application. This also means the user can add their own locations if they wish as well as sharing them over the internet.

The second option seemed the best approach but then I had to think how would it be managed on the users computer. Ideally I’d like just a single .exe without the reliance on any external files such as the XML but this would bring me back to point one.

Would it be best to simply use the ClickOnce deployment to create an entry in the start menu and create a folder containing the .exe and the file names?

Thanks for the feedback, I don’t want to start implementing the application until the design is nailed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:24:34+00:00Added an answer on May 14, 2026 at 9:24 pm

    Generally I would not hard-code anything into the application. That makes for an inflexible design as you rightly point out.

    I usually store this type of configuration information in an XML file under the Local Application Data folder.

    If your users are always (or frequently) internet connected, you could consider an alternative (or additional) ability to store this kind of “bookmark” information on a web service.

    EDIT:

    Here’s a code snippet I have used over the years for this sort of thing

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;
    using System.Xml.Serialization;
    
    namespace JTools.IO.Configuration
    {
        public static class ConfigManager<T> where T : new()
        {
            private const string FILENAME = "Config.xml";
    
            public static T Load()
            {
                return Load(ConfigFile);
            }
    
            public static T Load(string fileName)
            {
                T ret = default(T);
    
                try
                {
                    // Open file to read the data from
    
                    using (FileStream fs = new FileStream(fileName, FileMode.Open))
                    {
    
                        // Create an XmlSerializer object to perform the deserialization
                        XmlSerializer xs = new XmlSerializer(typeof(T));
    
                        // Use the XmlSerializer object to deserialize the data from the file
                        ret = (T)xs.Deserialize(fs);
                    }
                }
                catch (System.IO.DirectoryNotFoundException)
                {
                    throw new Exception("Could not find the data directory '" + fileName + "'");
                }
                catch (System.IO.FileNotFoundException)
                {
                    ret = new T();
                }
    
                return ret;
            }
    
            public static void Save(T config)
            {
                Save(config, ConfigFile);
            }
    
            public static void Save(T config, string fileName)
            {
                // Create file to save the data to
    
                using (FileStream fs = new FileStream(fileName, FileMode.Create))
                {
    
                    // Create an XmlSerializer object to perform the serialization
                    XmlSerializer xs = new XmlSerializer(typeof(T));
    
                    // Use the XmlSerializer object to serialize the data to the file
                    xs.Serialize(fs, config);
                }
            }
    
            static private string configFile = null;
            static public string ConfigFile
            {
                get
                {
                    if (configFile == null)
                    {
                        string appName = typeof(T).FullName;
    
                        string baseFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
                        string jFolder = Path.Combine(baseFolder, "JToolsConfig");
                        string dataPath = Path.Combine(jFolder, appName);
    
                        if (!Directory.Exists(dataPath))
                        {
                            Directory.CreateDirectory(dataPath);
                        }
    
                        configFile = Path.Combine(dataPath, FILENAME);
                    }
    
                    return configFile;
                }
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I am in the process of designing an application that will allow items
I'm in the process of designing a system that will allow me to represent
I am in the process of designing an application that users will be able
I'm in a process of designing a multi-tier ASP.NET web application that is supposed
In the process of designing an application we've come to the conclusion that the
I'm designing a new web application and I'm aware that the process of registration
I'm in the process of designing a Java GUI driven application that runs a
We're in the process of designing a tiny database that will contain data regarding
I am in the process of designing a trading application which will use a
I am in the process of designing a web application which will have multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.