Esempio n. 1
0
 private void btnRemoveVariant_Click(object sender, RoutedEventArgs e)
 {
     Variants.Remove(lvVariants.SelectedItem as Variant);
     lvVariants.ItemsSource = Variants;
     tbVariantTitle.Clear();
     tbVariantlinkname.Clear();
     lvVariants.Items.Refresh();
 }
Esempio n. 2
0
        public void RemoveVariant(Guid variantId)
        {
            if (IsClosed)
            {
                throw new InvalidOperationException($"IsClosed was: {IsClosed}");
            }

            Variants.Remove(Variants.SingleOrDefault(o => o.Id == variantId));
        }
Esempio n. 3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Removes the variant for the specified language.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public void RemoveVariant(string langId)
        {
            TransUnitVariant tuv = GetVariantForLang(langId);

            if (tuv != null)
            {
                Variants.Remove(tuv);
            }
        }
Esempio n. 4
0
        public void RemoveVariant(string variantName)
        {
            var variant = Variants.Find(x => x.Name == variantName);

            Variants.Remove(variant);
        }