コード例 #1
0
        private void LoadSettings()
        {
            Classes.ConfigManager configManager = new Classes.ConfigManager();

            if (configManager.ConfigLoaded)
            {
                if (configManager.ServerIP != null)
                {
                    TB_Username.Text = configManager.ServerUser;
                    TB_Database.Text = configManager.ServerDB;
                    TB_Port.Text     = configManager.ServerPort;

                    string tempIP = configManager.ServerIP;

                    TextBox[] tempIpOctets = new TextBox[4] {
                        TB_IPOctet1, TB_IPOctet2, TB_IPOctet3, TB_IPOctet4
                    };

                    int octetCounter = 0;

                    for (int i = 0; i < tempIP.Count(); i++)
                    {
                        if (tempIP[i] == '.')
                        {
                            octetCounter++;
                        }
                        else
                        {
                            tempIpOctets[octetCounter].Text = tempIpOctets[octetCounter].Text + tempIP[i];
                        }
                    }
                }
            }
        }
コード例 #2
0
        private void LoadSettings()
        {
            Classes.ConfigManager configManager = new Classes.ConfigManager();

            if (configManager.ConfigLoaded)
            {
               if( configManager.ServerIP != null)
               { 
                    TB_Username.Text = configManager.ServerUser;
                    TB_Database.Text = configManager.ServerDB;
                    TB_Port.Text = configManager.ServerPort;

                    string tempIP = configManager.ServerIP;

                    TextBox[] tempIpOctets = new TextBox[4] { TB_IPOctet1, TB_IPOctet2, TB_IPOctet3, TB_IPOctet4 };

                    int octetCounter = 0;

                    for (int i = 0; i < tempIP.Count(); i++)
                    {
                        if (tempIP[i] == '.')
                        {
                            octetCounter++;
                        }
                        else
                        {
                            tempIpOctets[octetCounter].Text = tempIpOctets[octetCounter].Text + tempIP[i];
                        }
                    }
               }
            }
        }
コード例 #3
0
 private void SaveSettings()
 {
     Classes.ConfigManager configManger = new Classes.ConfigManager();
     settingsSaved = configManger.SaveDBConfig(IpAddress(), Username(), Password(), Database(), Port());
 }
コード例 #4
0
 private void SaveSettings()
 {
     Classes.ConfigManager configManger = new Classes.ConfigManager();
     settingsSaved = configManger.SaveConfig(IpAddress(), Username(), Password(), Database(), Port());
 }