예제 #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();
        }
예제 #3
0
        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>();
        }
예제 #4
0
 private void OnRefreshRecepiesButtonClicked(object sender, RoutedEventArgs e)
 {
     backendFacilities = BackendFacilitiesRef.Get();
     recepies          = new ObservableCollection <Recepy>(backendFacilities.GetRecepies());
 }