コード例 #1
0
        public EffectPage(System.Windows.Controls.Image img,PhotoSelectionPage fsp)
        {
            father = fsp;
            father.StartModal();
            InitializeComponent();

            if (img != null)
            {

              this.Cursor = Cursors.Wait;
              imageBlackAndWhite.Source = EffectBitmap.convertBitmapToBitmapSource(EffectBitmap.ConvertBlackAndWhite(EffectBitmap.GetBitmap(img)));
              //this.Cursor = Cursors.Wait;
              imageSepia.Source = EffectBitmap.convertBitmapToBitmapSource(EffectBitmap.ConvertSepiaTone(EffectBitmap.GetBitmap(img)));

              if (img.Source.Width > img.Source.Height)
              {
                  imageBlackAndWhite.Height *= img.Source.Height / img.Source.Width;
                  imageSepia.Height *= img.Source.Height / img.Source.Width;
              }
              else
              {
                  imageBlackAndWhite.Width *= img.Source.Width / img.Source.Height;
                  imageSepia.Width *= img.Source.Width / img.Source.Height;
              }

            this.Cursor = Cursors.Arrow;
            }
            Utility.gradientManager gm = new gradientManager();
               gm.setgradient(gridEffect);
        }
コード例 #2
0
        public orderImageOnCd(PhotoSelectionPage f)
        {
            InitializeComponent();
            father = f;
            this.father.StartModal();

            Utility.gradientManager gm = new gradientManager();
            gm.setgradient(gridBackground);

              LoginManager m = LoginControler.getLoginManager();
              if (m != null)
              {
                  if (m.getNbDifferentPicture() < 10)
                  {
                      panelCheckPhotoOnCD.IsEnabled = false;
                      labelWarningMinimun.Visibility = System.Windows.Visibility.Visible;
                  }
                  else
                  {
                      panelCheckPhotoOnCD.IsEnabled = true;
                      labelWarningMinimun.Visibility = System.Windows.Visibility.Hidden;
                  }

                  if (m.getNbDifferentPicture() < 50)
                  {
                      surfaceCheckBoxWithoutPaper.IsEnabled = false;
                  }
                  else
                  {
                      surfaceCheckBoxWithoutPaper.IsEnabled = true;
                  }
              }
        }
コード例 #3
0
        public BookPhotoOrder(PhotoSelectionPage f)
        {
            InitializeComponent();

            Utility.gradientManager gm = new gradientManager();
            gm.setgradient(gridBackground);
            gm.setgradient(ifCheckedGrid);

            father = f;

            this.father.StartModal();

            for (int n = 20; n < 60; n = n + 2)
            {
                comboBoxNumberOfPages.Items.Add(n);
            }

            comboBoxNumberOfPages.SelectedIndex = 0;

            LoginManager m = LoginControler.getLoginManager();
            if (m != null)
            {
                if (m.isBookOrder())
                {
                    checkBox1.IsChecked = true;
                    comboBoxNumberOfPages.SelectedValue = m.getNbPageOkBook().ToString();
                    comboBoxNumberOfPages.Text = m.getNbPageOkBook().ToString();
                }
                else
                {
                    checkBox1.IsChecked = false;
                }
            }
        }
