Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. namespace Notatnik
  2. {
  3. public abstract class Kategoria
  4. {
  5. public Brush Kolor { get; set; } // Flyweight - stan wewnętrzny
  6. public string Nazwa { get; set; } // Flyweight - stan wewnętrzny
  7.  
  8. public int PozycjaNotatki(Notatka notatka, Data data) // Flyweight - stan zewnętrzny
  9. {
  10. int licznik=0;
  11.  
  12. for (int i = 0; i < data.Notatki.count(); i++) {
  13. if(data.Notatki[i].Kategoria.Nazwa==this.Nazwa){
  14. licznik++;
  15. }
  16. if(this.Nazwa==notatka.Nazwa){
  17. return licznik;
  18. }
  19.  
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement