public MdlScreenshot(GameWindow window, TabPage tab) : base(window, tab) { Panel = new UcDebugScreenshot(this); Uc = Panel; Panel.Parent = tab; Panel.Visible = true; }
public L2KeyEmulating(GameWindow window, TextBox textBox) { TextBoxKeys = new Dictionary<String, L2KeyEmulating>(); this.window = window; this.textBox = textBox; textBox.KeyDown += textBox_KeyDown; TextBoxKeys.Add(textBox.Name, this); }
public MdlAutoKeys(GameWindow window, TabPage tab) : base(window, tab) { KeyEmulatings = new Dictionary<int, L2KeyEmulating>(); Panel = new UcAutoKeys(this); Uc = Panel; Panel.Parent = tab; Panel.Visible = true; InitKeyTimers(); }
public static void ShowIt(GameWindow window) { FormScreenMark form = new FormScreenMark(); form.Window = window; form.btnUpdateScreen_Click(form, null); SimpleCallback sc = new SimpleCallback(form.L2Window_ScreenshotUpdate); form.Window.ProgressBindings.ScreenshotUpdate += sc; form.Window.ProgressBindings.RefreshScreenshot(); form.updateWhoList(); form.ShowDialog(); window.ProgressBindings.ScreenshotUpdate -= sc; }
public L2ProgressBinding(GameWindow window, CheckBox activeCheckBox, TextBox key1, TextBox key2 = null, TextBox key3 = null) { this.window = window; this.BindActiveCheckBox (activeCheckBox); this.SetKey (0, key1); if (key2 != null) { this.SetKey (1, key2); } if (key3 != null) { this.SetKey (2, key3); } }
public void L2Window_ScreenshotUpdate(GameWindow window) { if (!picbScreen.InvokeRequired) { return; } picbScreen.Invoke(new MethodInvoker(delegate() { window.ProgressBindings.pushLock(); picbScreen.Image = window.ProgressBindings.Screenshot; window.ProgressBindings.popLock(); })); }
/// <summary> /// Конструктор /// </summary> /// <param name="window"></param> /// <param name="tab"></param> public MdlControlOwner(GameWindow window, TabPage tab) { this.window = window; this.tab = tab; }
public void Init(GameWindow window, TabPage tab) { this.window = window; ProgressBindings = window.ProgressBindings; Visible = false; Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom ) | System.Windows.Forms.AnchorStyles.Left ) | System.Windows.Forms.AnchorStyles.Right ) ); Parent = tab; SetBounds(0, 0, Parent.Width, Parent.Height); InitializeComponent(); if (ProgressBindings == null) { return; } ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].StateLabel = lbSelfCp; ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].StateLabel = lbSelfHp; ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].StateLabel = lbSelfMp; ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].StateLabel = lbTargetHp; // SELF // Хил, когда свои ЦП < 80 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add( new L2ProgressBinding(window, cbSelfCp1, tbCp1Key1, tbCp1Key2) ); // Хил, когда свои ЦП < 30 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add( new L2ProgressBinding(window, cbSelfCp2, tbCp2Key1, tbCp2Key2) ); // Хил, когда свои ХП < 80 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add( new L2ProgressBinding(window, cbSelfHp1, tbHp1Key1, tbHp1Key2) ); // Хил, когда свои ХП < 30 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add( new L2ProgressBinding(window, cbSelfHp2, tbHp2Key1, tbHp2Key2) ); // Хил, когда свои МП < 80 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add( new L2ProgressBinding(window, cbSelfMp1, tbMp1Key1, tbMp1Key2) ); // Хил, когда свои МП < 30 ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add( new L2ProgressBinding(window, cbSelfMp2, tbMp2Key1, tbMp2Key2) ); // TARGET // Атака, когда хп врага от 1 до 100 ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add( new L2ProgressBinding(window, cbAttack, tbAttack).SetBorder(1, 100) ); // after kill ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add( new L2ProgressBindingAfterKill(window, cbAfterKillActive, tbAfterKillKey1, tbAfterKillKey2, tbAfterKillKey3) ); // empty target ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add( new L2ProgressBindingEmptyTarget(window, cbEmptyTargetActive, tbEmptyTargetKey1, tbEmptyTargetKey2, tbEmptyTargetKey3) ); for (int i = 0; i <= 8; ++i) { ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add( new L2ProgressBindingHeal(window, cbHealHp1Active, tbHealHp1Key).SetBorder(0, nudGroupHeal1) ); ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add( new L2ProgressBindingHeal(window, cbHealHp2Active, tbHealHp2Key).SetBorder(0, nudGroupHeal2) ); ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Mp + i].Bindings.Add( new L2ProgressBindingHeal(window, cbRegenMp1Active, tbRegenMp1).SetBorder(0, nudRegenMp1) ); } }
public L2ProgressInfo(int type, GameWindow window) { this.Window = window; this.Type = type; }
public void L2Window_ScreenshotUpdate(GameWindow window) { //TempScreen = Direct3DCapture.CaptureWindow (new IntPtr (window.HWnd)); //TempScreen = new Bitmap (WindowImageCapture.CaptureWindow (new IntPtr (window.HWnd))); //using (BitmapDecorator deco = new BitmapDecorator(window.ProgressBindings.Screenshot)) //{ // foreach (L2ProgressInfo progress in window.ProgressBindings.Progresses) // { // if (!progress.IsEmpty()) // { // int x = progress.X2; // Color pixel = deco.GetPixel(x, progress.Y1); // while (x > progress.X1 && !progress.IsHpColor(pixel)) // { // if (cbDebugScreen.Checked && !inDebugScreenUpdate) // { // TempBmp.SetPixel(x, 0, deco.GetPixel(x, progress.Y1 - 2)); // TempBmp.SetPixel(x, 1, deco.GetPixel(x, progress.Y1 - 1)); // TempBmp.SetPixel(x, 2, pixel); // TempBmp.SetPixel(x, 3, deco.GetPixel(x, progress.Y1 + 1)); // TempBmp.SetPixel(x, 4, deco.GetPixel(x, progress.Y1 + 2)); // } // x--; // pixel = deco.GetPixel(x, progress.Y1); // } // if (cbDebugScreen.Checked && !inDebugScreenUpdate) // { // inDebugScreenUpdate = true; // TempBmp.SetPixel(x - 1, 0, Color.White); // TempBmp.SetPixel(x - 1, 1, Color.White); // TempBmp.SetPixel(x - 1, 2, Color.White); // TempBmp.SetPixel(x - 1, 3, Color.White); // TempBmp.SetPixel(x - 1, 4, Color.White); // pbDebugScreen.Invoke(new MethodInvoker( // delegate() // { // if (pbDebugScreen.Image != TempBmp) // { // pbDebugScreen.Image = TempBmp; // } // else // { // pbDebugScreen.Invalidate(); // } // } // )); // } // progress.Hp = // progress.X2 > progress.X1 ? // (100 * (x - progress.X1) / (progress.X2 - progress.X1)) : // 0; // } // } //} }
public L2ProgressBindingHeal(GameWindow window, CheckBox activeCheckBox, TextBox key1, TextBox key2 = null, TextBox key3 = null) : base(window, activeCheckBox, key1, key2, key3) { }
private void lvWindows_SelectedIndexChanged(object sender, EventArgs e) { if ( lvWindows.SelectedItems.Count > 0 && lvWindows.SelectedItems[0].Index < Windows.Count ) { ActiveWindow = Windows[lvWindows.SelectedItems[0].Index]; } }
private void btnRefresh_Click(object sender, EventArgs e) { ActiveWindow = null; // В temp останутя только окна, которые больше не существуют List<GameWindow> temp = new List<GameWindow>(Windows); Windows.Clear(); lvWindows.Items.Clear(); NativeMethods.EnumWindows( (hWnd, lParam) => { if (NativeMethods.IsWindowVisible(hWnd)) { string title = GetWindowText(hWnd); if (title.IndexOf(tbWindowFilter.Text) >= 0) { GameWindow window = null; foreach (GameWindow w in temp) { if (w.HWnd == hWnd) { window = w; temp.Remove(w); break; } } ListViewItem lvi = lvWindows.Items.Add(title); lvi.SubItems.Add( (window != null && window.CharacterName != "") ? window.CharacterName : String.Concat(hWnd) ); if (window == null) { window = new GameWindow(hWnd, tcWindow); } Windows.Add(window); window.ListItem = lvi; lvi.Checked = window.Active; window.Hide(); } } return true; }, IntPtr.Zero ); foreach (GameWindow window in temp) { window.Active = false; window.ListItem.Remove(); } }
public MdlProgressBindings(GameWindow window, TabPage tab) : base(window, tab) { Uc = new UcWincExtended(); }
public L2ProgressBindingAfterKill(GameWindow window, CheckBox activeCheckBox, TextBox key1, TextBox key2 = null, TextBox key3 = null) : base(window, activeCheckBox, key1, key2, key3) { }
public L2ProgressBindingEmptyTarget(GameWindow window, CheckBox activeCheckBox, TextBox key1, TextBox key2 = null, TextBox key3 = null) : base(window, activeCheckBox, key1, key2, key3) { }