コード例 #4
0
        public FormatDialogImage(string image,PhotoSelectionPage f,XmlNode nodeUser,bool goody=false,bool onbook=false)
        {
            InitializeComponent();

            lstGuiProduct = new List<ProductWidget>();
            filenameImage = image;

            LoginManager m = LoginControler.getLoginManager();
            if (m != null)
            {
                nodePhoto = m.getNodeImageUser(filenameImage);

              /*  if (m.getNbDifferentPicture() < 15)
                {
                    labelMinimunForBook.Visibility = System.Windows.Visibility.Visible;
                    surfaceCheckBoxOnBook.IsEnabled = false;
                }
                else
                {
                    labelMinimunForBook.Visibility = System.Windows.Visibility.Hidden;
                    surfaceCheckBoxOnBook.IsEnabled = true;
                }
               * */

                if (m.getNbDifferentPicture() < 10)
                {
                    labelWarningMinimun.Visibility = System.Windows.Visibility.Visible;
                    surfaceCheckBoxOrderCD2.IsEnabled = false;
                }
                else
                {
                    labelWarningMinimun.Visibility = System.Windows.Visibility.Hidden;
                    surfaceCheckBoxOrderCD2.IsEnabled = true;
                }
            }

            Utility.gradientManager gm = new gradientManager();
            gm.setgradient(gridBackground);
            gm.setgradient(stackPanelFormatPhoto);
            gm.setgradient(grdiOderImageOnCD);
            gm.setgradient(gridOnBook);
            gm.setgradient(stackPanelProductObject);
            //gm.setgradient(tabControlProduct);

            this.Cursor = Cursors.Wait;

            addProduct(0, 0, 0, ref stackPanelFormatPhoto);
            addProduct(1, 0, 1, ref stackPanelFormatPhoto);
            addProduct(2, 0, 2, ref stackPanelFormatPhoto);
            addProduct(3, 1, 0, ref stackPanelFormatPhoto);
            addProduct(4, 1, 1, ref stackPanelFormatPhoto);
            addProduct(5, 1, 2, ref stackPanelFormatPhoto);

            addProduct(6, 0, 0, ref stackPanelProductObject);
            addProduct(7, 0, 1, ref stackPanelProductObject);
            addProduct(8, 0, 2, ref stackPanelProductObject);
            addProduct(9, 1, 0, ref stackPanelProductObject);
            addProduct(10, 1, 1, ref stackPanelProductObject);
            addProduct(11, 1, 2, ref stackPanelProductObject);

            this.Cursor = Cursors.Arrow;

            if (nodePhoto != null)
            {
                XmlNode cdorder = nodePhoto.Attributes.GetNamedItem("imageoncd");
                if (cdorder != null)
                {
                    if (cdorder.Value.ToLower() == "true")
                    {
                        surfaceCheckBoxOrderCD2.IsChecked = true;
                    }
                    else
                    {
                        surfaceCheckBoxOrderCD2.IsChecked = false;
                    }
                }
                else
                {
                    surfaceCheckBoxOrderCD2.IsChecked = false;
                }

                XmlNode bookorder = nodePhoto.Attributes.GetNamedItem("imageonbook");
                if (bookorder != null)
                {
                    if (bookorder.Value.ToLower() == "true")
                    {
                        surfaceCheckBoxOnBook.IsChecked = true;
                    }
                    else
                    {
                        surfaceCheckBoxOnBook.IsChecked = false;
                    }
                }
                else
                {
                    surfaceCheckBoxOnBook.IsChecked = false;
                }

            }

            father = f;
            /*
             * LoginManager m = LoginControler.getLoginManager();
            if (m != null)
            {
                if (m.OrderCd) surfaceCheckBoxOrderCD2.IsChecked = true;
                else surfaceCheckBoxOrderCD2.IsChecked = false;

                string format =m.getFormatImage(image);

                if (format == "15x23") { surfaceRadioButton1.IsChecked = true; }
                if (format == "20x30") { surfaceRadioButton2.IsChecked = true; }
                if (format == "30x45") { surfaceRadioButton3.IsChecked = true; }
            }
             * */

            if (goody)
            {
                tabItem2.IsSelected = true;
            }
            if (onbook)
            {
                tabItem4.IsSelected = true;
            }
            updatePrice();
            this.father.StartModal();
        }
コード例 #5
0
        private void ShowSelection()
        {
            if (IsSelectionPageShow() == true) return;

            PhotoSelectionPage psp = new PhotoSelectionPage();
            SurfaceWindow1.staticSetBackPage((UserControl)conteneur.Children[conteneur.Children.Count - 1], psp);
        }