1 Star 1 Fork 7

连享会/nwcommands

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nwexport.dlg 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
ThomasGrund 提交于 2015-09-18 19:13 . v1.5.1
VERSION 10
SYNCHRONOUS_ONLY
INCLUDE _std_mlarge
INCLUDE header
HELP hlp1, view("help nwexport")
RESET res1
SCRIPT PREINIT
BEGIN
program initialize
main.cb_netname.repopulate
END
LIST netlist
BEGIN
// intentionally empty
// this list will be populated by _nwdialog.ado
END
DIALOG main, title("Export network")
BEGIN
TEXT tx_netname 50 20 100 ., label("Network:")
COMBOBOX cb_netname +110 @ 200 ., dropdownlist contents(netlist)
TEXT tx_type 50 50 100 ., label("Export file format:")
COMBOBOX cb_type 160 50 200 ., dropdownlist contents(filetypes) onselchangelist(filetypes_action)
TEXT tx_file 50 80 250 ., label("Export file name:")
FILE fl_pajek 50 100 350 ., label("File") filter("Pajek|*.net|All files|*.*") save
FILE fl_ucinet 50 100 350 ., label("File") filter("Ucinet|*.dat|All files|*.*") save
CHECKBOX ck_replace 50 160 200 100, label("Replace data")
END
LIST filetypes
BEGIN
"Pajek NET format"
"Ucinet DL format"
END
LIST filetypes_action
BEGIN
script format_pajek
script format_ucinet
END
PROGRAM initialize
BEGIN
put "_nwdialog nwexport"
stata hidden immediate
main.cb_netname.repopulate
END
SCRIPT format_off
BEGIN
main.fl_pajek.hide
main.fl_ucinet.hide
END
SCRIPT format_pajek
BEGIN
script format_off
main.fl_pajek.show
END
SCRIPT format_ucinet
BEGIN
script format_off
main.fl_ucinet.show
END
PROGRAM command
BEGIN
require main.cb_netname
put "nwexport " main.cb_netname
if main.cb_type.iseq("Pajek NET format") {
require main.fl_pajek
put ", type(pajek) fname(" main.fl_pajek ")"
}
if main.cb_type.iseq("Ucinet DL format") {
require main.fl_ucinet
put ", type(ucinet)"
}
if main.ck_replace {
put " replace fname(" main.fl_ucinet ")"
}
stata
END
*! v1.5.0 __ 17 Sep 2015 __ 13:09:53
*! v1.5.1 __ 17 Sep 2015 __ 14:54:23
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/arlionn/nwcommands.git
git@gitee.com:arlionn/nwcommands.git
arlionn
nwcommands
nwcommands
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385