/// <summary>
        /// The Selected has changed.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="selectedIndex"></param>
        /// <param name="selectedItem"></param>
        public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
        {
            // if a selected index was set
            if (selectedIndex >= 0)
            {
                // If the control object exists
                if ((control != null) && (HasSelectedTable) && (SelectedTable.HasReaderFieldSets) && (selectedIndex < SelectedTable.ReaderFieldSets.Count))
                {
                    // if the value for HasSelectedReader is true
                    if (HasSelectedReader)
                    {
                        // Set the FieldSet
                        SelectedReader.FieldSet = SelectedTable.ReaderFieldSets[selectedIndex];

                        // If the value for the property SelectedReader.HasFieldSet is true
                        if (SelectedReader.HasFieldSet)
                        {
                            // Set the FieldSetId
                            SelectedReader.FieldSetId = SelectedReader.FieldSet.FieldSetId;
                        }
                    }
                }
            }

            // Enable or disable controls
            UIEnable();
        }
Exemple #2
0
        /// <summary>
        /// event is fired when a selection is made in the 'On'.
        /// Changing the TargetFramework will revert any custom references saved back to default.
        /// Sorry, not sure how else to do this.
        /// </summary>
        public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
        {
            // if the value for HasSelectedProject is true
            if (HasSelectedProject)
            {
                if (TextHelper.IsEqual(control.Name, BindingCallbackOptionControl.Name))
                {
                    // Set the BindingCallbackOption
                    SelectedProject.BindingCallbackOption = (BindingCallbackOptionEnum)selectedIndex;
                }
                else if (TextHelper.IsEqual(control.Name, ProjectTypeControl.Name))
                {
                    // Set the ProjectType
                    SelectedProject.TargetFramework = (TargetFrameworkEnum)(selectedIndex + 4);

                    // The DataJuggler.Net Reference Must Be Changed, based on the target framework

                    // DataJuggler.Net Reference has to change if this changes
                    SelectedProject.UpdateReferences();
                }
            }

            // Enable or disable controls
            UIEnable();
        }
        /// <summary>
        /// The Selected has changed.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="selectedIndex"></param>
        /// <param name="selectedItem"></param>
        public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
        {
            // If the control object exists
            if ((NullHelper.Exists(control, Options)) && (control.HasSelectedObject))
            {
                // if this is the ConversionTypeControl
                if (control.Name == ConversionTypeControl.Name)
                {
                    // Set the conversionType
                    string conversionType = control.SelectedObject.ToString();

                    // Set the ConversionType on the Options object
                    Options.ConversionType = ParseConversionType(conversionType);
                }
                else if (control.Name == OutputOptionControl.Name)
                {
                    // Set the outputOption
                    string outputOption = control.SelectedObject.ToString();

                    // Set the OutputOption on the Options object
                    Options.OutputOption = ParseOutputOption(outputOption);
                }
            }

            // Enable or disable controls
            UIControl();
        }
Exemple #4
0
 /// <summary>
 /// The Selected has changed.
 /// </summary>
 /// <param name="control"></param>
 /// <param name="selectedIndex"></param>
 /// <param name="selectedItem"></param>
 public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
 {
     // if the value for HasNote is true
     if (HasNote)
     {
         // Parse the Priority based upon the selected index
         this.Note.Priority = ParsePriority(selectedIndex);
     }
 }
Exemple #5
0
        /// <summary>
        /// The Selected has changed.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="selectedIndex"></param>
        public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
        {
            // if the control and selectedItem both exist
            if ((NullHelper.Exists(control, selectedItem)) && (this.HasSelectedIgnoreFolderException))
            {
                // set the exceptionType
                IgnoreFolderExceptionTypeEnum exceptionType = ParseExceptionType(selectedItem);

                // Set the exceptionType
                this.SelectedIgnoreFolderException.IgnoreExceptionType = exceptionType;
            }
        }
Exemple #6
0
        /// <summary>
        /// The Selected has changed.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="selectedIndex"></param>
        public void OnSelectedIndexChanged(LabelComboBoxControl control, int selectedIndex, object selectedItem)
        {
            // if Manuel Deal
            if (selectedIndex == 0)
            {
                // change out the button to blue and enable the button
                this.DealButton.BackgroundImage = Properties.Resources.DarkBlueButton;
                this.DealButton.ForeColor       = Color.LemonChiffon;

                // Put the events back (the appearance changes if you just disable the button)
                this.DealButton.Click      += DealButton_Click;
                this.DealButton.MouseEnter += Button_MouseEnter;
                this.DealButton.MouseLeave += Button_MouseLeave;
            }
            else
            {
                // use the dark button and disable the button
                this.DealButton.BackgroundImage = Properties.Resources.DarkButton;
                this.DealButton.ForeColor       = Color.LightGray;

                // Remove the events (the appearance changes if you just disable the button)
                this.DealButton.Click      -= DealButton_Click;
                this.DealButton.MouseEnter -= Button_MouseEnter;
                this.DealButton.MouseLeave -= Button_MouseLeave;
            }

            // If the GameManager object exists
            if ((this.HasGameManager) && (this.HasParentMainForm))
            {
                // Set the GameSpeed
                this.GameManager.HouseRules.GameSpeed = ParseGameSpeed(selectedItem);

                // now save the value in the settings
                SecureUserData security = new SecureUserData();

                // Set the value for DontShowChipSelectorInstructions
                security.GameSpeed = this.GameManager.HouseRules.GameSpeed;

                // Save the settings with this value not showing again
                security.Save();

                // if we are not on ManuelDeal
                if (this.GameManager.HouseRules.GameSpeed != GameSpeedEnum.Manuel_Deal)
                {
                    // Start Dealing
                    this.ParentMainForm.StartDealing();
                }
            }
        }