Пример #1
0
        public void RenderFlag(FormMain form)
        {
            _ptr = Defs.PointerByName(Name);
            if (_ptr == null)
            {
                return;
            }
            _form  = form;
            _panel = _form.Controls.Find(Category, true)[0] as MetroPanel;

            var chkd   = Default;
            var sekiro = Utils.Sekiro();

            if (sekiro != null)
            {
                using (var remoteProc = new RemoteProcess(Utils.Sekiro())) {
                    chkd = remoteProc.Read <byte>(_ptr.BasePtr());
                }
            }

            _checkBox = new MetroCheckBox {
                Text       = string.IsNullOrEmpty(Text) ? Name : Text,
                Checked    = chkd > 0,
                Theme      = MetroThemeStyle.Dark,
                Style      = MetroColorStyle.Teal,
                AutoSize   = false,
                Dock       = DockStyle.Top,
                CheckAlign = ContentAlignment.MiddleRight
            };

            _checkBox.CheckedChanged += CheckBoxOnCheckedChanged;

            _panel.InvokeIfRequired(() => _panel.Controls.Add(_checkBox));
        }
 public MemoryThread(string procName, IntPtrE intPtrE, int bytesToRead, string name, EMemoryThreadPriority threadPriority = EMemoryThreadPriority.Normal)
 {
     _processName    = procName;
     _ptr            = intPtrE;
     _threadPriority = threadPriority;
     _bytesToRead    = bytesToRead;
     _value          = new byte[bytesToRead];
     _name           = name;
 }