zoukankan      html  css  js  c++  java
  • 左右停靠代码带记录

    try (cui.unregisterDialogBar test) catch()
    try (destroyDialog test) catch()
    rollout test "左右停靠" 168 height:90
    (
        button dockL "DockL" pos:[8,8] 48 height:48
        button unDockB "UnDock" pos:[104,8] 48 height:48 enabled:false
        button dockR "DockR" pos:[56,8] 48 height:48
    
        on dockL pressed do
        (   --停靠右边
            try(
            cui.RegisterDialogBar test
            cui.DockDialogBar test #cui_dock_left 
            SetINISetting "SctSet" "GlobalSet"  "Dock" "#cui_dock_left"
            unDockB.enabled = true
            DockStatus =  true
            ) catch()
        )
        on unDockB pressed do
        (   --弹出界面
            try(
            cui.UnRegisterDialogBar test
            SetINISetting "SctSet" "GlobalSet"  "Dock" "None"
            unDockB.enabled = false
            DockStatus =  false
            ) catch()
        )
        on dockR pressed do
        (   --停靠左边
            try(
            cui.RegisterDialogBar test
            cui.DockDialogBar test #cui_dock_right
            SetINISetting "SctSet" "GlobalSet"  "Dock" "#cui_dock_right"
            unDockB.enabled = true
            DockStatus =  true
            ) catch()
        )
    )
    CreateDialog test
    
    --记忆停靠位置
    if (getfiles (sysInfo.windowsdir + "\" + "SctSet")).count <1 do
    (
        SetINISetting "SctSet" "GlobalSet"  "Dock" "#cui_dock_left"
    )
    
    if (GetINISetting "SctSet" "GlobalSet"  "Dock") == "#cui_dock_left" do
    (
        Cui.RegisterDialogBar test
        Cui.DockDialogBar test #cui_dock_left
    )
    if (GetINISetting "SctSet" "GlobalSet"  "Dock") == "#cui_dock_right" do
    (
        Cui.RegisterDialogBar test
        Cui.DockDialogBar test #cui_dock_right
    )
    if (GetINISetting "SctSet" "GlobalSet"  "Dock") == "None" do
    (
        Cui.RegisterDialogBar test
    )
    View Code
  • 相关阅读:
    C# WinForm多线程(一)Thread类库
    ASP.NET执行循序
    SQLSERVER2014的内存优化表
    C# 5.0 Async函数的提示和技巧
    WPF 绑定
    使用 Cordova+Visual Studio 创建跨平台移动应用(3)
    使用 Cordova+Visual Studio 创建跨平台移动应用(2)
    使用 WPF 创建预加载控件
    A WPF/MVVM Countdown Timer
    使用WPF创建无边框窗体
  • 原文地址:https://www.cnblogs.com/humd/p/12110008.html
Copyright © 2011-2022 走看看