예제 #1
0
        public formConnect()
        {
            InitializeComponent();

             userSettings = UserSettings.Load();
             _serverName = "";

             new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
        }
예제 #2
0
        public static void Save(UserSettings settings)
        {
            string settingsFile = Path.Combine(CreateSettingsFolder(), "hMailAdmin.exe.config");

            XmlTextWriter writer = new XmlTextWriter(settingsFile, Encoding.UTF8);

            try
            {
                writer.Formatting = Formatting.Indented;

                XmlSerializer xmlSerializer = new XmlSerializer(typeof(UserSettings));
                xmlSerializer.Serialize(writer, settings);
            }
            catch (Exception)
            {

            }
            finally
            {
                writer.Close();
            }
        }
예제 #3
0
        private static UserSettings CreateDefault()
        {
            UserSettings retVal = new UserSettings();

            Server server = new Server();

            server.hostName = "localhost";
            server.userName = "******";
            server.encryptedPassword = "";

            retVal.ServerConnections.List.Add(server);

            return retVal;
        }