Exemplo n.º 1
0
 public void CleanUp()
 {
     _controls.Remove(_parentId, TitleTB.GetId());
     _controls.Remove(_parentId, QuoteTB.GetId());
     _controls.Remove(_parentId, AuthorTB.GetId());
     _controls.Remove(_parentId, SourceTB.GetId());
 }
Exemplo n.º 2
0
        public void SetValues(SavedEvent @event)
        {
            TitleTB.SetText(@event.Title);
            CommentTB.SetText(@event.Comment ?? string.Empty);
            DateTime now = DateTime.Now;

            DateTime start = TimeAndDateUtility.ConvertDateAndTime_DateTime(@event.ActivationDate);
            DateTime end   = TimeAndDateUtility.ConvertDateAndTime_DateTime(@event.DeactivationDate);

            StartPicker.SetDates(now > start ? start.Date : now.Date, start, DateTime.MaxValue);
            EndPicker.SetDates(now > end ? end.Date : now.Date, end, DateTime.MaxValue);

            if (start < now)
            {
                StartPicker.GetControl().Enabled = false;
            }

            if (end < now)
            {
                EndPicker.GetControl().Enabled = false;
            }

            if (!StartPicker.GetControl().Enabled&& !EndPicker.GetControl().Enabled)
            {
                TitleTB.GetControl().Enabled   = false;
                CommentTB.GetControl().Enabled = false;

                _purpose = CrudPurposes.None;
                SetTitle();
            }
        }
Exemplo n.º 3
0
        public void CleanUp()
        {
            _controls.Remove(_parentId, Title.GetId());
            _controls.Remove(_parentId, Start.GetId());
            _controls.Remove(_parentId, End.GetId());

            _controls.Remove(_parentId, TitleTB.GetId());
            _controls.Remove(_parentId, CommentTB.GetId());

            _controls.Remove(_parentId, StartPicker.GetId());
            _controls.Remove(_parentId, EndPicker.GetId());
        }
Exemplo n.º 4
0
        public ModifyAVPage(int docID, DocumentsManagementPage page)
        {
            _docID = docID;
            InitializeComponent();

            Document doc = SDM.LMS.GetDoc(docID);

            TitleTB.AppendText(doc.Title);
            AutorsTB.AppendText(doc.Autors);
            PriceTB.AppendText(doc.Price.ToString());
            CopiesTB.AppendText(doc.Quantity.ToString());
            TagsTB.AppendText(doc.Tags);

            prevPage = page;
        }
Exemplo n.º 5
0
        public void SetValues(AppMessage message)
        {
            TitleTB.SetText(message.Title);
            QuoteTB.SetText(message.Quote);
            AuthorTB.SetText(message.Author);
            SourceTB.SetText(message.Source);

            if (message.Show)
            {
                MessageShowRB.Checked = true;
            }
            else
            {
                MessageHideRB.Checked = true;
            }
        }
Exemplo n.º 6
0
        private void MaakDigitaleKopieBTTN_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TitleTB.Text))
            {
                TitleTB.Focus();
                MessageBox.Show("Geef een titel");
                return;
            }
            if (string.IsNullOrEmpty(TaalTB.Text))
            {
                TaalTB.Focus();
                MessageBox.Show("Geef een taal");
                return;
            }

            string            Titel     = TitleTB.Text;
            int               Jaar      = (int)JaarNUD.Value;
            int               Speelduur = (int)SpeelduurNUD.Value;
            string            Taal      = TaalTB.Text;
            int               Leeftijd  = (int)LeeftijdNUD.Value;
            List <Film.Genre> Genres    = new List <Film.Genre>();

            foreach (object o in GenreLB.Items)
            {
                if (o is Film.Genre)
                {
                    Genres.Add((Film.Genre)o);
                }
            }
            int    Toegangscode = (int)ToegangscodeNUD.Value;
            double Prijs        = (double)PrijsNUD.Value;

            DigitaleKopie digitaleKopie = new DigitaleKopie(
                Titel,
                Jaar,
                Speelduur,
                Taal,
                Leeftijd,
                Genres,
                Toegangscode,
                Prijs
                );

            bioscoop.VoegFilmToe(digitaleKopie);
            this.Close();
        }
