private void ComboFirstIndent_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string value = comboFirstIndentType.SelectedItem.ToString();

            if (value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.None])
            {
                this.radNumFirstIndent.Value = null;
            }
            else if ((value != this.firstLineIndentTypes[FirstLineIndentDialogTypes.FirstLine]) &&
                     (value != this.firstLineIndentTypes[FirstLineIndentDialogTypes.Hanging]))
            {
                Debug.Assert(false, "Unknown first line type selected.");
            }

            if ((this.oldFirstLineIndentType == this.firstLineIndentTypes[FirstLineIndentDialogTypes.None]) &&
                (value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.FirstLine] ||
                 value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.Hanging]))
            {
                this.radNumFirstIndent.Value = Unit.DipToPoint(CustomParagraphPropertiesDialog.DefaultFirstLineIndent);
            }

            this.oldFirstLineIndentType = value;

            this.RecordIndentationChange();
        }
Example #2
0
 private void cmbWorkOrg_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (cmbWorkOrg.SelectedItem != null && (cmbWorkOrg.SelectedItem as Organization) != null)
     {
         LoadOfficers((cmbWorkOrg.SelectedItem as Organization).Id);
     }
 }
Example #3
0
        //When the Sorting ComboBox selection is changed, the SampleDataSource collection is sorted accordingly
        private void sortingComboBox_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            if ((sortingComboBox.SelectedItem as RadComboBoxItem).Content.Equals("Category name"))
            {
                if (filterText != null)
                {
                    radTreeView.ItemsSource = FilterCollection(new SampleDataSource(), filterText).OrderBy(c => c.Name);
                }
                else
                {
                    radTreeView.ItemsSource = new SampleDataSource().OrderBy(c => c.Name);
                }
            }
            else
            {
                if (filterText != null)
                {
                    radTreeView.ItemsSource = FilterCollection(new SampleDataSource(), filterText).OrderBy(c => c.Products.Count);
                }
                else
                {
                    radTreeView.ItemsSource = new SampleDataSource().OrderBy(c => c.Products.Count);
                }
            }

            isFiltered = false;
        }
Example #4
0
 private void cbExportElementType_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count > 0)
     {
         ExportElementOptions selectedOption = ExportElementOptionsInfo.Where(t => t.ExportElementType == (e.AddedItems[0] as ExportElementType).ExportElementTypeValue).FirstOrDefault();
         this.rcpBackground.SelectedColor = selectedOption.ExportElementBackground;
         this.rcpForeground.SelectedColor = selectedOption.ExportElementForeground;
         this.rnudFontSize.Value          = selectedOption.ExportElementFontSize;
         if (ExportFontFamilyInfo == null)
         {
             InitializeExportFontFamilyInfo();
         }
         this.cbFontFamily.SelectedValue = ExportFontFamilyInfo.Where(t => t.ExportFontFamilyValue.Source == selectedOption.ExportElementFontFamily.Source).FirstOrDefault();
         if (ExportFontWeightInfo == null)
         {
             InitializeExportFontWeightInfo();
         }
         this.cbFontWeight.SelectedValue = ExportFontWeightInfo.Where(t => t.ExportFontWeightValue == selectedOption.ExportElementFontWeight).FirstOrDefault();
         if (ExportTextAlignmentInfo == null)
         {
             InitializeExportTextAlignmentInfo();
         }
         this.cbTextAllignment.SelectedValue = ExportTextAlignmentInfo.Where(t => t.ExportTextAlignmentValue == selectedOption.ExportElementTextAlignment).FirstOrDefault();
     }
 }
Example #5
0
        void ThemeSelector_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            var selectedItem   = (RadComboBoxItem)((RadComboBox)sender).SelectedItem;
            var themeNameParts = ((string)selectedItem.Content).Split('_');
            var themeName      = themeNameParts[0];
            var themeVariation = string.Empty;

            MergeResourceDictionaries(themeName);

            if (themeNameParts.Length > 1)
            {
                switch (themeName)
                {
                case "VisualStudio2013":
                    VisualStudio2013Palette.LoadPreset((VisualStudio2013Palette.ColorVariation)GetPresetEnum(typeof(VisualStudio2013Palette.ColorVariation), themeNameParts[1]));
                    break;

                case "Office2013":
                    Office2013Palette.LoadPreset((Office2013Palette.ColorVariation)GetPresetEnum(typeof(Office2013Palette.ColorVariation), themeNameParts[1]));
                    break;
                }

                themeVariation = themeNameParts[1];
            }

            this.SetLayoutBackground(themeName, themeVariation);
        }
Example #6
0
 void cbExportOptions_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     ExportOption = this.cbExportOptions.SelectedValue as RadExportOptions;
     this.brdOptions.Visibility = ExportOption.ExportFilterOption == RadExportFilterOption.RADGRIDVIEW_EXCEL_EXPORT_FILTER ? Visibility.Visible : Visibility.Collapsed;
     InitializeExportElementOptions();
     this.OKButton.IsEnabled = true;
 }
Example #7
0
 /// <summary>
 /// cbPFVICDecision SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cbPFVICDecision_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (this.cbPFVICDecision.SelectedValue as string != committeePFVMeasure)
     {
         RaiseUpdateICDecisionRecommendation();
     }
 }
Example #8
0
		private void RadComboBox_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
		{
			switch (LanguageComboBox.SelectionBoxItem.ToString())
			{
				case "en":
					LocalizationManager.Manager.Culture = new CultureInfo("en");
					break;
				case "de":
					LocalizationManager.Manager.Culture = new CultureInfo("de");
					break;
				case "es":
					LocalizationManager.Manager.Culture = new CultureInfo("es");
					break;
				case "fr":
					LocalizationManager.Manager.Culture = new CultureInfo("fr");
					break;
				case "it":
					LocalizationManager.Manager.Culture = new CultureInfo("it");
					break;
				case "nl":
					LocalizationManager.Manager.Culture = new CultureInfo("nl");
					break;
				case "tr":
					LocalizationManager.Manager.Culture = new CultureInfo("tr");
					break;
				default:
					LocalizationManager.Manager.Culture = new CultureInfo("en");
					break;
			}

		}
Example #9
0
 private void dtAcceptedDate_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (_documentType != null && _documentType != "" && !_documentType.ToUpper().Contains("VARIATION"))
     {
         chkActive.IsChecked = dtAcceptedDate.SelectedDate.HasValue;
     }
 }
Example #10
0
 private void cbTextAllignment_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (cbExportElementType != null)
     {
         ExportElementType exportElementType = this.cbExportElementType.SelectedValue as ExportElementType;
         ExportElementOptionsInfo.Where(t => t.ExportElementType == exportElementType.ExportElementTypeValue).FirstOrDefault().ExportElementTextAlignment = ((ExportTextAlignment)this.cbTextAllignment.SelectedValue).ExportTextAlignmentValue;
     }
 }
Example #11
0
        /// <summary>
        /// Handles the OnSelectionChanged event of the SamplesCombo control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SelectionChangedEventArgs" /> instance containing the event data.</param>
        private void SamplesCombo_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var sample = this.SamplesCombo.SelectedItem as SampleItem;

            if (sample != null)
            {
                sample.Run(this.diagram, this.CurrentSpecifications);
            }
        }
Example #12
0
        /// <summary>
        /// cbFinalVoteType SelectionChanged EventHandler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">SelectionChangedEventArgs</param>
        private void cbFinalVoteType_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            RadComboBox voteComboBox = sender as RadComboBox;

            if (voteComboBox == null)
            {
                return;
            }
            VoterInfo voterInfo = voteComboBox.DataContext as VoterInfo;

            DataContextViewModelPresentationDecisionEntry.RaiseUpdateFinalVoteType(voterInfo);
        }
