Example #1
0
 public void RegisterStack(NestedStackLayout.NestedTypes type, NestedStackLayout ele)
 {
     if (!stacks.ContainsKey(type))
     {
         stacks[type] = new List <NestedStackLayout>();
     }
     stacks[type].Add(ele);
     allStacks.Add(ele);
 }
Example #2
0
 private void CategorySelected(NestedStackLayout.NestedTypes type)
 {
     if (type == NestedStackLayout.NestedTypes.Task)
     {
         taskSelect.IsVisible     = true;
         taskSelect.HeightRequest = 30;
     }
     else
     {
         taskSelect.IsVisible     = false;
         taskSelect.HeightRequest = 0;
     }
 }
Example #3
0
        private void FinishClicked(object sender, EventArgs args)
        {
            if (newName.Text == "")
            {
                DisplayAlert("Incomplete Data", "No name was entered, please enter a name.", "OK");
                return;
            }
            string name        = newName.Text;
            string description = newDescription.Text;

            NestedStackLayout.NestedTypes type        = categorySelect.GetSelected();
            NestedStackLayout             stackParent = parentSelect.GetSelected();

            NestedTaskLayout.TaskType taskType = taskSelect.GetSelected();
            if (original != null)
            {
                if (stackParent == original.GetParent())
                {
                    original.SetName(name);
                    original.SetDescription(description);
                    Navigation.RemovePage(this);
                }
                else
                {
                    original.GetParent().RemoveSubView(original);
                    NestedStackLayout newGroup = NestedStackLayout.CreateLayout(parent, stackParent, newName.Text, type, taskType);
                    newGroup.SetDescription(description);
                    stackParent.AddSubView(newGroup);
                    Navigation.RemovePage(this);
                }
            }
            else
            {
                NestedStackLayout newGroup = NestedStackLayout.CreateLayout(parent, stackParent, newName.Text, type, taskType);
                newGroup.SetDescription(description);
                stackParent.AddSubView(newGroup);
                Navigation.RemovePage(this);
            }
        }
Example #4
0
 public List <NestedStackLayout> GetStackLayouts(NestedStackLayout.NestedTypes type)
 {
     return(stacks[type]);
 }