Ejemplo n.º 1
0
 private void MashStepListView_KeyDown(object sender, KeyEventArgs e)
 {
     if (Key.Delete == e.Key)
     {
         foreach (Domain.MashProfileStep listViewItem in ((ListView)sender).SelectedItems)
         {
             MashProfileList.Remove(listViewItem);
             break;
         }
     }
 }
Ejemplo n.º 2
0
        private void MashStepListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (MashStepListView.SelectedIndex < 0 ||
                MashStepListView.SelectedIndex >= MashProfileList.Count)
            {
                return;
            }

            MashStepTempTextBox.Text = MashProfileList.ToArray()[MashStepListView.SelectedIndex].Temperature.ToString();
            MashStepTimeTextBox.Text = MashProfileList.ToArray()[MashStepListView.SelectedIndex].StepTime.ToString();

            if (MashStepListView.SelectedIndex == 0)
            {
                MashHeatOverTimeTextBox.Text = "0";
            }
            else
            {
                MashHeatOverTimeTextBox.Text = MashProfileList.ToArray()[MashStepListView.SelectedIndex].HeatOverTime.ToString();
            }

            MashProfileList.Remove((Domain.MashProfileStep)MashStepListView.SelectedItem);
            AddMashStepButton.Content = "Update";
        }