/// <summary> /// Set data form Subask to ListView Item /// </summary> /// <param name="ast">subtask</param> private void SetData(AbstractSubTask ast) { this.Title = ast.Title; if (ast is SubTaskCheckbox) { this.CheckBoxVisibility = true; this.SliderVisibility = false; this.ImageVisibility = false; this.CheckBox = (ast as SubTaskCheckbox).Value; } if (ast is SubTaskSlider) { this.CheckBoxVisibility = false; this.SliderVisibility = true; this.ImageVisibility = false; this.Slider = (ast as SubTaskSlider).Value; } if (ast is SubTaskImage) { this.CheckBoxVisibility = false; this.SliderVisibility = false; this.ImageVisibility = true; this.Image = (ast as SubTaskImage).Value; } }
public AbstractSubTaskJSON(AbstractSubTask sT) { this.title = sT.Title; }
/// <summary> /// Creates a new Item for ListView /// </summary> /// <param name="SubTask">Subtask</param> public Item(AbstractSubTask SubTask) { this.SubTask = SubTask; this.SetData(SubTask); }