Beispiel #1
0
        // Save the existing settings to the file
        public static bool Save()
        {
            try
            {
                using (Shared.TextWriter Out = new Shared.TextWriter(File.OpenWrite(Path)))
                {
                    // Output all the variables
                    Out.Write("DatabasePath");
                    Out.Write(DatabasePath);
                    Out.Write("Port");
                    Out.Write(Port);
                }
            }
            catch
            {
                return false;
            }

            return true;
        }
Beispiel #2
0
        // Save the settings to the file, returning success/failure
        public static bool Save()
        {
            try
            {
                using (Shared.TextWriter Out = new Shared.TextWriter(File.OpenWrite(Path)))
                {
                    foreach (KeyValuePair <string, object> Setting in Inner)
                    {
                        Out.Write(Setting.Key);
                        Out.Write(Setting.Value);
                    }
                }
            }
            catch
            {
                return(false);
            }

            return(true);
        }
Beispiel #3
0
        // Save the existing settings to the file
        public static bool Save()
        {
            try
            {
                using (Shared.TextWriter Out = new Shared.TextWriter(File.OpenWrite(Path)))
                {
                    // Output all the variables
                    Out.Write("DatabasePath");
                    Out.Write(DatabasePath);
                    Out.Write("Port");
                    Out.Write(Port);
                }
            }
            catch
            {
                return(false);
            }

            return(true);
        }