예제 #1
0
파일: Student.cs 프로젝트: pivovard/ZCU
        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);
                });
        }
예제 #2
0
파일: Odevzdani.cs 프로젝트: pivovard/ZCU
        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);
                });
        }
예제 #3
0
파일: NET.cs 프로젝트: pivovard/ZCU
        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");
                });
        }