Example #1
0
        /// <summary>
        /// Распечатать визитки
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Slide4_OK_Click(object sender, RoutedEventArgs e)
        {
            Slide4.Visibility = Visibility.Collapsed;
            Slide5.Visibility = Visibility.Visible;
            WPF_Printer.Print(VisitkaPreview.MultileObject(2, 5));
            History.Add(new VisitInfo()
            {
                Surname    = this.PersonName[0],
                Name       = this.PersonName[1],
                SecondName = this.PersonName[2],
                Company    = this.Company,
                Job        = this.Job,
                Phone      = this.Phone,
                Email      = this.EMail,
                Instagram  = this.Instagram,
                VisitType  = NVis
            });
            GC.Collect();
            DispatcherTimer DT = new DispatcherTimer()
            {
                Interval = TimeSpan.FromSeconds(5),
            };

            DT.Tick += (object Sender, EventArgs ee) =>
            {
                ((DispatcherTimer)Sender).Stop();
                Slide5_OK_Click(Sender, new RoutedEventArgs());
            };
            DT.Start();
        }
Example #2
0
        /// <summary>
        /// СТАРОЕ!!!
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Visit V1 = new Visit(1)
            {
                PersonName      = PName.Text,
                PersonCompany   = PCompany.Text,
                PersonJob       = PJob.Text,
                PersonEMail     = PEMail.Text,
                PersonInstagram = PIntagram.Text,
                BackGroundImage = new SolidColorBrush(Colors.Aqua)
            };



            WPF_Printer.Print(V1.MultileObject(2, 10));
            GC.Collect();
        }