Exemplo n.º 7
0
 private void SwapTextColorToDark()
 {
     DGTextBlocks = VisualTreeSearch.SearchChildren(WorkingAdaptersDG, typeof(TextBlock));
     TitleTB.BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToBlackST"));
     for (int i = 0; i < (WorkingAdaptersDG).Columns.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToBlackST"));
     }
     for (int i = (WorkingAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToInactiveST"));
     }
     for (int i = (WorkingAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).MouseDown -= CopyMouseDown_e;
     }
 }
Exemplo n.º 8
0
        public ModifyBookPage(int docID, DocumentsManagementPage page)
        {
            _docID = docID;
            InitializeComponent();

            Document doc = SDM.LMS.GetDoc(docID);

            TitleTB.AppendText(doc.Title);
            AutorsTB.AppendText(doc.Autors);
            PublisherTB.AppendText(doc.Publisher);
            PublishYearTB.AppendText(doc.PublishYear.ToString());
            EditionTB.AppendText(doc.Edition);
            DescriptionTB.AppendText(doc.Description);
            PriceTB.AppendText(doc.Price.ToString());
            IsBestsellerCB.SelectedIndex = doc.IsBestseller ? 0 : 1;
            CopiesTB.AppendText(doc.Quantity.ToString());
            TagsTB.AppendText(doc.Tags);

            prevPage = page;
        }
 private void SwapTextColorToBase()
 {
     DGTextBlocks = VisualTreeSearch.SearchChildren(DisabledAdaptersDG, typeof(TextBlock));
     TitleTB.BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     for (int i = 0; i < (DisabledAdaptersDG).Columns.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     }
     for (int i = (DisabledAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     }
     if (DGTextBlocks != null)
     {
         for (int i = (DisabledAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
         {
             (DGTextBlocks[i] as TextBlock).MouseDown += CopyMouseDown_e;
         }
     }
 }
Exemplo n.º 10
0
        private void MaakVertoningBTTN_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TitleTB.Text))
            {
                TitleTB.Focus();
                MessageBox.Show("Geef een titel");
                return;
            }
            if (string.IsNullOrEmpty(TaalTB.Text))
            {
                TaalTB.Focus();
                MessageBox.Show("Geef een taal");
                return;
            }
            if (KwaliteitCBB.SelectedItem == null)
            {
                KwaliteitCBB.Focus();
                MessageBox.Show("Selecteer een kwaliteit");
                return;
            }
            if (ZaalCBB.SelectedItem == null)
            {
                ZaalCBB.Focus();
                MessageBox.Show("Selecteer een zaal");
                return;
            }

            string            Titel     = TitleTB.Text;
            int               Jaar      = (int)JaarNUD.Value;
            int               Speelduur = (int)SpeelduurNUD.Value;
            string            Taal      = TaalTB.Text;
            int               Leeftijd  = (int)LeeftijdNUD.Value;
            List <Film.Genre> Genres    = new List <Film.Genre>();

            foreach (object o in GenreLB.Items)
            {
                if (o is Film.Genre)
                {
                    Genres.Add((Film.Genre)o);
                }
            }
            DateTime BeginTijd = BeginTijdDTP.Value;

            Bioscoopvertoning.Filmkwaliteit Kwaliteit = (Bioscoopvertoning.Filmkwaliteit)KwaliteitCBB.SelectedItem;
            Zaal   Zaal  = (Zaal)ZaalCBB.SelectedItem;
            double Prijs = (double)PrijsNUD.Value;

            Bioscoopvertoning bioscoopvertoning = new Bioscoopvertoning(
                Titel,
                Jaar,
                Speelduur,
                Taal,
                Leeftijd,
                Genres,
                BeginTijd,
                Kwaliteit,
                Zaal,
                Prijs
                );

            bioscoop.VoegFilmToe(bioscoopvertoning);
            this.Close();
        }