Exemplo n.º 1
0
        private void oButton_EditTobacco_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult oResult = MessageBox.Show("Wollen Sie diesn Tabak bearbeiten?", "Tabak bearbeiten", MessageBoxButton.YesNo, MessageBoxImage.Question);
            var iClickedIndex        = oListBox_Tobacco.SelectedIndex;

            if (oResult == MessageBoxResult.Yes)
            {
                bEditAddMode = true;
                var oWindow = new Window_ShowEditTobacco(oUser, iClickedIndex, this, bEditAddMode);
                oWindow.Owner   = this;
                this.Visibility = Visibility.Hidden;
                oWindow.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void Add_Tobacco_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult oResult = MessageBox.Show("Ein neuer Tabak wird angelegt, wenn Sie auf ok klicken", "Tabak anlegen", MessageBoxButton.YesNo, MessageBoxImage.Question);
            var iClickedIndex        = oListBox_Tobacco.SelectedIndex;

            if (oResult == MessageBoxResult.Yes)
            {
                bEditAddMode = false;
                var oWindow = new Window_ShowEditTobacco(oUser, iClickedIndex, this, bEditAddMode);
                oWindow.Owner   = this;
                this.Visibility = Visibility.Hidden;
                oWindow.ShowDialog();
            }
        }