Exemplo n.º 1
0
        public void AddVideo()
        {
            VidListFm    fm  = new VidListFm();
            DialogResult dia = fm.ShowDialog();

            if (dia == System.Windows.Forms.DialogResult.OK)
            {
                Video v = new Video(fm.TextboxTitle.Text, fm.TextboxZeit.Text, fm.dateTimePicker1.Text, fm.dateTimePicker2.Text);
                videos.Add(v);
                v.isChanged = true;
                this.RefreshList();
            }
        }
Exemplo n.º 2
0
        public void ladex()
        {
            Video          fm;
            VidListFm      vp         = new VidListFm();
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Filter           = "txt files (*.txt)|*.txt|ALL files (*.*)|*.*";
            openDialog.FilterIndex      = 2;
            openDialog.RestoreDirectory = true;
            if (openDialog.ShowDialog() == DialogResult.OK)
            {
                if ((speichernTest() == true))
                {
                    nurSave(geladeneDateiname);
                }

                Laden(openDialog.FileName);
            }
        }
Exemplo n.º 3
0
        private void listViewVideos_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Video video = listViewVideos.SelectedItems[0].Tag as Video;

            if (video != null)
            {
                VidListFm fr = new VidListFm();
                fr.TextboxTitle.Text    = video.Name;
                fr.TextboxZeit.Text     = video.vZeit.ToString();
                fr.dateTimePicker1.Text = video.erdatum.ToShortDateString();
                fr.dateTimePicker2.Text = video.hochdatum.ToShortDateString();
                video.isChanged         = true;
                fr.ShowDialog();
                if (fr.DialogResult == DialogResult.OK)
                {
                    video.Name      = fr.TextboxTitle.Text;
                    video.vZeit     = Convert.ToInt32(fr.TextboxZeit.Text);
                    video.erdatum   = Convert.ToDateTime(fr.dateTimePicker1.Text);
                    video.hochdatum = Convert.ToDateTime(fr.dateTimePicker2.Text);
                    this.RefreshList();
                }
            }
        }
Exemplo n.º 4
0
        public void LoadVideo()
        {
            Video          fm;
            VidListFm      vp         = new VidListFm();
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Filter           = "txt files (*.txt)|*.txt|ALL files (*.*)|*.*";
            openDialog.FilterIndex      = 2;
            openDialog.RestoreDirectory = true;
            if (openDialog.ShowDialog() == DialogResult.OK)
            {
                if (speichernTest() == true)
                {
                    if (File.Exists(openDialog.FileName))
                    {
                        DialogResult r1 = MessageBox.Show("Willst du Speichern ?", "Speichern", MessageBoxButtons.YesNo);
                        if (r1 == System.Windows.Forms.DialogResult.Yes)
                        {
                            nurSave(geladeneDateiname);
                        }
                    }
                    else
                    {
                        DialogResult res = MessageBox.Show("Willst du Speichern ?", "Speichern", MessageBoxButtons.YesNo);


                        if (res == System.Windows.Forms.DialogResult.Yes)
                        {
                            SaveVideo();
                        }
                    }
                }

                Laden(openDialog.FileName);
            }
        }