コード例 #1
0
        private void AddProfileName_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var profileName = new ProfileNameValue();

                Profile.ProfileNames.Add(profileName);
                Profile.ProfileNames.NotifyAdd(profileName);
            }
            catch (Exception ex)
            {
                Debug.WriteLine($"ERROR: {nameof(AddProfileName_Click)}\r\n{ex.Message}");
                MessageBox.Show(ResourceUtils.GetResourceString(this.Resources, "ConfigProfileWindow_AddProfileNameErrorLabel"), ResourceUtils.GetResourceString(this.Resources, "ConfigProfileWindow_AddErrorTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ProfileNameValue != null)
            {
                ProfileNameValue.Dispose();
                ProfileNameValue = null;
            }

            if (ResolutionValue != null)
            {
                ResolutionValue.Dispose();
                ResolutionValue = null;
            }

            if (MaxBitrateValue != null)
            {
                MaxBitrateValue.Dispose();
                MaxBitrateValue = null;
            }

            if (MaxFrameRateValue != null)
            {
                MaxFrameRateValue.Dispose();
                MaxFrameRateValue = null;
            }

            if (ProfilePicker != null)
            {
                ProfilePicker.Dispose();
                ProfilePicker = null;
            }

            if (UseSettingsSwitch != null)
            {
                UseSettingsSwitch.Dispose();
                UseSettingsSwitch = null;
            }
        }