查看: 255|回复: 0
打印 上一主题 下一主题

3d开奖结果走势图连线: [源码] 仿寒星随意录Win10Opt_v11安装界面

[复制链接]
  • TA的每日心情
    开心
    昨天 23:26
  • 江西快3走势图开奖结果 www.d0ht9.cn 签到天数: 81 天

    [LV.6]常住居民II

    11

    主题

    33

    帖子

    1372

    积分

    积分
    1372
    跳转到指定楼层
    楼主
    发表于 2018-4-20 23:14:46 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
    本帖最后由 xt2zsun 于 2018-4-20 23:17 编辑

    想是想模仿寒星随意录的Win10Opt_v11安装界面,但是觉得未啃动。虽然本脚本可以运行安装,但不知道是否有什么弊端或隐患。所以请各位多多指教。另外寒星随意录似乎有个bug,见界面图。不知是脚本问题还是nsdialogs插件本身的缘故。
    #压缩设置
      SetCompressor /SOLID lzma
      SetCompressorDictSize 32
      SetDatablockOptimize on
      SetCompress auto
    Var Link
    Var Dialog
    Var Checkbox01
    Var Checkbox02
    Var Checkbox03
    Var Checkbox04
    Var Checkbox05
    Var Checkbox06
    Var Checkbox01_State
    Var Checkbox02_State
    Var Checkbox03_State
    Var Checkbox04_State
    Var Checkbox05_State
    Var Checkbox06_State
    Var Button1
    Var Button2
    Var Button3
    Var RadioButton01
    Var RadioButton02
    Var RadioButton03
    Var RadioButton01_State
    Var RadioButton02_State
    Var RadioButton03_State

    #预先载入文件,方便安装加速释放
      ReserveFile "Res\top.bmp"
    ;  ReserveFile "${NSISDIR}\Plugins\System.dll"
    #头文件
      !include "MUI2.nsh"
      !include "UsefulLib.nsh"
      !include "Winver.nsh"

    #界面相关
      !define MUI_ICON "Res\io.ico"
      !define MUI_HEADERIMAGE
      !define MUI_HEADERIMAGE_BITMAP "Res\top.bmp"
      !define MUI_CUSTOMFUNCTION_GUIINIT .MyGUIInit
      !define MUI_FINISHPAGE_NOAUTOCLOSE
      page custom show leave
      Page custom install
      
    #相关宏
    !insertmacro MUI_LANGUAGE "SimpChinese"
    MiscButtonText "" "执行" "" "完成"
    BrandingText 仿寒星随意录界面II
    !define WM_SETBLOB 0x0470
    #使用自定义UI
      ChangeUI all "LoadUI0.exe"
    #程序设置
      Caption "绿化工具"
      OutFile "绿化工具.exe"
      XPStyle on
    #程序执行前操作
      Function .oninit
    InitPluginsDir
    SetOutPath $PLUGINSDIR
    File "Res\top.bmp"
    FunctionEnd
    #定义要创建的控件(ID不能重复,否则会产生未知错误!)
      ;定义关于按钮
      !ifndef IDC_BUTTON
      !define IDC_BUTTON    1190
      !endif
      ;创建公共函数
      !macro MYMACRO un
      Function ${un}.AboutButton
        MessageBox MB_OK|MB_ICONINFORMATION "语音库源于微软服务器移植版可与$\n Windows10桌面语音库媲美"
      FunctionEnd
      Function ${un}.MyGUIInit
      InitPluginsDir
      GetDlgItem $0 $HWNDPARENT 2 #
      ShowWindow $0 ${SW_HIDE}    #
        ;创建按钮
        ;用法:${CreateButton2} 显示文本 X轴位置 Y轴位置 宽度 高度 父窗口窗口句柄 控件ID 目标函数
         ${CreateButton2} "关于(&A)" 14 213 74 21 $HWNDPARENT ${IDC_BUTTON} ${un}.AboutButton #
      FunctionEnd
    !macroend
      ;插入安装函数
      !insertmacro MYMACRO ""
    #函数定义
      Function show
      nsDialogs::Create 1018
      File "/oname=$PLUGINSDIR\top.bmp" "Res\top.bmp"
      SetBrandingImage /IMGID=1046 $PLUGINSDIR\top.bmp
      GetDlgItem $0 $HWNDPARENT 1046
    System::Call 'User32::GetWindowLong(i r0, i ${GWL_STYLE})i.r1'
    System::Call 'User32::SetWindowLong(i r0, i ${GWL_STYLE}, i $1|${SS_NOTIFY})'
    SendMessage $0 ${STM_GETIMAGE} 0 0 $1
    nsWater::Set $0 $1
    SendMessage $0 ${WM_SETBLOB} 10 200
    SendMessage $0 ${WM_MOUSEMOVE} 0 0x00200050
    SendMessage $0 ${WM_SETBLOB} 3 50
    Pop $Dialog
    ${If} $Dialog == error
    Abort
    ${EndIf}
    ${NSD_CreateGroupBox} 0% 0% 100% 105% "微软中英文语音库便携工具"
    ${NSD_CreateCheckBox} 5u 10u 95u 16u " 美式英语ZiraPro女声"
    Pop $CheckBox01
    ${NSD_CreateCheckBox} 5u 25u 95u 16u " 美式英语Helen女声"
    Pop $CheckBox02
    ${NSD_CreateCheckBox} 5u 40u 95u 16u " 英式英语Hazel女声"
    Pop $CheckBox03
    ${NSD_CreateCheckBox} 5u 55u 95u 16u " 澳大利亚Hayley女声"
    Pop $CheckBox04
    ${NSD_CreateCheckBox} 5u 70u 95u 16u " 加拿大Heather女声"
    Pop $CheckBox05
    ${NSD_CreateCheckBox} 5u 85u 95u 16u " 普通话 HuiHui 女声"
    Pop $CheckBox06
    ${NSD_CreateButton} 100u 45u 70u 16u "*XP系统必装*"
    Pop $Button1
        ${NSD_OnClick} $Button1 MustInst
    ${NSD_CreateButton} 100u 20u 70u 16u "*W7系统必装*"
    Pop $Button2
      ${NSD_OnClick} $Button2 7MustInst
      
    ${NSD_CreateButton} 100u 70u 70u 16u "*语音库卸载*"
    Pop $Button3
      ${NSD_OnClick} $Button3 Uninst
    ${NSD_CreateVline} 180u 2u 1u 100u ""
    ${NSD_CreateRadioButton} 190u 16u 70u 10u " 语音库全选"
    Pop $RadioButton01
    ${NSD_OnClick} $RadioButton01 onRadioButton01
    SetCtlColors $RadioButton01 "" C5DEF0
    ${NSD_CreateRadioButton} 190u 36u 70u 10u " 语音库推荐"
    Pop $RadioButton02
    ${NSD_OnClick} $RadioButton02 onRadioButton02
    SetCtlColors $RadioButton02 "" C5DEF0
    ${NSD_CreateRadioButton} 190u 56u 70u 10u " 语音库全否"
    Pop $RadioButton03
    ${NSD_OnClick} $RadioButton03 onRadioButton03
    SetCtlColors $RadioButton03 "" C5DEF0
    ${NSD_CreateLink} 190u 76u 100% 10u "  NSIS中文论坛"
    Pop $Link
    ${NSD_OnClick} $Link onClickMyLink
        nsDialogs::Show
      Functionend
    Function onCheckbox01
    ${NSD_OnClick} $Checkbox01 onCheckbox01
    SetCtlColors $Checkbox01 "" C5DEF0
    SendMessage $Checkbox01 ${BM_GETCHECK} 0 0 $0
    SendMessage $RadioButton03 ${BM_GETCHECK} 0 0
    FunctionEnd
    Function onCheckbox02
    ${NSD_OnClick} $Checkbox02 onCheckbox02
    SetCtlColors $Checkbox02 "" C5DEF0
    SendMessage $Checkbox02 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox03
    ${NSD_OnClick} $Checkbox03 onCheckbox03
    SetCtlColors $Checkbox03 "" C5DEF0
    SendMessage $Checkbox03 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox04
    ${NSD_OnClick} $Checkbox04 onCheckbox04
    SetCtlColors $Checkbox04 "" C5DEF0
    SendMessage $Checkbox04 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox05
    ${NSD_OnClick} $Checkbox05 onCheckbox05
    SetCtlColors $Checkbox05 "" C5DEF0
    SendMessage $Checkbox05 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox06
    ${NSD_OnClick} $Checkbox06 onCheckbox06
    SetCtlColors $Checkbox06 "" C5DEF0
    SendMessage $Checkbox06 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onRadioButton01
    SendMessage $RadioButton01 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton01 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 1 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox04 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox05 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox06 ${BM_SETCHECK} 1 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton01!"
      ${endif}
      ${NSD_GetState} $RadioButton01 $RadioButton01_State
    FunctionEnd
    Function onRadioButton02
    SendMessage $RadioButton02 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton02 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 1 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox04 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox05 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox06 ${BM_SETCHECK} 1 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton02!"
      ${endif}
      ${NSD_GetState} $RadioButton02 $RadioButton02_State
    FunctionEnd
    Function onRadioButton03
    SendMessage $RadioButton03 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton03 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox04 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox05 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox06 ${BM_SETCHECK} 0 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton03!"
      ${endif}
      ${NSD_GetState} $RadioButton03 $RadioButton03_State
    FunctionEnd
    Function onClickMyLink
    Pop $Link
    ExecShell open 江西快3走势图开奖结果
    FunctionEnd

    Function leave
      Call Install
    Functionend
    Function install
      SetOverwrite try
      SetOutPath "$EXEDIR"
      ${NSD_GETSTATE} $CHECKBOX01 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox01 $Checkbox01_State
      ${NSD_GETSTATE} $CHECKBOX02 $0
      ${if} $0 == 1
       ;省略:写注册表
      ${endif}
    ${NSD_GetState} $Checkbox02 $Checkbox02_State
    ${NSD_GETSTATE} $CHECKBOX03 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox03 $Checkbox03_State
      ${NSD_GETSTATE} $CHECKBOX04 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox04 $Checkbox04_State
      
      ${NSD_GETSTATE} $CHECKBOX05 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox05 $Checkbox05_State
      
        ${NSD_GETSTATE} $CHECKBOX06 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox06 $Checkbox06_State
      Sleep 200
      Return
    FunctionEnd
    Function MustInst
    ${Unless} ${IsWinXP}
    MessageBox MB_OK "非XP系统,请点击Win7系统必装"
    Abort
    ${EndIf}
      ;省略:写注册表
      ;省略:安装软件
    Return
    FunctionEnd
    Function 7MustInst
    ${Unless} ${IsWin7}
    MessageBox MB_OK "非Win7系统,请点击XP系统必装"
    Abort
    ${EndIf}
      ;省略:写注册表
      ;省略:安装软件
         Return
    FunctionEnd
    Function Uninst
    ; 省略:卸载注册表
          MessageBox MB_YESNO|MB_ICONINFORMATION|MB_TOPMOST "语音库卸载完毕!是否继续卸载语音库支持?" \
       /SD IDYES IDYES label_yes IDNO label_no
    label_no:
    Quit
    label_yes:
       ;省略:卸载软件
         Return
    FunctionEnd
    Section
    sectionend

    仿.png (45.57 KB, 下载次数: 1)

    仿.png

    界面.png (38.03 KB, 下载次数: 1)

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

    本版积分规则

    Archiver|手机版|小黑屋|联系我们|江西快3走势图开奖结果    

    GMT+8, 2018-7-6 14:18 , Processed in 0.022491 second(s), 15 queries , MemCache On.

    Powered by Discuz!X3.3

    © 2015-2017 江西快3走势图开奖结果

    快速回复 江西快3走势图开奖结果 返回列表
  • 斯柯达速派2017年上半年累计销量同比上涨36% 2018-12-11
  • 湖北“儿子娃娃”的医疗援疆路 2018-12-11
  • 高清:巴西国奥队积极备战并召开新闻发布会 2018-12-04
  • 你的神论:“管理的目标都大同小异,都是为了社会的和谐稳定和发展进步,因为谁也不会希望通过管理把社会越搞越乱越搞越落后。” 2018-11-23
  • 零下12℃ 北京密云消防员练冰上救援功夫 2018-11-08
  • 美帝拉拢人民,才能反对共产党。 2018-10-30
  • 泰国力争今年吸引1000万中国游客 2018-10-25
  • 弱视不是近视,儿童弱视的危害不可小觑 2018-10-25
  • 在端午品味文化的芳香 锐评 2018-09-19
  • 水果呵护男性健康 葡萄荔枝莲子白果要多吃 2018-09-08
  • 学习教育显成效 党性修养有提高(深度关注) 2018-09-08
  • 宁夏在马来西亚举办旅游推介会 2018-08-22
  • 山西:首批2亿元专项资金保障提升农村安全饮水工程 2018-08-16
  • 走奋发图强之路,壮我中华科技实力。 2018-08-05
  • 社区 —频道 春城壹网 七彩云南 一网天下 2018-08-05
  • 891| 260| 824| 676| 588| 498| 611| 672| 812| 254|