Exemple #1
0
        public Student()
        {
            Odevzdani = new ObservableCollection<Model.Odevzdani>();

            AddOdevzdani = new RelayCommand(
                (o) => {
                    Odevzdani x = new Odevzdani() { Nazev = "Nazev", Body = 0 };
                    Odevzdani.Add(x);
                });

            RemOdevzdani = new RelayCommand(
                (o) => {
                    Odevzdani.Remove(SelectedOdevzdani);
                });
        }
Exemple #2
0
        public Odevzdani()
        {
            Pripominky = new ObservableCollection<Pripominka>();

            AddPripominka = new RelayCommand(
                (o) => {
                    Pripominka x = new Pripominka() { Typ = TypPripominky.Neutralni, Body = 0 };
                    Pripominky.Add(x);
                });

            RemPripominka = new RelayCommand(
                (o) => {
                    Pripominky.Remove(SelectedPripominka);
                });
        }
Exemple #3
0
        public NET()
        {
            Studenti = new ObservableCollection<Student>();

            Studenti = Serializace.LoadCSV();

            LoadCSV = new RelayCommand(
                (o) => {
                    this.Studenti.Clear();
                    this.Studenti = Serializace.LoadCSV();
                });
            LoadXML = new RelayCommand(
                (o) => {
                    NET net = Serializace.FromXML("export.xml");
                    this.Studenti.Clear();
                    this.Studenti = net.Studenti;
                });
            ExportXML = new RelayCommand(
                (o) => {
                    Serializace.ToXML(this, "export.xml");
                });
        }