예제 #1
0
 public NoteDataItem(String title, NoteBook notebook)
     : base(title, "Assets/Icons/note.png")
 {
     this.NoteBook    = notebook;
     this.Type        = NoteTypes.Note;
     this.Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut porta, dui nec molestie vulputate, nibh elit scelerisque purus, sit amet blandit turpis ante at dolor. Praesent tellus libero, varius a dignissim ut, molestie ac nisl. Nullam dolor erat, ullamcorper sed sodales eget, volutpat nec leo. Maecenas aliquet auctor mauris id tristique. Vestibulum a euismod eros. Phasellus enim est, dictum vitae placerat in, semper et odio. In adipiscing metus quis nibh placerat sit amet semper tortor ultricies. Morbi eget felis arcu. Pellentesque nec tellus at felis molestie dapibus nec ut nisi. Cras condimentum ipsum nec justo aliquam pellentesque. Nullam arcu urna, fermentum vitae feugiat ac, placerat a sem. Duis et leo justo, non tempus felis. Curabitur euismod imperdiet purus id fermentum.";
 }
예제 #2
0
        /// <summary>
        /// Add Note to spesific notebook and save changes.
        /// </summary>
        /// <param name="note">Note to add</param>
        /// <param name="notebook">Target Notebook</param>
        public static void AddToNoteBook(NoteDataCommon note, NoteBook notebook)
        {
            switch (note.Type)
            {
            case NoteTypes.Food:
                notebook.FoodSection.Add(note);
                break;

            case NoteTypes.Note:
                notebook.NotesSection.Add(note);
                break;

            case NoteTypes.ToDo:
                notebook.ToDoSection.Add(note);
                break;
            }
            note.NoteBook = notebook;
            DataManager.Save(notebook);
        }
