コード例 #1
0
        public formConnect()
        {
            InitializeComponent();

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

             new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
        }
コード例 #2
0
ファイル: UserSettings.cs プロジェクト: nberardi/hMailServer
        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
ファイル: UserSettings.cs プロジェクト: nberardi/hMailServer
        private static UserSettings CreateDefault()
        {
            UserSettings retVal = new UserSettings();

            Server server = new Server();

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

            retVal.ServerConnections.List.Add(server);

            return retVal;
        }