Example #1
0
        public VsLogin()
        {
            InitializeComponent();
            ConfigData config = new ConfigData();

            configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "OpenVss\\VsPlayback");
            try
            {
                config.LoadSettings(Path.Combine(configPath, "ServerConn.config"));

                textBox1.Text = config.data["server"];
                textBox2.Text = config.data["user"];
                textBox3.Text = config.data["pass"];
            }
            catch { }
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {           
            try
            { 
                panelLogin.Hide();
                labelStatus.Show();
                labelStatus.Text = "Logging...";
                System.Threading.Thread.Sleep(10);
                setServer("http://" + textBox1.Text + "/vsservice/service.asmx");
                allcam();
                Connected = true;
                Blocked = false;

                ConfigData config = new ConfigData();

                config.data["server"] = textBox1.Text;
                config.data["user"] = textBox2.Text;
                config.data["pass"] = textBox3.Text;

                config.saveSetting(Path.Combine(configPath, "ServerConn.config"));

            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace); ;
            }
        }