ExecuteCommand() public static method

public static ExecuteCommand ( string command, ParseMemoryResults parseMemoryResults = null ) : bool
command string
parseMemoryResults ParseMemoryResults
return bool
コード例 #1
0
ファイル: RouteForm.cs プロジェクト: umdez/Tibialyzer
 private void creatureName_Click(object sender, EventArgs e)
 {
     if (imageObject != null)
     {
         CommandManager.ExecuteCommand(imageObject.GetCommand());
     }
 }
コード例 #2
0
        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("\\", "/"));
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: jpodeszwik/Tibialyzer
        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);
        }
コード例 #4
0
        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());
        }
コード例 #5
0
ファイル: TaskForm.cs プロジェクト: jpodeszwik/Tibialyzer
 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));
     }
 }
コード例 #6
0
        protected void openCreatureMenu(object sender, EventArgs e)
        {
            this.ReturnFocusToTibia();
            string name = (sender as Control).Name;

            CommandManager.ExecuteCommand("creature" + Constants.CommandSymbol + name.ToLower());
        }
コード例 #7
0
        private void openQuest(object sender, EventArgs e)
        {
            this.ReturnFocusToTibia();
            string name = (sender as Control).Name;

            CommandManager.ExecuteCommand("quest" + Constants.CommandSymbol + name.ToLower());
        }
コード例 #8
0
ファイル: MainTab.cs プロジェクト: umdez/Tibialyzer
 private void commandTextBox_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '\r')
     {
         CommandManager.ExecuteCommand((sender as TextBox).Text);
         e.Handled = true;
     }
 }
コード例 #9
0
        private void resetButton_Click(object sender, MouseEventArgs e)
        {
            Hunt h = MainForm.mainForm.getSelectedHunt();

            if (h != null)
            {
                CommandManager.ExecuteCommand("reset" + Constants.CommandSymbol + h.name);
            }
        }
コード例 #10
0
ファイル: DatabaseTab.cs プロジェクト: villor/Tibialyzer
        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();
        }
コード例 #11
0
ファイル: DatabaseTab.cs プロジェクト: villor/Tibialyzer
        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();
        }
コード例 #12
0
        private void showLootButton_Click(object sender, EventArgs e)
        {
            Hunt h = getSelectedHunt();

            if (h != null)
            {
                CommandManager.ExecuteCommand("loot" + Constants.CommandSymbol + h.name);
            }
        }
コード例 #13
0
ファイル: DatabaseTab.cs プロジェクト: villor/Tibialyzer
        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();
            }
        }
コード例 #14
0
        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);
        }
コード例 #15
0
 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));
     }
 }
コード例 #16
0
ファイル: ListNotification.cs プロジェクト: umdez/Tibialyzer
 public static void OpenCommand(string command, int type)
 {
     if (type == 0)
     {
         CommandManager.ExecuteCommand(command);
     }
     else if (type == 1)
     {
         MainForm.OpenUrl(command);
     }
 }
コード例 #17
0
 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);
     }
 }
コード例 #18
0
        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;
                }
            }
        }
コード例 #19
0
ファイル: HUDTab.cs プロジェクト: jpodeszwik/Tibialyzer
 private void closeHudButton_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("closehud@" + Constants.HudTypes[hudTypeList.SelectedIndex]);
 }
コード例 #20
0
ファイル: PortraitTab.cs プロジェクト: umdez/Tibialyzer
 private void refreshButton_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("hud@portrait");
 }
コード例 #21
0
 private void huntButton_Click(object sender, EventArgs e)
 {
     this.ReturnFocusToTibia();
     CommandManager.ExecuteCommand("hunt" + Constants.CommandSymbol + (sender as Control).Name);
 }
コード例 #22
0
 void openItemBox(object sender, EventArgs e)
 {
     this.ReturnFocusToTibia();
     CommandManager.ExecuteCommand("item" + Constants.CommandSymbol + (sender as Control).Name);
 }
コード例 #23
0
ファイル: TaskForm.cs プロジェクト: jpodeszwik/Tibialyzer
 private void taskGroupLabel_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("task" + Constants.CommandSymbol + task.groupname);
 }
コード例 #24
0
ファイル: TaskForm.cs プロジェクト: jpodeszwik/Tibialyzer
 private void bossPictureBox_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("creature" + Constants.CommandSymbol + task.GetBoss().GetName());
 }
コード例 #25
0
ファイル: NotificationsTab.cs プロジェクト: umdez/Tibialyzer
        private void testNotificationDisplayButton_Click(object sender, EventArgs e)
        {
            string command = Constants.NotificationTestCommands[notificationTypeList.SelectedIndex];

            CommandManager.ExecuteCommand(command);
        }
コード例 #26
0
ファイル: NotificationsTab.cs プロジェクト: umdez/Tibialyzer
 private void clearNotificationDisplayButton_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("close@");
 }
コード例 #27
0
 private void MissionButton_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand((sender as Control).Name);
 }
コード例 #28
0
 private void cityLabel_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("city" + Constants.CommandSymbol + this.hunting_place.city);
 }
コード例 #29
0
 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()));
 }
コード例 #30
0
ファイル: HUDTab.cs プロジェクト: jpodeszwik/Tibialyzer
 private void closeAllHudsButton_Click(object sender, EventArgs e)
 {
     CommandManager.ExecuteCommand("closehud@");
 }