예제 #1
0
        private void ShowBody(Note note)
        {
            this.body.Children.Clear();
            foreach (NoteDetail dett in note.Body)
            {
                if (!string.IsNullOrEmpty(dett.Text))
                {
                    TextBlock block2 = new TextBlock
                    {
                        TextWrapping = TextWrapping.Wrap,
                        FontSize = 40,
                        Foreground = new SolidColorBrush(Colors.Black),
                        Text = dett.Text
                    };
                    TextBlock block = block2;
                    this.body.Children.Add(block);
                }
                else if ((dett.ListPageDraw != null) && (dett.ListPageDraw.Count > 0))
                {
                    ShowDrawingsControl drawings2 = new ShowDrawingsControl
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch,
                        DataSource = dett.ListPageDraw
                    };
                    ShowDrawingsControl drawings = drawings2;
                    this.body.Children.Add(drawings);
                }
            }

        }
예제 #2
0
 private void DeleteTile(Note nota)
 {
     ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault<ShellTile>(x => x.NavigationUri.ToString().Contains(string.Format("idNote={0}", nota.Id)));
     if (tile != null)
     {
         tile.Delete();
     }
 }
예제 #3
0
 private void ArrangeTile(Note nota)
 {
     ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault<ShellTile>(x => x.NavigationUri.ToString().Contains(string.Format("idNote={0}", nota.Id)));
     string str = nota.Id.ToString();
     StandardTileData data2 = new StandardTileData();
     data2.Title = nota.Title;
     StandardTileData data = data2;
     if (tile != null)
     {
         tile.Update(data);
     }
     else if (tile == null)
     {
         ShellTile.Create(new Uri(string.Format("/NotePreview.xaml?idNote={0}", nota.Id.ToString()), UriKind.Relative), data);
     }
 }