Example #13
0
        private void comboLineSpacing_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string value = (string)comboLineSpacing.SelectedItem;

            if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Single])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value      = 1;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled  = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.LineAndAHalf])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value      = 1.5;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled  = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Double])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value      = 2;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled  = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Exactly])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 0;
                this.radNumLineSpacing.Value      = 12;
                this.radNumLineSpacing.CustomUnit = "pt";

                this.radNumLineSpacing.IsEnabled = true;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.AtLeast])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 0;
                this.radNumLineSpacing.Value      = 12;
                this.radNumLineSpacing.CustomUnit = "pt";
                this.radNumLineSpacing.IsEnabled  = true;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Multiple])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value      = 3;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled  = true;
            }
            else
            {
                Debug.Assert(false, "Unknown lines spacing type selected");
            }
        }
Example #14
0
        private void radrevisedpriceexpirydate_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            DateTime depositDate = DateTime.Parse(_estmateViewModel.DepositDate);

            if (radrevisedpriceexpirydate.SelectedDate != null)
            {
                txtbasepriceextdays.Text = (radrevisedpriceexpirydate.SelectedDate - depositDate).Value.TotalDays.ToString();
                if (!_updateInBackground)
                {
                    calculateRevisedPriceHoldDays();
                }
            }
        }
Example #15
0
 private void OnCalendarSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (this.AllowUpdate)
     {
         this.AllowUpdate = false;
         List <DateTime> items = this.calendar.SelectedDates.OrderBy <DateTime, DateTime>(delegate(DateTime dateTime) {
             return(dateTime);
         }).ToList <DateTime>();
         this.StartDatePicker.SelectedDate = new DateTime?(items.FirstOrDefault <DateTime>());
         this.EndDatePicker.SelectedDate   = new DateTime?(items.LastOrDefault <DateTime>());
         this.AllowUpdate = true;
     }
 }
Example #16
0
 private void ComboBoxOnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var comboBox = (RadComboBox)sender;
     if (comboBox != null & e.AddedItems.Count == 1)
     {
         var filterViewModel = (SimpleFilterViewModel)comboBox.DataContext;
         var property = e.AddedItems[0].GetType().GetProperty("Id", BindingFlags.Public | BindingFlags.Instance);
         if (property != null)
             filterViewModel.Value = new InfoClassPlaceholder(property.GetValue(e.AddedItems[0], null));
         else
             if (e.AddedItems[0] != null)
             filterViewModel.Value = e.AddedItems[0];
     }
 }
Example #17
0
 private void calendar_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     this.Log("SelectionChanged With:");
     this.Log(" Added Dates:");
     foreach (DateTime date in e.AddedItems)
     {
         this.Log(date.ToShortDateString());
     }
     this.Log("Removed Dates:");
     foreach (DateTime date in e.RemovedItems)
     {
         this.Log(date.ToShortDateString());
     }
 }
Example #18
0
        /// <summary>
        /// 树节点选择
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void treeView_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            TreeItem item = treeView.SelectedItem as TreeItem;

            if (item != null)
            {
                if (OnSelectionChanged != null)
                {
                    OnSelectionChanged(sender, new SelectionChangedArgs()
                    {
                        SelectedItem = item
                    });
                }
            }
        }
Example #19
0
 private void cboMethod_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (cboMethod.Text.ToLower().Contains("void"))
     {
         panelrecipient.IsEnabled   = false;
         panelemail.Visibility      = Visibility.Collapsed;
         panelvoidreason.Visibility = Visibility.Visible;
     }
     else
     {
         panelrecipient.IsEnabled   = true;
         panelemail.Visibility      = Visibility.Visible;
         panelvoidreason.Visibility = Visibility.Collapsed;
     }
 }
