Exemple #1
0
        public VsSplasherView()
        {
            InitializeComponent();

            ConfigData config = new ConfigData();

            configPath =Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),"OpenVss\\VsClient") ;

            copyAllconfig();

            try
            {
                config.LoadSettings(Path.Combine(configPath,"ServerConn.config"));

                textBox1.Text = config.data["server"];
                textBox2.Text = config.data["user"];
                textBox3.Text = config.data["pass"];
            }
            catch { }
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                panelLogin.Hide();
                labelStatus.Show();
                labelStatus.Text = "Logging...";
                System.Threading.Thread.Sleep(10);

                // Vs.Monitor.VsService.VsServiceSoapClient service = new Vs.Monitor.VsService.VsServiceSoapClient();

                VsService.VsService service = new Vs.Monitor.VsService.VsService();

                service.Url = "http://" + textBox1.Text + "/vsservice/service.asmx";

                service.getCamConfigToStringAsync();
                setCamConfig(service.getCamConfigToString());
                setIntervalToAllCam(100);

                //setServer();
                //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"));

                // setCamConfig();

            }
            catch (Exception err)
            {

                Connected = false;
                Blocked = false;
                  Application.Exit();
                 //logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace); ;
            }
        }