Ejemplo n.º 1
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";
        }