Example #20
0
 private void MapSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e != null && e.AddedItems != null && e.AddedItems.Count > 0)
     {
         var selectedItem = e.AddedItems[0] as RadComboBoxItem;
         if (selectedItem != null)
         {
             Map = selectedItem.DataContext as INode;
             LoadButton.IsEnabled = true;
         }
     }
     else
     {
         LoadButton.IsEnabled = false;
     }
 }
Example #21
0
        private void cmbEffectiveDate_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            // decimal totalPriceExc = 0;
            decimal selectedPrice       = 0;
            decimal homePriceInEstimate = 0;

            decimal.TryParse(_estmateViewModel.HomePrice.Replace("$", ""), out homePriceInEstimate);
            // decimal.TryParse(_estmateViewModel.TotalPrice.Replace("$", ""), out totalPriceExc);
            if (cmbEffectiveDate.SelectedIndex > 0)
            {
                selectedPrice                   = _homePricesEffectiveDatesList[cmbEffectiveDate.SelectedIndex].EffectivePrice;
                txtIncreaseInprice.Text         = (selectedPrice - homePriceInEstimate).ToString("c");
                txtrequireBPErollbackprice.Text = _homePricesEffectiveDatesList[cmbEffectiveDate.SelectedIndex].EffectivePrice.ToString("c");
                txtNewPriceEffectiveDate.Text   = _homePricesEffectiveDatesList[cmbEffectiveDate.SelectedIndex].EffectiveDate.ToString();
            }
            calculateRevisedPriceHoldDays();
        }
Example #22
0
        private void cmbRevision_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            _nextRevisionTypeId = ((sender as RadComboBox).SelectedItem as NextRevision).RevisionTypeId;
            //_ownerId = ((sender as RadComboBox).SelectedItem as NextRevision).OwnerId;

            string notes = ((sender as RadComboBox).SelectedItem as NextRevision).Notes;

            if (!string.IsNullOrEmpty(notes))
            {
                txtNotes.Text = notes;
            }
            else
            {
                txtNotes.Text = string.Empty;
            }


            if (_nextRevisionTypeId > 0)
            {
                txtAssignto.Visibility = Visibility.Visible;
                cmbNextUser.Visibility = Visibility.Visible;

                lblTotal.Visibility       = Visibility.Collapsed;
                txtSignedTotal.Visibility = Visibility.Collapsed;

                BusyIndicator1.IsBusy = true;
                _mrsClient.GetUsersByRegionAndRevisionTypeCompleted += new EventHandler <GetUsersByRegionAndRevisionTypeCompletedEventArgs>(mrsClient_GetUsersByRegionAndRevisionTypeCompleted);
                _mrsClient.GetUsersByRegionAndRevisionTypeAsync((App.Current as App).CurrentRegionId, int.Parse(cmbRevision.SelectedValue.ToString()));
            }
            else
            {
                txtAssignto.Visibility = Visibility.Collapsed;
                cmbNextUser.Visibility = Visibility.Collapsed;

                if (_nextRevisionTypeId == 0 && _customerdocumenttype.Trim() != "")
                {
                    lblTotal.Visibility       = Visibility.Visible;
                    txtSignedTotal.Visibility = Visibility.Visible;
                }
                else
                {
                    lblTotal.Visibility       = Visibility.Collapsed;
                    txtSignedTotal.Visibility = Visibility.Collapsed;
                }
            }
        }
Example #23
0
        private void tree_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (e.AddedItems != null && e.AddedItems.Count > 0)
            {
                object o = e.AddedItems[0];
                if (o is TreeViewItemModel)
                {
                    TreeViewItemModel org = o as TreeViewItemModel;
                    LoadReport(org.SMSUnitType);
                }
                else if (o is Organization)
                {
                    Organization org = o as Organization;

                    drill(org.Id);
                }
            }
        }
