Exemplo n.º 1
0
        public static string[] getConectionArray()
        {
            string cadena = "";
            string key    = "";
            List <DataConection> conections = new List <DataConection>();

            int Line = 0;

            try
            {
                System.IO.StreamReader File = new System.IO.StreamReader(@"C:\WINDOWS\ConnServerNP.ini");
                while ((cadena = File.ReadLine()) != null)
                {
                    DataConection conection = new DataConection();
                    if (cadena.Contains("Key"))
                    {
                        int index = cadena.IndexOf('=');
                        key = cadena.Substring(index + 1, cadena.Length - index - 1).Trim();
                        conection.Description = key;
                        conections.Add(conection);
                    }
                    Line++;
                }
                File.Close();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
            return(null);
        }
Exemplo n.º 2
0
        public static List <DataConection> getConection()
        {
            string cadena = "";
            string key    = "";
            List <DataConection> conections = new List <DataConection>();
            int Line = 0;

            try
            {
                var cn = ConfigurationManager.ConnectionStrings;
                foreach (var item in cn)
                {
                    if (((System.Configuration.ConfigurationElement)item).LockItem)
                    {
                        DataConection conection = new DataConection();
                        key = ((System.Configuration.ConnectionStringSettings)item).Name;
                        if (!key.Contains("LocalSqlServer"))
                        {
                            if (!key.Contains("SqlProvider"))
                            {
                                conection.Description = key;
                                conections.Add(conection);
                            }
                        }
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
            return(conections);
        }
Exemplo n.º 3
0
        public PhosphoRSOutput Run()
        {
            var dataConection = new DataConection(this);
            var phosphoRS3    = dataConection.CreateThreadManagement();

            phosphoRS3.StartPTMLocalisation();
            var result = phosphoRS3.PTMResult;

            return(ArrangeResult(result));
        }
Exemplo n.º 4
0
 //Метод нужен для обрашения к Form1 и забору данных
 public void LoadData(object con)
 {
     r        = (DataConection)con;
     Mail     = r.Mail;
     password = r.password;
     listBox1.Items.Add("MAIL = " + r.Mail);
     //listBox1.Items.Add("PASWWORD = " +r.password);
     listBox1.Items.Add("POP = " + r.Pop);
     listBox1.Items.Add("PORT POP = " + r.Portpop);
     listBox1.Items.Add("SMTP = " + r.Smtp1);
     listBox1.Items.Add("PORT SMTP = " + r.PortSmtp);
 }