Beispiel #1
0
        private void ShowTegelRaport_Click(object sender, RoutedEventArgs e)
        {
            var dw             = new DetailsWindow();
            var uitvoercreator = new UitvoerCreator();

            dw.Width  = 0;
            dw.Height = 0;
            foreach (var u in uitvoercreator.MaakCanvasTegelRaport(SaveNeeded, PrintDatum))
            {
                dw.LoadContent(u);
                dw.Width   = u.Width + 20;
                dw.Height += 400;
            }
            //var uv = new Uitvoer();
            //uv.GetImg();
            //dw.Width = uv.Width + 20;
            //dw.Height = uv.Height;
            //dw.LoadContent(uv);
            dw.Show();
        }
Beispiel #2
0
        private void InitializeFinalStage_Pre()
        {
            var statuslijst = Acumulator.Instance().BB.CheckAllMarks(null);
            int donecntr    = 0;

            foreach (var kvp in statuslijst)
            {
                if (kvp.Value)
                {
                    donecntr++;
                }
            }
            if (donecntr == statuslijst.Count)
            {
                Isvolledig                = true;
                Save2File.IsEnabled       = true;
                ShowPrijsRaport.IsEnabled = true;
                ShowTegelRaport.IsEnabled = true;
                SaveNeeded                = !XmlMatch(null);
                if (SaveNeeded)
                {
                    Acumulator.Instance().uitvoerPlaceHolder = null;
                    SaveXml.IsEnabled = true;
                    NewStatusBox.SetDataNew(PrintDatum, Isvolledig);
                    NewStatusBox.Visibility = Visibility.Visible;
                    if (Acumulator.Instance().oOL != null)
                    {
                        CurrentStatusBox.SetDataSaved();
                        CurrentStatusBox.Visibility = System.Windows.Visibility.Visible;
                    }
                }
                else
                {
                    Acumulator.Instance().BB.ValidateAllMarks(null);
                    CurrentStatusBox.SetDataSaved();
                    CurrentStatusBox.Visibility = System.Windows.Visibility.Visible;
                    SaveXml.IsEnabled           = false;
                }
                if (Acumulator.Instance().uitvoerPlaceHolder == null)
                {
                    if (Acumulator.Instance().Donwloadsactive == 0)
                    {
                        _uitvoerCreator = new UitvoerCreator();
                        var imgList   = _uitvoerCreator.MaakTegelUitvoer(SaveNeeded, PrintDatum);
                        var bpImgList = _uitvoerCreator.MaakPlattegrondUitvoer(SaveNeeded, PrintDatum);
                        List <List <ImageTools.ExtendedImage> > l = new List <List <ImageTools.ExtendedImage> >();
                        l.Add(imgList);
                        l.Add(bpImgList);
                        UitvoerPrijsView.SetPaginaNR(_uitvoerCreator.totalPages, _uitvoerCreator.pagebreaks + 1);
                        BW.RunWorkerAsync(l);
                    }
                    else
                    {
                        _uitvoerCreator = new UitvoerCreator();
                        var imgList = _uitvoerCreator.MaakTegelUitvoer(SaveNeeded, PrintDatum);
                        List <List <ImageTools.ExtendedImage> > l = new List <List <ImageTools.ExtendedImage> >();
                        l.Add(imgList);
                        UitvoerPrijsView.SetPaginaNR(_uitvoerCreator.totalPages, _uitvoerCreator.pagebreaks + 1);
                        BW.RunWorkerAsync(l);
                        ImageStaus.Text = "Er moeten nog plaatjes gedownload worden.";
                    }
                }
                else if (Acumulator.Instance().uitvoerPlaceHolder != null && Acumulator.Instance().uitvoerPlaceHolder.Pdfdoc != null)
                {
                    _File           = Acumulator.Instance().uitvoerPlaceHolder.Pdfdoc;
                    _uitvoerCreator = Acumulator.Instance().uitvoerPlaceHolder.uitvoerCreator;
                    PrintDatum      = Acumulator.Instance().PrevPrintDatum;
                    Acumulator.Instance().BusyBee.IsBusy = false;
                }
                UitvoerPrijsView.Visibility = Visibility.Collapsed;
                UitvoerView.Visibility      = Visibility.Collapsed;
            }
            else
            {
                Isvolledig = false;
                NewStatusBox.SetDataNew(PrintDatum, Isvolledig);
                NewStatusBox.Visibility = Visibility.Visible;
                if (Acumulator.Instance().oOL != null)
                {
                    CurrentStatusBox.SetDataSaved();
                    CurrentStatusBox.Visibility = System.Windows.Visibility.Visible;
                }
                Acumulator.Instance().BusyBee.IsBusy = false;
            }
            if (Acumulator.Instance().HuidigGebruiker.Rol == UserRole.Demo)
            {
                SaveXml.IsEnabled = false;
            }
        }
