public static ExecuteCommand ( string command, |
||
command | string | |
parseMemoryResults | ||
return | bool |
private void creatureName_Click(object sender, EventArgs e) { if (imageObject != null) { CommandManager.ExecuteCommand(imageObject.GetCommand()); } }
private void saveSummaryImageButton_Click(object sender, EventArgs e) { SaveFileDialog dialog = new SaveFileDialog(); dialog.AddExtension = true; dialog.DefaultExt = "png"; dialog.Title = "Save Damage Image"; if (File.Exists("summary_screenshot.png")) { int i = 1; while (File.Exists("summary_screenshot (" + i.ToString() + ").png")) { i++; } dialog.FileName = "summary_screenshot (" + i.ToString() + ").png"; } else { dialog.FileName = "summary_screenshot.png"; } DialogResult result = dialog.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { CommandManager.ExecuteCommand("summary" + Constants.CommandSymbol + "screenshot" + Constants.CommandSymbol + dialog.FileName.Replace("\\\\", "/").Replace("\\", "/")); } }
protected override void WndProc(ref Message m) { if (m.Msg == 0xC) { // This messages is send by AutoHotkey to execute a command string command = Marshal.PtrToStringUni(m.LParam); if (command != null) { if (CommandManager.ExecuteCommand(command)) { return; //if the passed along string is a command, we have executed it successfully } } } if (m.Msg == 0x317) { // We intercept this message because this message signifies the AutoHotkey state (suspended or not) int wParam = m.WParam.ToInt32(); if (wParam == 32) { // 32 signifies we have entered suspended mode, so we warn the user with a popup AutoHotkeyManager.ShowSuspendedWindow(); } else if (wParam == 33) { // 33 signifies we are not suspended, destroy the suspended window (if it exists) AutoHotkeyManager.CloseSuspendedWindow(); } } base.WndProc(ref m); }
private void guideButton_Click(object sender, EventArgs e) { this.ReturnFocusToTibia(); string name = (sender as Control).Name; CommandManager.ExecuteCommand("direction" + Constants.CommandSymbol + hunting_place.name.ToLower()); }
private void routeButton_Click(object sender, EventArgs e) { if (task.bossposition != null) { CommandManager.ExecuteCommand(String.Format("route{0}{1},{2},{3}{0}{4}", Constants.CommandSymbol, task.bossposition.x, task.bossposition.y, task.bossposition.z, task.GetBoss() == null ? "" : task.GetBoss().title)); } }
protected void openCreatureMenu(object sender, EventArgs e) { this.ReturnFocusToTibia(); string name = (sender as Control).Name; CommandManager.ExecuteCommand("creature" + Constants.CommandSymbol + name.ToLower()); }
private void openQuest(object sender, EventArgs e) { this.ReturnFocusToTibia(); string name = (sender as Control).Name; CommandManager.ExecuteCommand("quest" + Constants.CommandSymbol + name.ToLower()); }
private void commandTextBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { CommandManager.ExecuteCommand((sender as TextBox).Text); e.Handled = true; } }
private void resetButton_Click(object sender, MouseEventArgs e) { Hunt h = MainForm.mainForm.getSelectedHunt(); if (h != null) { CommandManager.ExecuteCommand("reset" + Constants.CommandSymbol + h.name); } }
private void UpdateDiscardRatio(object sender, EventArgs e) { string itemName = (sender as Control).Name; Item item = StorageManager.getItem(itemName); double ratio = item.GetMaxValue() / item.capacity; CommandManager.ExecuteCommand("setdiscardgoldratio" + Constants.CommandSymbol + Math.Floor(ratio)); UpdateDiscardDisplay(); }
private void UpdateConvertRatio(object sender, EventArgs e) { string itemName = (sender as Control).Name; Item item = StorageManager.getItem(itemName); double ratio = item.GetMaxValue() / item.capacity; CommandManager.ExecuteCommand("setconvertgoldratio" + Constants.CommandSymbol + (item.stackable ? "1-" : "0-") + Math.Ceiling(ratio + 0.01)); UpdateConvertDisplay(); }
private void showLootButton_Click(object sender, EventArgs e) { Hunt h = getSelectedHunt(); if (h != null) { CommandManager.ExecuteCommand("loot" + Constants.CommandSymbol + h.name); } }
private void applyDiscardRatioButton_Click(object sender, EventArgs e) { double ratio; if (double.TryParse(customDiscardRatioBox.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out ratio)) { CommandManager.ExecuteCommand("setdiscardgoldratio" + Constants.CommandSymbol + Math.Floor(ratio)); UpdateDiscardDisplay(); } }
public static void Back() { if (command_stack.Count <= 1) { return; } command_stack.Pop(); // remove the current command string command = command_stack.Pop().command; CommandManager.ExecuteCommand(command); }
void openCreatureDrops(object sender, EventArgs e) { if (creatures.Keys.Count == 1) { CommandManager.ExecuteCommand("creature" + Constants.CommandSymbol + (sender as Control).Name); } else { CommandManager.ExecuteCommand(String.Format("loot{0}{1}{0}{2}{0}{3}", Constants.CommandSymbol, huntName, (sender as Control).Name, rawName)); } }
public static void OpenCommand(string command, int type) { if (type == 0) { CommandManager.ExecuteCommand(command); } else if (type == 1) { MainForm.OpenUrl(command); } }
private void UtilityBox_Click(object sender, EventArgs e) { if (npcList == null) { Utility utility = city.utilities[int.Parse((sender as Control).Name)]; mapBox.mapCoordinate = new Coordinate(utility.location); mapBox.UpdateMap(); } else { NPC npc = npcList[int.Parse((sender as Control).Name)] as NPC; CommandManager.ExecuteCommand("npc" + Constants.CommandSymbol + npc.name); } }
private void OpenItemWindow(object sender, MouseEventArgs e, List <ItemRegion>[] lootRegions) { Point mousePoint = new Point(e.X, e.Y); int index = 0; int.TryParse((sender as Control).Name, out index); if (index > lootRegions.Length && lootRegions[index] == null) { return; } List <ItemRegion> regions = lootRegions[index]; foreach (ItemRegion reg in regions) { if (reg.region.Contains(mousePoint)) { CommandManager.ExecuteCommand(reg.item.GetCommand()); return; } } }
private void closeHudButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("closehud@" + Constants.HudTypes[hudTypeList.SelectedIndex]); }
private void refreshButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("hud@portrait"); }
private void huntButton_Click(object sender, EventArgs e) { this.ReturnFocusToTibia(); CommandManager.ExecuteCommand("hunt" + Constants.CommandSymbol + (sender as Control).Name); }
void openItemBox(object sender, EventArgs e) { this.ReturnFocusToTibia(); CommandManager.ExecuteCommand("item" + Constants.CommandSymbol + (sender as Control).Name); }
private void taskGroupLabel_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("task" + Constants.CommandSymbol + task.groupname); }
private void bossPictureBox_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("creature" + Constants.CommandSymbol + task.GetBoss().GetName()); }
private void testNotificationDisplayButton_Click(object sender, EventArgs e) { string command = Constants.NotificationTestCommands[notificationTypeList.SelectedIndex]; CommandManager.ExecuteCommand(command); }
private void clearNotificationDisplayButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("close@"); }
private void MissionButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand((sender as Control).Name); }
private void cityLabel_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("city" + Constants.CommandSymbol + this.hunting_place.city); }
private void routeButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand(String.Format("route{0}{1},{2},{3}{0}{4}", Constants.CommandSymbol, mapBox.beginCoordinate.x, mapBox.beginCoordinate.y, mapBox.beginCoordinate.z, hunting_place.GetName())); }
private void closeAllHudsButton_Click(object sender, EventArgs e) { CommandManager.ExecuteCommand("closehud@"); }