Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            debugger = new LuaRemoteDebugger();
            debugger.MessageLogged              += LogMessage;
            debugger.ExecutionLocationChanged   += OnExecutionLocationChanged;
            debugger.LuaVariablesChanged        += OnLuaVariablesChanged;
            debugger.VersionInformationReceived += OnVersionInformationReceived;
            debugger.BinaryFileDetected         += OnBinaryFileDetected;
            debugger.GameFolderReceived         += OnGameFolderReceived;
            debugger.FileMD5Received            += OnFileMD5Received;
            debugger.FileContentsReceived       += OnFileContentsReceived;
            debugger.Connected    += OnConnected;
            debugger.Disconnected += OnDisconnected;
            debugger.ScriptError  += OnScriptError;

            LoadSettings();

            Timer timer = new Timer();

            timer.Tick    += timer_Tick;
            timer.Interval = 50;
            timer.Start();

            treeViewAdvLocals.Model = luaVariablesModel;
            treeViewAdvWatch.Model  = luaWatchModel;

            watchKey.LabelChanged             += watchKey_LabelChanged;
            watchKey.IsEditEnabledValueNeeded += watchKey_IsEditEnabledValueNeeded;

            SetDebugState(DebugState.NotConnected);
        }