Exemplo n.º 1
0
        public void ToggleTextEditting(EditableRecipeStep step)
        {
            if (!IsEditting)
            {
                return;
            }
            bool currentVal = step.IsEditting;

            RecipeSteps.ForEach(s => s.IsEditting      = false);
            RecipeSteps.ForEach(s => s.IsOrderEditting = false);

            step.IsEditting = !currentVal;
            Focus();
        }
Exemplo n.º 2
0
        public void ToggleOrderEditting(EditableRecipeStep step)
        {
            if (!IsEditting)
            {
                return;
            }
            var currentSelected = RecipeSteps.FirstOrDefault(s => s.IsOrderEditting);

            if (currentSelected != null)
            {
                startDragStep = currentSelected;
                Drop(step);
                return;
            }
            bool currentVal = step.IsOrderEditting;

            RecipeSteps.ForEach(s => s.IsOrderEditting = false);
            RecipeSteps.ForEach(s => s.IsEditting      = false);

            step.IsOrderEditting = !currentVal;
        }