Beispiel #1
0
        private void OnOkButtonClicked(object sender, RoutedEventArgs e)
        {
            LocalBackendFacilities backendFacilities = (LocalBackendFacilities)BackendFacilitiesRef.Get();

            backendFacilities.dataBaseFilePath = localDataBaseFilePathTextBox.Text;
            Close();
        }
        private void OnOkButtonClicked(object sender, RoutedEventArgs e)
        {
            LocalBackendFacilities backendFacilities = (LocalBackendFacilities)BackendFacilitiesRef.Get();

            if (state == State.OPEN)
            {
                backendFacilities.dataBaseFilePath = openDBFileTextBox.Text;
            }
            else if (state == State.CREATE)
            {
            }
            Close();
            MainWindow.instance.Show();
        }
        public AddRecepyWindow()
        {
            backendFacilities = BackendFacilitiesRef.Get();

            InitializeComponent();

            addIngredientButton.Click    += OnAddIngredientButtonClicked;
            removeIngredientButton.Click += OnRemoveIngredientButtonClicked;
            okButton.Click     += OnOkButtonClicked;
            cancelButton.Click += OnCancelButtonClicked;

            ingredientsListView.ItemsSource       = ingredients;
            newIngredientUnitComboBox.ItemsSource = Enum.GetValues(typeof(Unit)).Cast <Unit>();
        }
 private void OnRefreshRecepiesButtonClicked(object sender, RoutedEventArgs e)
 {
     backendFacilities = BackendFacilitiesRef.Get();
     recepies          = new ObservableCollection <Recepy>(backendFacilities.GetRecepies());
 }