Пример #1
0
 public void CreativeListener(TextPaper textPaper)
 {
     if (textPaper.GetType() == typeof(Jornal))
     {
         StorageManager.JornalStorage.AddItem(textPaper as Jornal);
     }
 }
Пример #2
0
 public void CreativeListener(TextPaper textPaper)
 {
     if (textPaper.GetType() == typeof(Book))
     {
         StorageManager.BookStorage.AddItem(textPaper as Book);
     }
 }
Пример #3
0
 public void CreativeListener(TextPaper textPaper)
 {
     if (textPaper.GetType() == typeof(NewsPaper))
     {
         StorageManager.NewsPaperStorage.AddItem(textPaper as NewsPaper);
     }
 }
Пример #4
0
        public static string ToWritebleTxt(TextPaper textPaper)
        {
            if (textPaper.GetType() == typeof(Book))
            {
                return(ToWritebleTxt(textPaper as Book));
            }

            if (textPaper.GetType() == typeof(Jornal))
            {
                return(ToWritebleTxt(textPaper as Jornal));
            }

            if (textPaper.GetType() == typeof(NewsPaper))
            {
                return(ToWritebleTxt(textPaper as NewsPaper));
            }

            return("");
        }
Пример #5
0
        public static void Add(TextPaper item)
        {
            if (item.GetType() == typeof(Book))
            {
                BookStorage.AddItem(item as Book);
                return;
            }

            if (item.GetType() == typeof(Jornal))
            {
                JornalStorage.AddItem(item as Jornal);
                return;
            }

            if (item.GetType() == typeof(NewsPaper))
            {
                NewsPaperStorage.AddItem(item as NewsPaper);
                return;
            }
        }
Пример #6
0
 public void ActivateCreateEvent(TextPaper textPaper)
 {
     CreateEvent(textPaper);
 }