Example #24
0
 private void OnDatePickerSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (this.StartDatePicker.SelectedDate.HasValue && this.EndDatePicker.SelectedDate.HasValue)
     {
         this.textBlockStartDate.Text = this.StartDatePicker.SelectedDate.Value.ToString("MMMM, dd, yyyy", CultureInfo.InvariantCulture);
         this.textBlockEndDate.Text   = this.EndDatePicker.SelectedDate.Value.ToString("MMMM, dd, yyyy", CultureInfo.InvariantCulture);
     }
     if (this.AllowUpdate)
     {
         this.AllowUpdate = false;
         this.calendar.SelectedDates.Clear();
         DateTime startDate = this.StartDatePicker.SelectedDate.Value;
         TimeSpan tempDate  = this.EndDatePicker.SelectedDate.Value - startDate;
         for (int i = 0; i < (tempDate.Days + 1); i++)
         {
             this.calendar.SelectedDates.Add(startDate.AddDays((double)i));
         }
         this.AllowUpdate = true;
     }
 }
Example #25
0
        private void DomainSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e != null && e.AddedItems != null && e.AddedItems.Count > 0)
            {
                MapSelector.Items.Clear();
                var selectedItem = e.AddedItems[0] as RadComboBoxItem;
                if (selectedItem != null)
                {
                    Domain = selectedItem.DataContext as INode;

                    if (Domain != null)
                    {
                        MapManager.QueryMapByDomainCompleted.RegisterEvent(Domain.DomainId, OnAcquireNodeByDomainCompleted);
                        MapManager.QueryMapByDomainAsync(Domain.DomainId);
                    }
                }


                MapSelector.IsEnabled = false;
            }
        }
        private void ComboLineSpacing_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string value = (string)comboLineSpacing.SelectedItem;

            if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Single])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value = 1;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.LineAndAHalf])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value = 1.5;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Double])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value = 2;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled = false;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Exactly])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 0;
                this.radNumLineSpacing.Value = 12;
                this.radNumLineSpacing.CustomUnit = "pt";

                this.radNumLineSpacing.IsEnabled = true;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.AtLeast])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 0;
                this.radNumLineSpacing.Value = 12;
                this.radNumLineSpacing.CustomUnit = "pt";
                this.radNumLineSpacing.IsEnabled = true;
            }
            else if (value == this.lineSpacingTypes[LineSpacingDialogTypes.Multiple])
            {
                this.radNumLineSpacing.NumberFormatInfo.NumberDecimalDigits = 2;
                this.radNumLineSpacing.Value = 3;
                this.radNumLineSpacing.CustomUnit = null;
                this.radNumLineSpacing.IsEnabled = true;
            }
        }
        private void ComboFirstIndent_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string value = comboFirstIndentType.SelectedItem.ToString();

            if (value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.None])
            {
                this.radNumFirstIndent.Value = null;
            }
            else if ((value != this.firstLineIndentTypes[FirstLineIndentDialogTypes.FirstLine]) &&
                     (value != this.firstLineIndentTypes[FirstLineIndentDialogTypes.Hanging]))
            {
                Debug.Assert(false, "Unknown first line type selected.");
            }

            if ((this.oldFirstLineIndentType == this.firstLineIndentTypes[FirstLineIndentDialogTypes.None]) &&
                (value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.FirstLine] ||
                 value == this.firstLineIndentTypes[FirstLineIndentDialogTypes.Hanging]))
            {
                this.radNumFirstIndent.Value = Unit.DipToPoint(CustomParagraphPropertiesDialog.DefaultFirstLineIndent);
            }

            this.oldFirstLineIndentType = value;

            this.RecordIndentationChange();
        }
Example #28
0
 private void OnSelectedFilterChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!UpdatingFilters && SelectedFilter != null)
     {
         FilterGuid = SelectedFilter != null ? (Guid?)SelectedFilter.FilterGuid : null;
         FilterDefinition = SelectedFilter != null ? SelectedFilter.Definition : null;
     }
 }
 private void combo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     (sender as RadComboBox).IsDropDownOpen = false;
 }
 void uiDateFrom_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     RefillDate();
 }