예제 #3
0
        public void BuildDummyData()
        {
            this.AllGroups.Clear();

            String ITEM_CONTENT = String.Format("Item Content: {0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}",
                                                "Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat");

            ObservableCollection <ToDo> todo = new ObservableCollection <ToDo>();

            todo.Add(new ToDo("Test"));
            todo.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo.Add(new ToDo("Test3"));
            todo.Add(new ToDo("Test"));
            todo.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo.Add(new ToDo("Test3"));
            todo.Add(new ToDo("Test"));
            todo.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo.Add(new ToDo("Test3"));
            todo.Add(new ToDo("Test"));
            todo.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo.Add(new ToDo("Test3"));
            todo.Add(new ToDo("Test"));
            todo.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo.Add(new ToDo("Test3"));

            var group1 = new NoteBook("Getting Started");

            var food1 = new FoodDataItem("Wheat Germ Whole-Wheat Buttermilk Pancakes", group1);

            food1.Description = "1. In a medium bowl, mix eggs with oil and buttermilk. Stir in baking soda, wheat germ, salt and flour; mix until blended. \n2. Heat a lightly oiled griddle or frying pan over medium-high heat. Pour or scoop the batter onto the griddle, using approximately 1/4 cup for each pancake. Brown on both sides, turning once. ";
            food1.Tags.Add("2 eggs, lightly beaten");
            food1.Tags.Add("1/4 cup canola oil");
            food1.Tags.Add("2 cups buttermilk");
            food1.Tags.Add("1/2 cup wheat germ");
            food1.Tags.Add("1/2 teaspoon salt");
            food1.Tags.Add("1 1/2 cups whole wheat pastry flour");
            food1.Images.Add("Assets/foodPreview1.jpg");
            food1.Images.Add("Assets/foodPreview2.jpg");
            group1.FoodSection.Add(food1);

            var todo1 = new ToDoDataItem("Shopping List", group1);

            todo1.ToDo = todo;
            group1.ToDoSection.Add(todo1);

            var note1 = new NoteDataItem("24 US States That Have Sweeping Self-Defense Laws Just Like Florida’s", group1);

            note1.Description = "\"Stand Your Ground,\" \"Shoot First,\" \"Make My Day\" – state laws asserting an expansive right to self-defense – have come into focus after the February 2012 killing of 17-year-old Trayvon Martin." +
                                "\n\nIn 2005, Florida became the first state to explicitly expand a person’s right to use deadly force for self-defense. Deadly force is justified if a person is gravely threatened, in the home or \"any other place where he or she has a right to be.\" " +
                                "\n\nMost states have long allowed the use of reasonable force, sometimes including deadly force, to protect oneself inside one’s home — the so-called Castle Doctrine. Outside the home, people generally still have a \"duty to retreat\" from an attacker, if possible, to avoid confrontation. In other words, if you can get away and you shoot anyway, you can be prosecuted. In Florida, there is no duty to retreat. You can \"stand your ground\" outside your home, too." +
                                "\n\nIf self-defense is invoked in Florida, the person is immune from criminal or civil prosecution." +
                                "\n\nIn the Martin case, the local police chief has said that they did not arrest the shooter, George Zimmerman, because their initial investigation supported his self-defense claim, and that they were therefore prohibited from making an arrest or prosecution. (The police report on the shooting refers to it as an \"unnecessary killing to prevent unlawful act.\")" +
                                "\n\nThe police chief has since temporarily stepped down, after a vote of no-confidence from the city. The case is being investigated by the Department of Justice and a Florida state attorney. A grand jury will convene on April 10 to decide whether charges can be brought against Zimmerman." +
                                "\n\nZimmerman’s lawyer said in an interview with ABC News that Zimmerman will be protected under Florida’s self-defense law." +
                                "\n\nIn Florida, a homicide case can be thrown out by a judge before trial because the defendant successfully invokes self-defense. The burden is on the prosecution to disprove the claim in order to bring charges, rather than do so in the trial. The Florida state attorney leading the prosecution told ABC news that the self-defense law means it is \"more difficult than a normal criminal case\" to bring charges." +
                                "\n\nFlorida is not alone in its expansive definition of self-defense. Twenty-four other states now allow people to stand their ground. Most of these laws were passed after Florida’s. (Some states never had a duty to retreat to begin with.)" +
                                "\n\nHere’s a rundown of the states with laws mirroring the one in Florida, where there’s no duty to retreat in public places and where, in most cases, self-defense claims have some degree of immunity in court. (The specifics of what kind of immunity, and when the burden of proof lies on the prosecution, vary from state to state.)" +
                                "\n\nMany of the laws were originally advocated as a way to address domestic abuse cases 2014 how could a battered wife retreat if she was attacked in her own home? Such legislation also has been recently pushed by the National Rifle Association and other gun-rights groups.";

            group1.NotesSection.Add(note1);


            this.AllGroups.Add(group1);

            var group2 = new NoteBook("Group Title: 2");

            var todo2 = new ObservableCollection <ToDo>();

            todo2.Add(new ToDo("Test")
            {
                Done = true
            });
            todo2.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo2.Add(new ToDo("Test3")
            {
                Done = true
            });
            todo2.Add(new ToDo("Test")
            {
                Done = true
            });
            todo2.Add(new ToDo("Test2")
            {
                Done = true
            });
            todo2.Add(new ToDo("Test3")
            {
                DueDate = DateTime.Now.AddSeconds(50)
            });
            todo2.Add(new ToDo("Test3")
            {
                DueDate = DateTime.Now.AddSeconds(50)
            });
            todo2.Add(new ToDo("AAAAAAAAAAAA")
            {
                DueDate = DateTime.Now.AddSeconds(50)
            });
            var todo3 = new ToDoDataItem("To Do 3", group2);

            todo3.ToDo = todo2;
            group2.ToDoSection.Add(todo3);

            note1 = new NoteDataItem("24 US States That Have Sweeping Self-Defense Laws Just Like Florida’s ", group2);
            note1.Images.Add("Assets/seaPreview.png");

            var note2 = new NoteDataItem("Note 5", group2);
            var note3 = new NoteDataItem("Note 6", group2);
            var note4 = new NoteDataItem("Note 7", group2);
            var note5 = new NoteDataItem("Note 8", group2);

            group2.NotesSection.Add(note1);
            group2.NotesSection.Add(note2);
            group2.NotesSection.Add(note3);
            group2.NotesSection.Add(note4);
            group2.NotesSection.Add(note5);

            this.AllGroups.Add(group2);
        }
예제 #4
0
 public ToDoDataItem(String title, NoteBook notebook)
     : base(title, "Assets/Icons/todo.png")
 {
     this.Type     = NoteTypes.ToDo;
     this.NoteBook = notebook;
 }
예제 #5
0
 public FoodDataItem(String title, NoteBook notebook)
     : base(title, "Assets/Icons/food.png")
 {
     this.NoteBook = notebook;
     this.Type     = NoteTypes.Food;
 }