Ejemplo n.º 1
0
        /// Opens a new window used to edit series in the database
        /// </summary>
        private void buttonEditSeries_Click(object sender, RoutedEventArgs e)
        {
            var LVI = listViewSeries.SelectedItem;

            if (LVI != null) //Checks if a series is selected
            {
                //Types used to store data of the selected series
                ClassComics CCLVI = LVI as ClassComics;
                CCLVI.GetSeriessData();
                string Publisher = CCLVI.Publisher;
                string Universe  = CCLVI.Universe;
                string Series    = CCLVI.Series;
                int    CollIss   = CCLVI.CollIss;
                int    Year      = CCLVI.Year;
                string Comments  = CCLVI.Comments;
                byte[] Image     = CCLVI.bytImage;

                MainWindow MW = this;

                EditSeries ES = new EditSeries(MW, Publisher, Universe, Series, CollIss, Year, Comments, Image, LVI);
                ES.ShowDialog();
            }
            //Messagebox if a series is not selected
            else
            {
                MessageBox.Show("The Duck Council is dissapointed \n Choose a series to update");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates listViewIssues with issues from the selected series
        /// </summary>
        private void listViewSeries_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var LVI = listViewSeries.SelectedItem;

            if (LVI != null) //Checks if a series is selected
            {
                ClassComics CCLVI = LVI as ClassComics;
                CCLVI.GetSeriessData();
                ID = CCLVI.ID;

                listViewIssues.ItemsSource = CB._listViewIssues;
                CB.UpdateListviewIssues(ID);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Opens an info window when double clicking on a series
        /// </summary>
        private void listViewSeries_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var LVI = listViewSeries.SelectedItem;

            if (LVI != null) //Checks if a series is selected
            {
                //Types used to store the data for the info window
                ClassComics CCLVI = LVI as ClassComics;
                CCLVI.GetSeriessData();
                int    Year     = CCLVI.Year;
                string Comments = CCLVI.Comments;
                byte[] bytImage = CCLVI.bytImage;

                InfoSeries IS = new InfoSeries(Year, Comments, bytImage);
                IS.ShowDialog();
            }
        }
Ejemplo n.º 4
0
        /// Opens a new window used to add issues to the database
        /// </summary>
        private void buttonAddIssues_Click(object sender, RoutedEventArgs e)
        {
            var LVI = listViewSeries.SelectedItem;

            if (LVI != null)
            {
                ClassComics CCLVI = LVI as ClassComics;
                CCLVI.GetSeriessData();
                string strSeries = CCLVI.Series;
                int    ID        = CCLVI.ID;

                MainWindow MW = this;

                AddIssue AI = new AddIssue(MW, strSeries, ID);
                AI.ShowDialog();
            }
            else
            {
                MessageBox.Show("The Duck Council is dissapointed \n Choose a series to add issues");
            }
        }