Exemplo n.º 1
0
 private static int _CreateSleepTimeout(IntPtr L)
 {
     if (LuaDLL.lua_gettop(L) == 0)
     {
         SleepTimeout o = new SleepTimeout();
         LuaScriptMgr.PushObject(L, o);
         return(1);
     }
     LuaDLL.luaL_error(L, "invalid arguments to method: SleepTimeout.New");
     return(0);
 }
        private void InitializeGUI()
        {
            txtHostHwnd.Text   = HostHwnd.ToString();
            txtToolWidth.Text  = ToolWidht.ToString();
            txtToolHeight.Text = ToolHeight.ToString();

            if (AnchorH == AnchorHorizontal.Left)
            {
                radioLeft.Checked = true;
            }
            else
            {
                radioRight.Checked = true;
            }

            if (AnchorV == AnchorVertical.Top)
            {
                radioTop.Checked = true;
            }
            else
            {
                radioBottom.Checked = true;
            }

            radioCommand.Checked        = (this.CommandType == SendCommandType.Command);
            radioClipboard.Checked      = (this.CommandType == SendCommandType.Clipboard);
            radioActivateWindow.Checked = (this.CommandType == SendCommandType.ActivateWindow);
            radioLastN.Checked          = (this.CommandType == SendCommandType.ActivateLastN);

            txtCommands.Text = Commands;

            chkSleep.Checked     = Sleep;
            txtSleepTimeout.Text = SleepTimeout.ToString();

            chkRunOnAllWindowsWithSameTitle.Checked = RunOnAllWindowsWithSameTitle;
            txtTitlePattern.ReadOnly = !RunOnAllWindowsWithSameTitle;

            txtLeft.Text = ToolLeft.ToString();
            txtTop.Text  = ToolTop.ToString();

            lblBorder.BackColor      = BorderColor;
            lblBorderHover.BackColor = BorderHoverColor;

            chkActivateOnHover.Checked = ActivateOnHover;

            //

            ToggleAdvancedSettings(false);
        }
Exemplo n.º 3
0
    static int _CreateSleepTimeout(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            SleepTimeout obj = new SleepTimeout();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: SleepTimeout.New");
        }

        return(0);
    }
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            SleepTimeout o = new SleepTimeout();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        public void FinishRecording(long sequence = 0)
        {
            if (this.catalog.Count == 0)
            {
                return;
            }

            while (true)
            {
                try
                {
                    this.SaveSnapshotItems();
                    break;
                }
                catch (Exception e)
                {
                    this.activeConnection = this.activeConnection.TryDispose();
                    Log.Warn("Unable to persist to database.", e);
                    SleepTimeout.Sleep();
                }
            }
        }