private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (profileSelection.SelectedIndex != -1)
            {
                MJPEGConnectionProfile prof = Profiles[profileSelection.SelectedValue.ToString()];

                URLTextbox.Text                     = prof.Address;
                usernameTextbox.Text                = prof.Username;
                passwordTextbox.Password            = prof.Password;
                UseAuthenticationCheckbox.IsChecked = prof.IsAuthenticated;
            }
        }
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            SelectedProfile = Profiles.ElementAt(profileSelection.SelectedIndex).Value;

            if (SelectedProfile != Profiles["Most Recent"])
            {
                Profiles["Most Recent"] = new MJPEGConnectionProfile("Most Recent", SelectedProfile.Address, SelectedProfile.IsAuthenticated, SelectedProfile.Username, SelectedProfile.Password);
            }

            SaveProfiles();


            this.DialogResult = true;
        }
示例#3
0
        public MJPEGClient(MJPEGConnectionProfile profile)
        {
            this.ConnectionProfile = profile;

            if (profile.Name != "Most Recent")
            {
                _streamdetails += profile.Name + " { ";
            }

            if (profile.IsAuthenticated)
            {
                _streamdetails += profile.Username + ":" + new String('*', profile.Password.Length) + "@";
            }

            _streamdetails += profile.Address;

            if (profile.Name != "Most Recent")
            {
                _streamdetails += " }";
            }

            _DECODER.FrameReady += _DECODER_FrameReady;
            _DECODER.Error      += _DECODER_Error;
        }