Exemple #1
0
 private void Properties(object sender, MouseButtonEventArgs e)
 {
     try
     {
         DataRowView dataRow = (DataRowView)Filmy.SelectedItem;
         int         index   = Filmy.CurrentCell.Column.DisplayIndex;
         if (index == 6)
         {
             System.Diagnostics.Process.Start(dataRow.Row.ItemArray[index].ToString());
             stav_prog("Program otevřel odkaz");
         }
         else
         {
             stav_prog("Program vytváří kartu k filmu");
             FilmCard  FCard    = new FilmCard();
             Card_film PropFilm = FCard.LoadCard(dataRow);
             PropFilm.Client = this;
             PropFilm.Show();
             stav_prog("Program zobrazuje podrobnosti k filmu: " + dataRow.Row.ItemArray[1].ToString());
         }
     }
     catch { }
 }
Exemple #2
0
        private void Find_CSFD_Click(object sender, RoutedEventArgs e)
        {
            bool SearchCSFDReuslt = false;
            bool Continue         = false;
            bool MoreSearches     = false;

            do
            {
                Search SearchCSFD = new Search();
                SearchCSFD.MoreSearches.IsChecked = MoreSearches;
                SearchCSFDReuslt = (bool)SearchCSFD.ShowDialog();
                MoreSearches     = (bool)SearchCSFD.MoreSearches.IsChecked;
                if (SearchCSFDReuslt)
                {
                    stav_prog("Program vyhledává: " + SearchCSFD.Find_box.Text);
                    Result vysldek = SClass.FindFilm(SearchCSFD.Find_box.Text, true);

                    if (vysldek.Films.Items.Count == 0)
                    {
                        vysldek.Exp1.IsExpanded = false;
                    }
                    else
                    {
                        vysldek.Exp1.IsExpanded = true;
                    }

                    if (vysldek.Actors.Items.Count == 0)
                    {
                        vysldek.Exp2.IsExpanded = false;
                    }
                    else
                    {
                        vysldek.Exp2.IsExpanded = true;
                    }

                    if ((bool)vysldek.ShowDialog())
                    {
                        if (vysldek.DB == "Films")
                        {
                            FilmCard FCard = new FilmCard();
                            string   name  = "";
                            string[] data  = FCard.LoadProperties(ref name, vysldek, SClass.HDoc);
                            data[5] += " min";
                            data[8]  = "Ne";
                            data[9]  = "Ne";
                            Card_film PropFilm = FCard.LoadCard(data);
                            PropFilm.Cancel.Visibility = Visibility.Visible;
                            PropFilm.seen.IsEnabled    = true;
                            PropFilm.DVD.IsEnabled     = true;
                            PropFilm.Client            = this;
                            PropFilm.Accept.Content    = "Přidat film do databáze";
                            PropFilm.ID        = IntelID(Filmy.Items);
                            PropFilm.pripojeni = pripojeni;
                            PropFilm.link      = data[6];
                            PropFilm.Show();
                        }
                        else
                        {
                            ArtCard  ACard   = new ArtCard();
                            var      data    = vysldek.ArtData;
                            Card_art PropArt = ACard.LoadCard(data, vysldek, SClass.HDoc);
                            PropArt.Client = this;
                            PropArt.Show();
                        }
                    }
                }
                else
                {
                    stav_prog("Spuštěn; Akce zrušena");
                }
                Continue = (MoreSearches == true) && (true == SearchCSFDReuslt);
            }while (Continue);
        }