Example #31
0
 /// <summary>
 /// Handles the OnSelectionChanged event of the SamplesCombo control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="SelectionChangedEventArgs" /> instance containing the event data.</param>
 private void SamplesCombo_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var sample = this.SamplesCombo.SelectedItem as SampleItem;
     if (sample != null) sample.Run(this.diagram, this.CurrentSpecifications);
 }
Example #32
0
        private void CmsRadComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox = sender as ComboBox;

            if (comboBox != null)
            {
                BindingExpression be = ((ComboBox)sender).GetBindingExpression(SelectedItemProperty);

                //Validate the control
                if (be != null)
                {
                    FormValidator formvalidator = be.DataItem as FormValidator;
                    if (formvalidator != null)
                    {
                        string propertyPath = be.ParentBinding.Path.Path;

                        if (!propertyPath.Contains("."))
                        {
                            Type propertyType = be.DataItem.GetType().GetProperty(be.ParentBinding.Path.Path).PropertyType;

                            if (propertyType == typeof(String))
                            {
                                if (comboBox.SelectedItem != null)
                                {
                                    formvalidator.Validate(be.ParentBinding.Path.Path, comboBox.SelectedItem.ToString());
                                }
                            }
                            else if (propertyType == typeof(DateTime?))
                            {
                                DateTime dateTimeOut;
                                DateTime? dateTime = null;

                                string[] dateTimeFormats = new string[1];
                                dateTimeFormats[0] = Utils.Date24HTimestamp;

                                if (DateTime.TryParseExact(comboBox.SelectedItem.ToString(), dateTimeFormats, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out dateTimeOut))
                                {
                                    dateTime = dateTimeOut;
                                }

                                formvalidator.Validate(be.ParentBinding.Path.Path, dateTime);
                            }
                            else
                            {
                                formvalidator.Validate(be.ParentBinding.Path.Path, comboBox.SelectedItem);
                            }
                        }
                    }
                }
            }

            if (OriginalValue == null || SelectedItem == null)
            {
                if (OriginalValue != SelectedItem)
                {
                    Background = new SolidColorBrush(Color.FromArgb(255, 173, 216, 230));
                    HasChanged = true;
                }
                else
                {
                    Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));
                    HasChanged = false;
                }
            }
            else
            {
                if (!OriginalValue.Equals(SelectedItem))
                {
                    Background = new SolidColorBrush(Color.FromArgb(255, 173, 216, 230));
                    HasChanged = true;
                }
                else
                {
                    Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));
                    HasChanged = false;
                }
            }

            if (ControlChanged != null)
            {
                ControlChanged(this, HasChanged);
            }
        }
 private static void OnComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var comboBox = (RadComboBox)sender;
     if (comboBox != null & e.AddedItems.Count == 1)
     {
         var filterViewModel = (SimpleFilterViewModel)comboBox.DataContext;
         if (e.AddedItems[0] != null)
         {
             var item = e.AddedItems[0] as EnumApprovalDescriptor;
             filterViewModel.Value = item != null ? item.Value : e.AddedItems[0];
         }
     }
 }
Example #34
0
 private void OnDelaysComboBoxSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     this.RefreshDelayTimer(int.Parse((sender as RadComboBox).SelectedItem.ToString()));
 }
Example #35
0
 private void cmbRevisions_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     btnPrint.IsEnabled = false;
 }
Example #36
0
 private void cboxStation_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     LoadOfficers();
 }
		private void LineColorChanged(object sender, SelectionChangedEventArgs e)
		{
			if (this.routeLine != null)
			{
                this.routeLine.ShapeFill.Stroke = this.GetBrushFromCombo();
			}
		}
Example #38
0
 private void foldersTreeView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
 }
 /// <summary>
 /// dtpEndDate SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void dtpEndDate_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     dtpStartDate.SelectableDateEnd = dtpEndDate.SelectedDate;
 }