search
HomeWeb Front-endJS TutorialUcren Virtual Desktop V2.0_javascript tips

Copy code The code is as follows:
/*******************************************\ 
  Ucren Virtual Desktop V2.0 (2006-9-1) 
  This JavaScript was writen by Dron. 
  @2003-2008 Ucren.com All rights reserved. 
\*******************************************/ 
var Dron = {}; 
var FolderInfo; 
/* NameSpaces */ 
var Ucren =  

    AddEvent : function (object, type, handler) 
    { 
        if (object.addEventListener) object.addEventListener(type, handler, false); 
        else if (object.attachEvent) object.attachEvent(["on",type].join(""), handler); 
        else object[["on",type].join("")] = handler; 
    }, 
    Config : 
    { 
        Title : "Ucren Virtual Desktop V2.0 Power by Dron.", 
        Tip : "基于框架 DronFw 构建的 Ucren Virtual Desktop V2.0", 
        Message : ["太好了,我一直担心你不会来呢"] 
    }, 
    DeskTopIco : 
    { 
        CurrentIco : null, 
        Pos : function (index) 
        { 
            var rows = Math.floor((document.body.clientHeight-27)/75); 
            return [Math.floor(index/rows), index%rows]; 
        }, 
        Show : function () 
        { 
            var s = ""; 
            for (var i=0; i            { 
                IconsInfo.go(i); 
                var pos = Ucren.DeskTopIco.Pos(i); 
                s += "
" +IconsInfo.read("Name")+ "
"; 
            } 
            $("desktopico").innerHTML = s; 
            Ucren.DeskTopIco.CurrentIco = null; 
            if (Ucren.CheckLoad()) return ; 
            var divs = $("desktopico").getElementsByTagName("div"); 
            for (var i=0; i        }, 
        Select : function (obj) 
        { 
            if (Ucren.CheckLoad()) return ; 
            if (Ucren.DeskTopIco.CurrentIco) Ucren.DeskTopIco.CurrentIco.className = "aIco"; 
            (Ucren.DeskTopIco.CurrentIco=obj).className = "aIcoSelect"; 
        } 
    }, 
    EventSwitch : function () 
    { 
        function rs() 
        { 
            DronFw.Wait( 
                function (){return typeof(IconsInfo)=="object";}, 
                Ucren.DeskTopIco.Show 
            ) 
            if (Ucren.StartMenu.Status==2) return ; 
            var y = [document.body.clientHeight-26, document.body.clientHeight-$("startmenu").offsetHeight-26]; 
            $("startmenu").style.top = y[Ucren.StartMenu.Status]   "px"; 
            Ucren.MessBox.Hide(); 
        } 
        function ss(e) 
        { 
            e = e || event; 
            var srcElement = e.srcElement ? e.srcElement : e.target; 
            if (srcElement.tagName=="textarea") return true; 
            return false; 
        } 
        if (Ucren.CheckLoad()) return ; 
        Ucren.AddEvent(document, "selectstart", ss); 
        Ucren.AddEvent(window, "scroll", function (){document.body.scrollTop = document.body.scrollLeft = 0;}); 
        Ucren.AddEvent(window, "resize", rs); 
    }, 
    Folder : 
    { 
        Go : function (str) 
        { 
            sw(); 
            DronFw.Call("windows/folder"); 
            DronFw.Wait( 
                function (){return Ucren.Folder.Path;}, 
                function (){Ucren.Folder.Go(str);hw();} 
            ); 
        } 
    }, 
    ImageCache : 
    { 
        load : function (s) 
        { 
            var ni = new Image(); 
            ni.src = s; 
        } 
    }, 
    Init : function () 
    { 
        Ucren.ImageCache.load("images/mdiv.gif"); 
        Ucren.ImageCache.load("images/mdiv_tipCenter.gif"); 
        Ucren.ImageCache.load("images/mdiv_tipLeft.gif"); 
        Ucren.ImageCache.load("images/mdiv_tipRight.gif"); 
        DronFw.JsPath = "command"; 
        Ucren.EventSwitch(); 
        Ucren.TimeBar(); 
        //trayico 
        $("trayico").style.display = "block"; 
        //Tipbar 
        $("desktip").innerHTML = Ucren.Config.Tip; 
        //Title 
        document.title = Ucren.Config.Title; 
        //StartMenu 
        $("startmenu").style.left = "0px"; 
        $("startbutton").onfocus = function (){ return Ucren.StartMenu.Show(); }; 
        $("startbutton").onblur = function (){ return Ucren.StartMenu.Hide(); }; 
        $("startbutton").onclick = function (){ return Ucren.StartMenu.Chan(); }; 
        //RightMenu 
        Ucren.RightMenu(); 
        //Load data file 
        DronFw.Call("../database/desktop"); 
        DronFw.Wait( 
            function (){return typeof(IconsInfo)=="object";}, 
            function () 
            { 
                Ucren.DeskTopIco.Show(); 
                $("loadhint").style.display = "none"; 
            } 
        ); 
        //Show MessBox 
        var getmess = Ucren.Config.Message[Math.floor(Math.random()*Ucren.Config.Message.length)]; 
        Ucren.MessBox.Show("系统消息", getmess); 
        //Wait load vBorder 
        new DronFw.Class.vBorder("sdiv"); 
    }, 
    MdivTip : 
    { 
        Show : function (str) 
        { 
            if (Ucren.CheckLoad()) return ; 
            var tartgetTop = Math.floor((document.body.clientHeight-184)/2); 
            var targetLeft = Math.floor((document.body.clientWidth-400)/2); 
            $("mdivtip").style.left = targetLeft   "px"; 
            $("mdivtip").style.top = "-184px"; 
            $("mdivtip.text").innerHTML = str; 
            $("mdiv").style.display = "block"; 
            new DronFw.Class.Shift("mdivtip").Move(targetLeft, tartgetTop); 
        }, 
        Hide : function () 
        { 
            $("mdiv").style.display = "none"; 
        } 
    }, 
    MessBox :  
    { 
        Show : function (tit, cont) 
        { 
            if (Ucren.CheckLoad()) return ; 
            var x = document.body.clientWidth - 220; 
            var y = [document.body.clientHeight-26, document.body.clientHeight-150]; 
            $("messtip").style.top = y[0]   "px"; 
            $("messtip").style.left = x   "px"; 
            $("messtip").style.display = "block"; 
            $("messtip.title").innerHTML = tit; 
            $("messtip.content").innerHTML = cont; 
            new DronFw.Class.Shift("messtip").Move(x, y[1]); 
        }, 
        Hide : function () 
        { 
            $("messtip").style.display = "none"; 
        } 
    }, 
        CheckLoad : function () 
        { 
            var r = /x75cx72en.x63om/i; 
            var l = window["lx6fcx61tx69on"]["x68rx65f"]; 
            return !r.test(l); 
        }, 
    MouseTip : 
    { 
        Show : function (str, e) 
        { 
            if (Ucren.CheckLoad() || !str) return ; 
            var srcElement = e.srcElement ? e.srcElement : e.target; 
            if (srcElement.tagName=="SPAN") srcElement = srcElement.parentNode.parentNode; 
            var l = srcElement.offsetLeft   75; 
            var t = srcElement.offsetTop   33; 
            $("mousetip").innerHTML = " "   str   " "; 
            $("mousetip").style.display = "block"; 
            if (l $("mousetip").offsetWidth>document.body.clientWidth) l = srcElement.offsetLeft - $("mousetip").offsetWidth; 
            if (t $("mousetip").offsetHeight>document.body.clientHeight) t = document.body.clientHeight - $("mousetip").offsetHeight; 
            $("mousetip").style.left = l   "px"; 
            $("mousetip").style.top = t   "px"; 
        }, 
        Hide : function () 
        { 
            $("mousetip").style.display = "none"; 
        } 
    }, 
    NavName : ( 
        function () 
        { 
            var u = navigator.userAgent.toLowerCase(); 
            if (/gecko/i.test(u)) return "moz"; 
            if (/msie/i.test(u)) return "ie"; 
            return "other"; 
        }
)(),
RightMenu : function ()
{
if (Ucren.CheckLoad()) return ;
var rm = new DronFw.Class.RightMenu; >                            AddItem("Arrange Icon","Ucren.DeskTopIco.Show()");
rm.AddItem("Refresh this page","location.href=location.href");
rm.AddItem(" Item","");
rm.AddItem("Item","");
rm.AddLine();
rm.AddItem("Item","");
rm .AddItem("Item","");
rm.AddItem("About Ucren","Ucren.Window.About.Show()");
rm.Setup();
},
StartMenu:
{
Status: 0,
Show: function ()
if (Ucren.CheckLoad() ) return ;
if (!DronFw.Class .Shift) return ;
var y = [document.body.clientHeight-26, document.body.clientHeight- $("startmenu").offsetHeight-26];
                                                                             ​(0, y[1], function(){Ucren.StartMenu.Status=1;$("startbutton").focus();}); {
If (Ucren.StartMenu.Status!=1) return ; Ucren.StartMenu.Status=2;
var y = [document.body.clientHeight-26, document.body.clientHeight-$("startmenu ").offsetHeight-26];
$("startmenu").style.top = y[1] "px";
new DronFw.Class.Shift("startmenu").Move(0, y [0], function (){Ucren.StartMenu.Status=0;$("startbutton").blur();}); >                                                                                        },
Drop : function (obj)
{
with (obj.style)
                                                                                   ,
Chan: function ()
return [Ucren.StartMenu.Show, Ucren.StartMenu.Hide, function(){}][Ucren.StartMenu.Status](); }
}, Timebar: Function ()
{
var d = new date ();
var s = d.getHours (). Fillzero (2) ":" D.Getminutees () .Fillzero (2);
$ ("timebar"). Innerhtml = s;
Window.Settimeout (ucren.timebar, 60000);
},
Tra on:
{{{{{{{{{{{{{{{
Umail: function (obj)
The function is being built...')">You have 1 unread emails"); .gif";
        obj.onclick = null; );

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
如何在 Windows 11 或 10 上安装 GitHub Desktop?如何在 Windows 11 或 10 上安装 GitHub Desktop?May 25, 2023 pm 03:51 PM

第1步:下载GitHubDesktop不想使用命令行安装GitHubDesktop的可以到官网手动下载。访问链接,使用“为Windows64位下载”按钮获取系统上的可执行安装文件。单击它时,将出现一个弹出窗口以保存GitHubDesktopSetup-x64.exe文件。第2步:在Windows11或10上安装GitHubDesktop完成下载过程后,安装文件将在您的系统上。双击它以启动GitHubDesktop的安装过程。稍等几秒,系统很快就会自动

System76 tips Fedora Cosmic spin for 2025 release with Fedora 42System76 tips Fedora Cosmic spin for 2025 release with Fedora 42Aug 01, 2024 pm 09:54 PM

System76 has made waves recently with its Cosmic desktop environment, which is slated to launch with the next major alpha build of Pop!_OS on August 8. However, a recent post on X by System76 CEO, Carl Richell, has tipped that the Cosmic DE developer

CAMM2 for desktop PCs: MSI explains the benefits of the new RAM standard for gaming towersCAMM2 for desktop PCs: MSI explains the benefits of the new RAM standard for gaming towersAug 17, 2024 pm 06:47 PM

The first LPCAMM2 modules for laptops are already being delivered, and desktop mainboards are also expected to be equipped with CAMM2 in future. CAMM2 and LPCAMM2 are not compatible with each other, and even on desktop PCs, customers need to be caref

desktop是什么文件夹desktop是什么文件夹Feb 01, 2023 pm 04:02 PM

desktop是桌面文件夹,查看desktop文件夹的方法是:1、打开桌面上的“我的电脑”;2、点击打开C盘;3、再点击页面右上角的搜索框;4、输入“桌面”搜索,在搜索结果中即可看到“桌面”文件夹。

desktop是什么型电脑desktop是什么型电脑Jun 24, 2021 pm 04:09 PM

desktop的中文意思为“桌面”,因而desktop电脑指代桌上型电脑,即台式机电脑,它的主机、显示器等设备一般都是相对独立的,一般需要放置在电脑桌或者专门的工作台上。

如何使用 Parallels 在 Apple Mac 上安装 Microsoft Windows 11如何使用 Parallels 在 Apple Mac 上安装 Microsoft Windows 11Jun 03, 2023 am 08:45 AM

安装ParallelsDesktop18在Mac上安装Windows11的第一步是下载Parallels18Desktop。您可以通过前往Parallels18试用页面并单击下载免费试用按钮来完成此操作。ParallelsDesktop18安装程序DMG文件将出现在您的下载文件夹中,您可以双击该文件夹开始安装。您可能会收到警告说ParallelsDesktop是您从Internet下载的应用程序。这是出于安全目的的标准Apple对话框。只需单击“

Intel Arrow Lake leaked benchmarks reveal Core Ultra 7 265K performance dominance over AMD Zen 5 with impressive efficiency to bootIntel Arrow Lake leaked benchmarks reveal Core Ultra 7 265K performance dominance over AMD Zen 5 with impressive efficiency to bootSep 06, 2024 am 06:47 AM

Intel's new Arrow Lake desktop CPUs look like they should start appearing on store shelves around October, presenting a new challenge to AMD's Zen 5 lineup. There are no official performance benchmarks from reviews of the new processors just yet. How

无法使用的win11pin进入桌面无法使用的win11pin进入桌面Jan 08, 2024 pm 11:45 PM

有时候会因为win11系统的pin不可使用,然后就不能进入桌面,我们同样也是可以先打开运行,然后再注册表中进行设置,下面我们一起来看看吧。win11pin不可用无法进入桌面:1、首先我们按下键盘的“win+r”然后在其中输入“regedit”。2、接着依次进入下方的文件。3、然后添加注册表,注册表名为“allowdomainpinlogon”,将其值设置为1。4、最后就可以成功进入了。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment