Пример #1
0
 void ResetCurrentValues()
 {
     ClearCurrentComboBoxValues();
     BtnsReenable();
     HideCurrentOrderElements();
     contactLenses  = null;
     glasses        = null;
     glassAdditions = null;
     orderList      = null;
     optionsST.Children.Clear();
     SaveRims.Click -= SaveRimsBtnClick;
 }
Пример #2
0
        void OkButtonLensesClick(object sender, RoutedEventArgs e)
        {
            var selectedType = TypeComboBox.Text;

            if (!string.IsNullOrEmpty(selectedType))
            {
                OkButtonLenses.IsEnabled = false;
                TypeComboBox.IsEnabled   = false;
                ShowHiddenCLElements();
                string        product       = "lenses";
                VisionExpress visionExpress = new VisionExpress();
                switch (selectedType)
                {
                case "Multifocal":
                    GlassProductBuilder builderMulti = new MultifocalBuilder(product);
                    visionExpress.ConstructContactLenses(builderMulti);
                    contactLenses = builderMulti._ContactLenses;
                    break;

                case "Progressive":
                    GlassProductBuilder builderProg = new ProgressiveBuilder(product);
                    visionExpress.ConstructContactLenses(builderProg);
                    contactLenses = builderProg._ContactLenses;
                    break;

                case "Antireflective":
                    GlassProductBuilder builderAnti = new AntireflectiveBuilder(product);
                    visionExpress.ConstructContactLenses(builderAnti);
                    contactLenses = builderAnti._ContactLenses;
                    break;
                }
                glassAdditions        = new GlassProduct();
                glassAddDefectCommand = new GlassProductDefectCommand();
                RenderCheckBox();
                FillColorsOptions();
                RefreshCurrentOrderList();
            }
        }