示例#1
0
        private void oButton_EditPipe_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult oResult = MessageBox.Show("Wollen Sie diese Pfeife bearbeiten?", "Pfeife bearbeiten", MessageBoxButton.YesNo, MessageBoxImage.Question);
            var iClickedIndex        = oListBox_Pipes.SelectedIndex;

            if (oResult == MessageBoxResult.Yes)
            {
                bEditAddMode = true;
                var oWindow = new Window_ShowEdit(oUser, iClickedIndex, this, bEditAddMode);
                oWindow.Owner   = this;
                this.Visibility = Visibility.Hidden;
                oWindow.ShowDialog();
            }
        }
示例#2
0
        /// <summary>
        /// Add a new Pipe entry to the pipe list box
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add_Pipe_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult oResult = MessageBox.Show("Eine neue Pfeife wird angelegt, wenn Sie auf ok klicken", "Pfeife anlegen", MessageBoxButton.YesNo, MessageBoxImage.Question);
            var iClickedIndex        = oListBox_Pipes.SelectedIndex;

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