public InventoryToolsView(MainView mainView, InventoryExporter inventoryExporter) { try { inventorySearch = mainView.InventorySearch; inventoryList = mainView.InventoryList; inventoryItemText = mainView.InventoryItemText; mainView.ClipboardWornEquipment.Hit += (s2, e2) => { try { inventoryExporter.ExportToClipboard(InventoryExporter.ExportGroups.WornEquipment); } catch (Exception ex) { Debug.LogException(ex); } }; mainView.ClipboardInventoryInfo.Hit += (s2, e2) => { try { inventoryExporter.ExportToClipboard(InventoryExporter.ExportGroups.Inventory); } catch (Exception ex) { Debug.LogException(ex); } }; inventorySearch.Change += new EventHandler(InventorySearch_Change); inventoryList.Click += new VirindiViewService.Controls.HudList.delClickedControl(InventoryList_Click); } catch (Exception ex) { Debug.LogException(ex); } }
public InventoryToolsView(MainView mainView, InventoryExporter inventoryExporter) { try { inventorySearch = mainView.InventorySearch; inventoryList = mainView.InventoryList; inventoryItemText = mainView.InventoryItemText; mainView.ClipboardWornEquipment.Hit += (s2, e2) => { try { inventoryExporter.ExportToClipboard(InventoryExporter.ExportGroups.WornEquipment); } catch (Exception ex) { Debug.LogException(ex); } }; mainView.ClipboardInventoryInfo.Hit += (s2, e2) => { try { inventoryExporter.ExportToClipboard(InventoryExporter.ExportGroups.Inventory); } catch (Exception ex) { Debug.LogException(ex); } }; inventorySearch.Change += new EventHandler(InventorySearch_Change); inventoryList.Click += new VirindiViewService.Controls.HudList.delClickedControl(InventoryList_Click); } catch (Exception ex) { Debug.LogException(ex); } }
/// <summary> /// This is called when the plugin is started up. This happens only once. /// We init most of our objects here, EXCEPT ones that depend on other assemblies (not counting decal assemblies). /// </summary> protected override void Startup() { try { Current = this; Debug.Init(PluginPersonalFolder.FullName + @"\Exceptions.txt", PluginName); Mag.Shared.Settings.SettingsFile.Init(PluginPersonalFolder.FullName + @"\" + PluginName + ".xml", PluginName); CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete); CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VTClassic); CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VTank); CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VVS); CoreManager.Current.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete_VHS); CoreManager.Current.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete); CoreManager.Current.CharacterFilter.Logoff += new EventHandler<Decal.Adapter.Wrappers.LogoffEventArgs>(CharacterFilter_Logoff); CoreManager.Current.CommandLineText += new EventHandler<ChatParserInterceptEventArgs>(Current_CommandLineText); // General inventoryExporter = new InventoryExporter(); inventoryLogger = new InventoryLogger(); idleActionManager = new IdleActionManager(); // Macros loginActions = new LoginActions(); periodicCommands = new PeriodicCommands(); openMainPackOnLogin = new OpenMainPackOnLogin(); maximizeChatOnLogin = new MaximizeChatOnLogin(); autoPercentConfirmation = new AutoPercentConfirmation(); autoRecharge = new AutoRecharge(); autoTradeAccept = new AutoTradeAccept(); oneTouchHeal = new OneTouchHeal(); logOutOnDeath = new LogOutOnDeath(); // Trackers equipmentTracker = new Trackers.Equipment.EquipmentTracker(); combatTrackerCurrent = new Trackers.Combat.CombatTracker(); combatTrackerPersistent = new Trackers.Combat.CombatTracker(); corpseTracker = new Trackers.Corpse.CorpseTracker(); playerTracker = new Trackers.Player.PlayerTracker(); consumableTracker = new Trackers.Consumable.ConsumableTracker(); // Loggers chatLogger = new Loggers.Chat.ChatLogger(); chatLogFileWriter = new Loggers.Chat.BufferedChatLogFileWriter(null, chatLogger, TimeSpan.FromMinutes(10)); // Misc windowFrameRemover = new WindowFrameRemover(); windowMover = new WindowMover(); noFocusFPSManager = new NoFocusFPSManager(); savePersistentStatsTimer.Interval = 600000; // Set the timer to run once every 10 minutes savePersistentStatsTimer.Tick += new EventHandler(SavePersistentStatsTimer_Tick); } catch (Exception ex) { Debug.LogException(ex); } }