Ejemplo n.º 1
0
 public static void loadDefaultConfiguration()
 {
     HostIp         = ConfigureHandler.ReadIniData("Default", "IP");
     Port           = Convert.ToInt32(ConfigureHandler.ReadIniData("Default", "Port"));
     maxClientCount = Convert.ToInt32(ConfigureHandler.ReadIniData("Default", "MaxClientCount"));
     dataBase       = ConfigureHandler.ReadIniData("Default", "DataBase");
     connectString  = "Data Source = " + dataBase + ";Initial Catalog = db_remoteDisk;Trusted_Connection = yes;Integrated Security = true";
     homePath       = ConfigureHandler.ReadIniData("Default", "Home");
 }
Ejemplo n.º 2
0
        private void loadItem()
        {
            string ip   = ConfigureHandler.ReadIniData("Configuration", "IP");
            string port = ConfigureHandler.ReadIniData("Configuration", "Port");
            string home = ConfigureHandler.ReadIniData("Configuration", "Home");

            if (ip != string.Empty || port != string.Empty || home != string.Empty)
            {
                if (ip.Trim() != string.Empty)
                {
                    txtBoxIP.Text = ip;
                }
                else
                {
                    txtBoxIP.Text = ConfigureHandler.ReadIniData("Default", "IP");
                }

                if (port != string.Empty)
                {
                    txtBoxPort.Text = port;
                }
                else
                {
                    txtBoxPort.Text = ConfigureHandler.ReadIniData("Default", "Port");
                }

                if (home != string.Empty)
                {
                    txtBoxHome.Text = home;
                }
                else
                {
                    txtBoxHome.Text = ConfigureHandler.ReadIniData("Default", "Home");
                }
            }
            else
            {
                txtBoxIP.Text   = ConfigureHandler.ReadIniData("Default", "IP");
                txtBoxPort.Text = ConfigureHandler.ReadIniData("Default", "Port");
                txtBoxHome.Text = ConfigureHandler.ReadIniData("Default", "home");
            }
        }
Ejemplo n.º 3
0
        public static void loadConfiguration()
        {
            string ip   = ConfigureHandler.ReadIniData("Configuration", "IP");
            string port = ConfigureHandler.ReadIniData("Configuration", "Port");
            string home = ConfigureHandler.ReadIniData("Configuration", "Home");

            if (ip != string.Empty || port != string.Empty || home != string.Empty)
            {
                if (ip != string.Empty)
                {
                    HostIp = ip;
                }
                else
                {
                    HostIp = ConfigureHandler.ReadIniData("Default", "IP");
                }

                if (port != string.Empty)
                {
                    Port = Convert.ToInt32(port);
                }
                else
                {
                    Port = Convert.ToInt32(ConfigureHandler.ReadIniData("Default", "Port"));
                }

                if (home != string.Empty)
                {
                    homePath = home;
                }
                else
                {
                    homePath = ConfigureHandler.ReadIniData("Default", "Home");
                }
            }
            else
            {
                loadDefaultConfiguration();
            }
        }
Ejemplo n.º 4
0
        public static void loadConfiguration()
        {
            string ip               = ConfigureHandler.ReadIniData("Configuration", "IP");
            string port             = ConfigureHandler.ReadIniData("Configuration", "Port");
            string p_maxClientCount = ConfigureHandler.ReadIniData("Configuration", "MaxClientCount");
            string p_dataBase       = ConfigureHandler.ReadIniData("Configuration", "DataBase");
            string home             = ConfigureHandler.ReadIniData("Configuration", "Home");

            if (ip != string.Empty || port != string.Empty || p_maxClientCount != string.Empty || p_dataBase != string.Empty || home != string.Empty)
            {
                if (ip != string.Empty)
                {
                    HostIp = ip;
                }
                if (port != string.Empty)
                {
                    Port = Convert.ToInt32(port);
                }
                if (p_maxClientCount != string.Empty)
                {
                    maxClientCount = Convert.ToInt32(p_maxClientCount);
                }
                if (p_dataBase != string.Empty)
                {
                    dataBase      = p_dataBase;
                    connectString = "Data Source = " + dataBase + ";Initial Catalog = db_remoteDisk;Trusted_Connection = yes;Integrated Security = true";
                }
                if (home != string.Empty)
                {
                    homePath = home;
                }
            }
            else
            {
                loadDefaultConfiguration();
            }
        }
Ejemplo n.º 5
0
 public static void loadDefaultConfiguration()
 {
     HostIp   = ConfigureHandler.ReadIniData("Default", "IP");
     Port     = Convert.ToInt32(ConfigureHandler.ReadIniData("Default", "Port"));
     homePath = ConfigureHandler.ReadIniData("Default", "Home");
 }
Ejemplo n.º 6
0
        private void loadItem()
        {
            string ip             = ConfigureHandler.ReadIniData("Configuration", "IP");
            string port           = ConfigureHandler.ReadIniData("Configuration", "Port");
            string maxClientCount = ConfigureHandler.ReadIniData("Configuration", "MaxClientCount");
            string dataBase       = ConfigureHandler.ReadIniData("Configuration", "DataBase");
            string home           = ConfigureHandler.ReadIniData("Configuration", "Home");

            if (ip != string.Empty || port != string.Empty || maxClientCount != string.Empty || dataBase != string.Empty || home != string.Empty)
            {
                if (ip != string.Empty)
                {
                    txtBoxIP.Text = ip;
                }
                else
                {
                    txtBoxIP.Text = ConfigureHandler.ReadIniData("Default", "IP");
                }

                if (port != string.Empty)
                {
                    txtBoxPort.Text = port;
                }
                else
                {
                    txtBoxPort.Text = ConfigureHandler.ReadIniData("Default", "Port");
                }

                if (maxClientCount != string.Empty)
                {
                    txtBoxMaxClientCount.Text = maxClientCount;
                }
                {
                    txtBoxMaxClientCount.Text = ConfigureHandler.ReadIniData("Default", "MaxClientCount");
                }

                if (dataBase != string.Empty)
                {
                    txtBoxDataBase.Text = dataBase;
                }
                {
                    txtBoxDataBase.Text = ConfigureHandler.ReadIniData("Default", "DataBase");
                }

                if (home != string.Empty)
                {
                    txtBoxHome.Text = home;
                }
                else
                {
                    txtBoxHome.Text = ConfigureHandler.ReadIniData("Default", "Home");
                }
            }
            else
            {
                txtBoxIP.Text             = ConfigureHandler.ReadIniData("Default", "IP");
                txtBoxPort.Text           = ConfigureHandler.ReadIniData("Default", "Port");
                txtBoxMaxClientCount.Text = ConfigureHandler.ReadIniData("Default", "MaxClientCount");
                txtBoxDataBase.Text       = ConfigureHandler.ReadIniData("Default", "DataBase");
                txtBoxHome.Text           = ConfigureHandler.ReadIniData("Default", "Home");
            }
        }