void ReleaseDesignerOutlets()
        {
            if (ButtonFavorites != null)
            {
                ButtonFavorites.Dispose();
                ButtonFavorites = null;
            }

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

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

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

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

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

            if (NameRecipe != null)
            {
                NameRecipe.Dispose();
                NameRecipe = null;
            }
        }
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 15, Configuration.FieldSeparator),
                       Id,
                       SetIdTq1.HasValue ? SetIdTq1.Value.ToString(culture) : null,
                       Quantity?.ToDelimitedString(),
                       RepeatPattern != null ? string.Join(Configuration.FieldRepeatSeparator, RepeatPattern.Select(x => x.ToDelimitedString())) : null,
                       ExplicitTime != null ? string.Join(Configuration.FieldRepeatSeparator, ExplicitTime.Select(x => x.ToString(Consts.TimeFormatPrecisionSecond, culture))) : null,
                       RelativeTimeAndUnits != null ? string.Join(Configuration.FieldRepeatSeparator, RelativeTimeAndUnits.Select(x => x.ToDelimitedString())) : null,
                       ServiceDuration?.ToDelimitedString(),
                       StartDateTime.HasValue ? StartDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       EndDateTime.HasValue ? EndDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       Priority != null ? string.Join(Configuration.FieldRepeatSeparator, Priority.Select(x => x.ToDelimitedString())) : null,
                       ConditionText?.ToDelimitedString(),
                       TextInstruction?.ToDelimitedString(),
                       Conjunction,
                       OccurrenceDuration?.ToDelimitedString(),
                       TotalOccurrences.HasValue ? TotalOccurrences.Value.ToString(Consts.NumericFormat, culture) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Beispiel #3
0
 private void ConditionText_GotFocus(object sender, RoutedEventArgs e)
 {
     SetSelectBox(TypeAheadHelper.GetSearchString(ConditionText.Text.Trim()), ConditionListBox, "conditions");
     ConditionText.Select(ConditionText.Text.Length, 0);
 }