コード例 #1
0
        private LibraryItem CreateLibraryItem()
        {
            LibraryItem item = new LibraryItem()
            {
                SceneContent = CreateSceneContent()
            };

            return item;
        }
コード例 #2
0
        private void replicateButton_Tapped(object sender, TappedRoutedEventArgs e)
        {
            string selectedText = contentText.SelectedText;
            if (string.IsNullOrEmpty(selectedText))
            {
                selectedText = contentText.Text;
            }

            LibraryItem libraryItem = new LibraryItem();
            libraryItem.SceneContent = new TextSceneContent();
            libraryItem.SceneContent.Content = selectedText;
            libraryItem.Id = "replicated";

            ReplicaCreated(libraryItem);
        }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: kasparov/StoryTeller
 private async System.Threading.Tasks.Task LoadFiles(IList<StorageFile> files)
 {
     foreach (StorageFile file in files)
     {
         LibraryItem libraryItem = new LibraryItem();
         libraryItem.Id = file.Name;
         libraryItem.SceneContent = new TextSceneContent();
         libraryItem.SceneContent.Content = await FileIO.ReadTextAsync(file);
         libraryViewModel.Items.Add(libraryItem);
     }
 }
コード例 #4
0
ファイル: Scene.cs プロジェクト: kasparov/StoryTeller
 public Scene(LibraryItem libraryItem)
     : this()
 {
     _libraryItem = libraryItem;
     _libraryItemId = libraryItem.Id;
 }
コード例 #5
0
 public InteractiveScene(LibraryItem libraryItem)
     : base(libraryItem)
 {
 }