public ProductWidget(String filename,XmlNode node,FormatDialogImage f)
        {
            InitializeComponent();

            father = f;

            for (int n = 0; n < 20; n++)
            {
                comboBoxNbProduct.Items.Add(n);
            }

            LoginManager lm = LoginControler.getLoginManager();
            filenameImage = filename;
            if (node != null)
            {
                XmlNode nameNode = node.Attributes.GetNamedItem("name");

                if (nameNode != null)
                {
                    productID = nameNode.Value;
                    this.comboBoxNbProduct.SelectedIndex = int.Parse(lm.getQuantity(filename, productID));

                    labelName.Content = LocalizationManager.ResourceManager.GetString(nameNode.Value);
                }

                XmlNode priceNode = node.Attributes.GetNamedItem("price");
                if (priceNode != null)
                {
                    labelPrice.Content = priceNode.Value + " Mur";
                }

                XmlNode imageNode = node.Attributes.GetNamedItem("image");
                if (imageNode != null)
                {
                    try
                    {
                        XmlNode noRessourceNode = node.Attributes.GetNamedItem("noressource");
                        if (noRessourceNode != null)
                        {
                            image1.Source = new BitmapImage(new Uri(imageNode.Value));
                        }
                        else
                        {
                            image1.Source = new BitmapImage(new Uri("pack://application:,,,/Resources/" + imageNode.Value));
                        }
                    }
                    catch (Exception exp)
                    {
                        MessageBox.Show(" Error loading Ressource File " + exp.Message);
                    }
                }
            }
        }
        private void ShowFormat(bool goody=false,bool onbook=false)
        {
            FormatDialogImage ep = new FormatDialogImage(imgScatter.OriginalPath, this, SelectionUser.getInstance().getXmlUserNode(imgScatter.OriginalPath), goody,onbook);
            gridEffect.Children.Clear();
            gridEffect.Children.Add(ep);
            gridEffect.Margin = new Thickness(System.Windows.SystemParameters.PrimaryScreenWidth / 2 - 500, System.Windows.SystemParameters.PrimaryScreenHeight, 0, 0);

            TransformationUtil.ShowDialog(gridEffect, 600);
            gridEffect.Visibility = System.Windows.Visibility.Visible;
            UpdateShowPrice();
        }