设为首页 收藏本站

NSIS中文论坛

查看: 465|回复: 0

[源码] 仿永恒心锁绿化界面

[复制链接]
  • TA的每日心情
    开心
    昨天 19:31
  • 签到天数: 221 天

    [LV.7]常住居民III

    12

    主题

    37

    帖子

    3482

    积分

    积分
    3482
    发表于 2018-3-13 16:25:54 | 显示全部楼层 |阅读模式
    研究了两个星期,总算编译通过了,不知何故运行反应较慢。
    SetCompressor lzma

    SetCompressorDictSize 8
    ReserveFile "${NSISDIR}\Plugins\waterctrl.dll"
    ReserveFile "default.bmp"
    ReserveFile "${NSISDIR}\Plugins\System.dll"
    !include nsDialogs.nsh
    !include LogicLib.nsh
    Name "仿永恒心锁绿化工具"
    OutFile "仿永恒心锁绿化界面.exe"
    loadlanguagefile "${NSISDIR}\Contrib\Language files\simpChinese.nlf"
    XPStyle on
    Var Dialog
    ;Var Label
    ;Var Text
    ;var hwnd
    var button
    ;Var CHECKBOX
    Page custom nsDialogsPage nsDialogsPageLeave
    Page instfiles
    BrandingText www.yhxs3344.net
    ChangeUI all "defaultYHXS.exe"
    Section yhxs3344
    SectionEnd
    Function nsDialogsPage
      nsDialogs::Create 1018
        ${NSD_CreateButton} 10% 25% 30% 60% "绿化"
    Pop $Button
        ${NSD_OnClick} $button OpenInst
        ${NSD_CreateButton} 60% 25% 30% 60% "净化"
    Pop $Button
        ${NSD_OnClick} $button OpenUninst
      nsDialogs::OnClick $1 $0 #无此句,不会显示default.bmp位图,自然就无水波纹
    System::Call 'user32:oadImage(i,t,i,i,i,i,) i (0,$\"$PLUGINSDIR\default.bmp$\",0,0,0,0x2010) .s'
      Pop $R0
      GetDlgItem $R1 $HWNDPARENT 1046
      System::Call '$PLUGINSDIR\WaterCtrl::enablewater(i,i,i,i,i,i) i ($R1,0,0,$R0,3,50)'
      System::Call '$PLUGINSDIR\WaterCtrl::setwaterparent(i $R1)'
      System::Call '$PLUGINSDIR\WaterCtrl::flattenwater()'
      System::Call '$PLUGINSDIR\WaterCtrl::waterblob(i,i,i,i) i (125,50,10,500)'
      System::Call 'user32::SetWindowPos(i $HWNDPARENT, i -1,i0, i0, i0, i0, i 3)'
      nsDialogs::Show
    FunctionEnd
    Function nsDialogsPageLeave
    System::Call '$PLUGINSDIR\waterctrl::disablewater()'
    FunctionEnd
    Function .onInit
      InitPluginsDir
      SetOutPath $PLUGINSDIR
      SetOverwrite on
      AllowSkipFiles on
      File Waterctrl.dll
      File default.bmp
    FunctionEnd
    Function .onGUIInit
      BrandingURL::Set /NOUNLOAD 0 0 255 http://www.yhxs3344.net/
    FunctionEnd
    Function .onGUIEnd
    SetPluginUnload manual
    waterctrl::disablewater
    System::Free
    BrandingURL::Unload
    FunctionEnd

    Function OpenInst
      Pop $button
      ExecShell open "http://www.yhxs3344.net/jscript/nsis"
    FunctionEnd
    Function OpenUninst
      Pop $button
      ExecShell open "http://www.nsisfans.com"
    FunctionEnd

    快照3.png
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|联系我们|NSIS中文论坛    

    GMT+8, 2018-12-19 05:50 , Processed in 0.022456 second(s), 16 queries , MemCache On.

    Powered by Discuz!X3.3

    Copyright © 2015-2018 NSIS中文论坛

    快速回复 返回顶部 返回列表