Beispiel #1
0
        private void UpdateTarget()
        {
            KrentoRing ring = new KrentoRing(fileName);

            edtTarget.Text = ring.Caption;
            if (!string.IsNullOrEmpty(ring.Description))
            {
                edtDescription.Text = ring.Description;
            }
            else
            {
                edtDescription.Text = ring.Caption;
            }
            if (!string.IsNullOrEmpty(ring.LogoFile))
            {
                if (FileOperations.FileExists(ring.LogoFile))
                {
                    if (imgLogo.Image != null)
                    {
                        imgLogo.Image.Dispose();
                    }
                    imgLogo.Image = FastBitmap.FromFile(FileOperations.StripFileName(ring.LogoFile));
                    customIcon    = ring.LogoFile;
                }
                else
                {
                    AssignDefaultImage();
                }
            }
            else
            {
                AssignDefaultImage();
            }
            ring.Dispose();
        }
Beispiel #2
0
        private static Bitmap GetLogoFromRing(string ringName)
        {
            if (!FileOperations.FileExists(ringName))
            {
                return(null);
            }

            KrentoRing ring   = new KrentoRing(ringName);
            Bitmap     result = BitmapPainter.ConvertToRealColors(ring.Logo, false);

            ring.Dispose();
            return(result);
        }
Beispiel #3
0
 public void Save()
 {
     ring = new KrentoRing(FileName);
     try
     {
         ring.Description = edtDescription.Text;
         ring.LogoFile    = logoFile;
         ring.Save();
     }
     finally
     {
         ring.Dispose();
         ring = null;
     }
 }