Пример #1
0
        internal virtual void LoadBackground()
        {
            Bitmap tmp = NativeThemeManager.LoadBitmap("TaskSwitch.png");

            LoadOptimizedBackgroundImage(tmp);
            tmp.Dispose();
        }
Пример #2
0
 public void ReloadButtonDelete(string fileName)
 {
     buttonRemoveStone.NormalFace = FastBitmap.FromFile(fileName);
     if (buttonRemoveStone.NormalFace == null)
     {
         buttonRemoveStone.NormalFace = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneDelete.png"), buttonSize, buttonSize, true);
     }
     buttonRemoveStone.SetSize(buttonSize, buttonSize);
 }
Пример #3
0
 public void ReloadButtonSelect(string fileName)
 {
     buttonChangeType.NormalFace = FastBitmap.FromFile(fileName);
     if (buttonChangeType.NormalFace == null)
     {
         buttonChangeType.NormalFace = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneSelect.png"), buttonSize, buttonSize, true);
     }
     buttonChangeType.SetSize(buttonSize, buttonSize);
 }
Пример #4
0
        public static Image GetSiteLogo(string siteName)
        {
            Image fileLogo = null;

            fileLogo = (Bitmap)WebsiteImage.DownloadSiteIcon(siteName);
            if (fileLogo == null)
            {
                fileLogo = NativeThemeManager.LoadBitmap("url.png");
            }
            return(fileLogo);
        }
Пример #5
0
 public void ReloadButtonResources()
 {
     buttonAbout.NormalFace          = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneAbout.png"), buttonSize, buttonSize, true);
     buttonChangeType.NormalFace     = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneSelect.png"), buttonSize, buttonSize, true);
     buttonConfigureStone.NormalFace = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneEdit.png"), buttonSize, buttonSize, true);
     buttonRemoveStone.NormalFace    = BitmapPainter.ResizeBitmap(NativeThemeManager.LoadBitmap("ButtonStoneDelete.png"), buttonSize, buttonSize, true);
     buttonAbout.SetSize(buttonSize, buttonSize);
     buttonChangeType.SetSize(buttonSize, buttonSize);
     buttonConfigureStone.SetSize(buttonSize, buttonSize);
     buttonRemoveStone.SetSize(buttonSize, buttonSize);
 }
Пример #6
0
 public Pulsar()
     : base()
 {
     Name            = "Pulsar";
     pulsarPen       = new Pen(Brushes.Pink, 2.0f);
     frequency       = 100;
     TopMostWindow   = true;
     surfaceImage    = NativeThemeManager.LoadBitmap("Pulsar.png");
     surfaceImage    = BitmapPainter.ResizeBitmap(surfaceImage, Dimension, Dimension, true);
     surfaceCache    = new CachedBitmap(surfaceImage, this.Canvas);
     Text            = "Krento Pulsar";
     VerticalShift   = -1;
     HorizontalShift = 1;
 }
Пример #7
0
 public FolderView(IntPtr parentWindow)
 {
     this.parentWindow    = parentWindow;
     items                = new List <FolderItem>();
     TopMostWindow        = true;
     format.Alignment     = StringAlignment.Center;
     format.LineAlignment = StringAlignment.Near;
     format.Trimming      = StringTrimming.EllipsisCharacter;
     format.FormatFlags   = StringFormatFlags.LineLimit;
     overlay              = NativeThemeManager.LoadBitmap("overlay.png");
     shine                = NativeThemeManager.LoadBitmap("shine.png");
     logo       = NativeThemeManager.LoadBitmap("Krento48.png");
     signClose  = NativeThemeManager.LoadBitmap("SignClose.png");
     this.Alpha = 240;
 }
Пример #8
0
        /// <summary>
        /// Get the image for specified file name. If the file has no embedded icon,
        /// this method will return default image for the file extension
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <returns>Image or null. The size of the image = size of the icon</returns>
        public static Image FileNameImage(string fileName)
        {
            Image result;

            try
            {
                result = FileNameImageInternal(fileName);
            }
            catch (Exception ex)
            {
                TraceDebug.Trace(ex);
                result = NativeThemeManager.LoadBitmap("UnknownFile.png");
            }

            return(result);
        }
Пример #9
0
        public static Image GetFileLogo(string fileName)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                return(NativeThemeManager.LoadBitmap("UnknownFile.png"));
            }

            Image fileLogo = null;

            if (IsURL(fileName))
            {
                fileLogo = (Bitmap)WebsiteImage.DownloadSiteIcon(fileName);
                if (fileLogo == null)
                {
                    fileLogo = NativeThemeManager.LoadBitmap("url.png");
                }
            }
            else
            {
                fileLogo = (Bitmap)FileImage.FileNameImage(fileName);

                if (fileLogo == null)
                {
                    if (FileOperations.DirectoryExists(fileName))
                    {
                        fileLogo = NativeThemeManager.LoadBitmap("Folder.png");
                    }
                    else
                    {
                        fileLogo = GetExtensionLogo(fileName);
                        if (fileLogo == null)
                        {
                            fileLogo = NativeThemeManager.LoadBitmap("UnknownFile.png");
                        }
                    }
                }
            }

            return(fileLogo);
        }