Exemple #1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            string activeDir = EIBXMLServices.EIBXMLUtilities.folderName;

            resUtil = new ResourceUtilities();
            newPath = System.IO.Path.Combine(activeDir, "Resources");
            if (newPath != null)
            {
                System.IO.Directory.CreateDirectory(newPath);
                if (pbox != null)
                {
                    pbox.Image.Save(newPath + "//" + "LiferayLogo.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
            }
            resource = new EIBFormDesigner.ScenarioWizard.Resources.Resource();
            resource.ResourceInfo = new Dictionary <string, string>();
            resource.ResourcePath = newPath;
            resource.ResourceInfo.Add("Image", "LiferayLogo.gif");
            if (languageCbo.SelectedIndex > -1)
            {
                resource.ResourceInfo.Add("Language", languageCbo.Text.Trim().ToString());
            }
            resUtil.Serialize(resource);
            this.Close();
        }
Exemple #2
0
 public void Serialize(Resources.Resource res)
 {
     try
     {
         XmlDocument doc               = new XmlDocument();
         XmlNode     resourceNode      = doc.CreateNode(XmlNodeType.Element, "resources", null);
         XmlNode     resourceChildNode = doc.CreateNode(XmlNodeType.Element, "resourceInfo", null);
         foreach (var variable in res.ResourceInfo)
         {
             XmlAttribute attr = resourceChildNode.OwnerDocument.CreateAttribute(variable.Key);
             attr.InnerText = variable.Value;
             resourceChildNode.Attributes.Append(attr);
             resourceNode.AppendChild(resourceChildNode);
         }
         doc.AppendChild(resourceNode);
         doc.Save(res.ResourcePath + "\\resourcess.xml");
     }
     catch
     {
     }
 }
Exemple #3
0
 private void okButton_Click(object sender, EventArgs e)
 {
     string activeDir = EIBXMLServices.EIBXMLUtilities.folderName;
     resUtil = new ResourceUtilities();
     newPath = System.IO.Path.Combine(activeDir, "Resources");
     if (newPath != null)
     {
         System.IO.Directory.CreateDirectory(newPath);
         if (pbox != null)
         {
             pbox.Image.Save(newPath + "//" + "LiferayLogo.gif", System.Drawing.Imaging.ImageFormat.Gif);
         }
     }
     resource = new EIBFormDesigner.ScenarioWizard.Resources.Resource();
     resource.ResourceInfo = new Dictionary<string, string>();
     resource.ResourcePath = newPath;
     resource.ResourceInfo.Add("Image", "LiferayLogo.gif");
     if (languageCbo.SelectedIndex > -1)
     {
         resource.ResourceInfo.Add("Language", languageCbo.Text.Trim().ToString());
     }
     resUtil.Serialize(resource);
     this.Close();
 }