Ejemplo n.º 1
0
        public Window1()
        {
            InitializeComponent();

            restClient = new RestServiceClient();
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;
            restClient.ServerUrl         = Properties.Settings.Default.ServerAddress;

            if (String.IsNullOrEmpty(Properties.Settings.Default.ApplicationId) || String.IsNullOrEmpty(Properties.Settings.Default.Password))
            {
                CredentialsInputDialog dialog = new CredentialsInputDialog();
                dialog.ShowDialog();

                Properties.Settings.Default.ApplicationId = dialog.ApplicationId.Text;
                Properties.Settings.Default.Password      = dialog.Password.Text;
                Properties.Settings.Default.Save();
            }


            restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
            restClient.Password      = Properties.Settings.Default.Password;

            restClientAsync = new RestServiceClientAsync(restClient);

            restClientAsync.UploadFileCompleted     += UploadCompleted;
            restClientAsync.TaskProcessingCompleted += ProcessingCompleted;
            restClientAsync.DownloadFileCompleted   += DownloadCompleted;
            restClientAsync.ListTasksCompleted      += TaskListObtained;

            fieldLevelImage.RegionSelected += fieldSelected;
        }
Ejemplo n.º 2
0
        private void changeAppIdAndPwd()
        {
            CredentialsInputDialog dialog = new CredentialsInputDialog();

            if (this.IsActive)
            {
                dialog.Owner = this;
            }
            else
            {
                dialog.ShowInTaskbar = true;
            }
            dialog.ShowDialog();

            if (dialog.DialogResult == true)
            {
                Properties.Settings.Default.ServerAddress = dialog.ServiceUrl.Text;
                Properties.Settings.Default.ApplicationId = dialog.ApplicationId.Text;
                Properties.Settings.Default.Password      = dialog.Password.Text;
                Properties.Settings.Default.Save();

                restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
                restClient.Password      = Properties.Settings.Default.Password;
                restClient.ServerUrl     = Properties.Settings.Default.ServerAddress;
            }
        }
Ejemplo n.º 3
0
        public Window1()
        {
            InitializeComponent();

            restClient = new RestServiceClient();
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;
            restClient.ServerUrl = Properties.Settings.Default.ServerAddress;

            if (String.IsNullOrEmpty(Properties.Settings.Default.ApplicationId) || String.IsNullOrEmpty(Properties.Settings.Default.Password) )
            {
                CredentialsInputDialog dialog = new CredentialsInputDialog();
                dialog.ShowDialog();

                Properties.Settings.Default.ApplicationId = dialog.ApplicationId.Text;
                Properties.Settings.Default.Password = dialog.Password.Text;
                Properties.Settings.Default.Save();
            }


            restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
            restClient.Password = Properties.Settings.Default.Password;

            restClientAsync = new RestServiceClientAsync(restClient);

            restClientAsync.UploadFileCompleted += UploadCompleted;
            restClientAsync.TaskProcessingCompleted += ProcessingCompleted;
            restClientAsync.DownloadFileCompleted += DownloadCompleted;
            restClientAsync.ListTasksCompleted += TaskListObtained;

            fieldLevelImage.RegionSelected += fieldSelected;
        }
Ejemplo n.º 4
0
        private void changeAppIdAndPwd()
        {
            CredentialsInputDialog dialog = new CredentialsInputDialog();

            dialog.ShowDialog();

            if (dialog.DialogResult == true)
            {
                Properties.Settings.Default.ApplicationId = dialog.ApplicationId.Text;
                Properties.Settings.Default.Password      = dialog.Password.Text;
                Properties.Settings.Default.Save();

                restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
                restClient.Password      = Properties.Settings.Default.Password;
            }
        }
Ejemplo n.º 5
0
        private void changeAppIdAndPwd()
        {
            CredentialsInputDialog dialog = new CredentialsInputDialog();
            dialog.ShowDialog();

            if (dialog.DialogResult == true)
            {
                Properties.Settings.Default.ApplicationId = dialog.ApplicationId.Text;
                Properties.Settings.Default.Password = dialog.Password.Text;
                Properties.Settings.Default.Save();

                restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
                restClient.Password = Properties.Settings.Default.Password;
            }
        }