Beispiel #3
0
        public void newInitPre()
        {
            //check volledig onvolledig
            Acumulator.Instance().BB.ShowHideAllMarks(true, null);
            var aantalIncompleet = (from p in Acumulator.Instance().BB.CheckAllMarks(null)
                                    where !p.Value
                                    select p.Key).Count();

            aantalIncompleet += ImagesOk();
            var compleet        = Isvolledig = aantalIncompleet == 0;
            var saveXmlAanwezig = Acumulator.Instance().SavedXml != null;
            var memXmlAanwezig  = Acumulator.Instance().lastGeneratedXml != null;
            var moetGenereren   = true;
            var moetOpslaan     = true;

            if (memXmlAanwezig)
            {
                moetGenereren = !XmlMatch(Acumulator.Instance().lastGeneratedXml);
            }
            if (saveXmlAanwezig)
            {
                moetOpslaan = !XmlMatch(Acumulator.Instance().SavedXml);
                CurrentStatusBox.SetDataSaved();
                CurrentStatusBox.Visibility = System.Windows.Visibility.Visible;
            }
            if (compleet)
            {
                Save2File.IsEnabled       = true;
                ShowPrijsRaport.IsEnabled = true;
                ShowTegelRaport.IsEnabled = true;
            }
            if (moetOpslaan)
            {
                SaveXml.IsEnabled = true;
                NewStatusBox.SetDataNew(PrintDatum, Isvolledig);
                NewStatusBox.Visibility = Visibility.Visible;
            }
            else
            {
                SaveXml.IsEnabled = false;
                Acumulator.Instance().BB.ValidateAllMarks(null);
            }

            if ((compleet && moetGenereren) || (compleet && !moetGenereren && Acumulator.Instance().uitvoerPlaceHolder == null))
            {
                _uitvoerCreator = new UitvoerCreator();
                var imgList = _uitvoerCreator.MaakTegelUitvoer(SaveNeeded, PrintDatum);
                List <List <ImageTools.ExtendedImage> > l = new List <List <ImageTools.ExtendedImage> >();
                l.Add(imgList);
                if (Acumulator.Instance().bluePrintManager.GetAllDone())
                {
                    var bpImgList = _uitvoerCreator.MaakPlattegrondUitvoer(SaveNeeded, PrintDatum);
                    l.Add(bpImgList);
                }
                else
                {
                    ImageStaus.Text = "Er moeten nog plaatjes gedownload worden.";
                }
                UitvoerPrijsView.SetPaginaNR(_uitvoerCreator.totalPages, _uitvoerCreator.pagebreaks + 1);
                BW.RunWorkerAsync(l);
                UitvoerPrijsView.Visibility = Visibility.Collapsed;
                UitvoerView.Visibility      = Visibility.Collapsed;
            }
            else if (compleet)
            {
                _File           = Acumulator.Instance().uitvoerPlaceHolder.Pdfdoc;
                _uitvoerCreator = Acumulator.Instance().uitvoerPlaceHolder.uitvoerCreator;
                PrintDatum      = Acumulator.Instance().PrevPrintDatum;
                Acumulator.Instance().BusyBee.IsBusy = false;
            }
            else
            {
                Acumulator.Instance().BusyBee.IsBusy = false;
            }
            if (Acumulator.Instance().HuidigGebruiker.Rol == UserRole.Demo)
            {
                SaveXml.IsEnabled = false;
            }
        }