public AccountServerCharacterGUI(MainView mainView) { try { loginText = mainView.LoginText; mainView.LoginAdd.Hit += new EventHandler(LoginAdd_Hit); loginList = mainView.LoginList; loginList.Click += new HudList.delClickedControl(loginList_Click); loginCompleteText = mainView.LoginCompleteText; mainView.LoginCompleteAdd.Hit += new EventHandler(LoginCompleteAdd_Hit); loginCompleteList = mainView.LoginCompleteList; loginCompleteList.Click += new HudList.delClickedControl(loginCompleteList_Click); periodicCommandText = mainView.PeriodicCommandText; periodicCommandInterval = mainView.PeriodicCommandInterval; periodicCommandOffset = mainView.PeriodicCommandOffset; mainView.PeriodicCommandAdd.Hit += new EventHandler(PeriodicCommandAdd_Hit); periodicCommandList = mainView.PeriodicCommandList; periodicCommandList.Click += new HudList.delClickedControl(periodicCommandList_Click); CoreManager.Current.CharacterFilter.Login += new EventHandler<Decal.Adapter.Wrappers.LoginEventArgs>(CharacterFilter_Login); } catch (Exception ex) { Debug.LogException(ex); } }
public TinkeringToolsView(MainView mainView) { try { tinkeringMaterial = mainView.TinkeringMaterial; tinkeringMinimumPercent = mainView.TinkeringMinimumPercent; tinkeringTargetTotalTinks = mainView.TinkeringTargetTotalTinks; tinkeringList = mainView.TinkeringList; mainView.TinkeringAddSelectedItem.Hit += new EventHandler(TinkeringAddSelectedItem_Hit); mainView.TinkeringMaterial.AddItem("Brass", null); mainView.TinkeringMaterial.AddItem("Granite", null); mainView.TinkeringMaterial.AddItem("Green Garnet", null); mainView.TinkeringMaterial.AddItem("Iron", null); mainView.TinkeringMaterial.AddItem("Mahogany", null); mainView.TinkeringMaterial.AddItem("Steel", null); mainView.TinkeringMaterial.AddItem("Velvet", null); mainView.TinkeringMinimumPercent.Text = "100"; mainView.TinkeringStart.Hit += new EventHandler(TinkeringStart_Hit); mainView.TinkeringStop.Hit += new EventHandler(TinkeringStop_Hit); mainView.TinkeringList.Click += new VirindiViewService.Controls.HudList.delClickedControl(TinkeringList_Click); CoreManager.Current.WorldFilter.ChangeObject += new EventHandler<ChangeObjectEventArgs>(WorldFilter_ChangeObject); CoreManager.Current.EchoFilter.ServerDispatch += new EventHandler<NetworkMessageEventArgs>(EchoFilter_ServerDispatch); timer.Interval = 1000; timer.Tick += new EventHandler(timer_Tick); } catch (Exception ex) { Debug.LogException(ex); } }
const int IconNone = 0x600287A; // Small Grayish Dot public ManaTrackerGUI(EquipmentTracker manaTracker, MainView mainView) { try { this.manaTracker = manaTracker; this.mainView = mainView; manaTracker.ItemAdded += new Action<IEquipmentTrackedItem>(manaTracker_ItemAdded); manaTracker.ItemRemoved += new Action<IEquipmentTrackedItem>(manaTracker_ItemRemoved); } 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); } }
void Current_PluginInitComplete_VVS(object sender, EventArgs e) { try { // Views, depends on VirindiViewService.dll try { mainView = new MainView(); manaTrackerGUI = new ManaTrackerGUI(equipmentTracker, mainView); combatTrackerGUICurrent = new CombatTrackerGUI(combatTrackerCurrent, mainView.CombatTrackerMonsterListCurrent, mainView.CombatTrackerDamageListCurrent); combatTrackerGUIPersistent = new CombatTrackerGUI(combatTrackerPersistent, mainView.CombatTrackerMonsterListPersistent, mainView.CombatTrackerDamageListPersistent); corpseTrackerGUI = new CorpseTrackerGUI(corpseTracker, mainView.CorpseTrackerList); playerTrackerGUI = new PlayerTrackerGUI(playerTracker, mainView.PlayerTrackerList); consumableTrackerGUI = new ConsumableTrackerGUI(consumableTracker, mainView.ConsumableTrackerList); chatLoggerGroup1GUI = new ChatLoggerGUI(chatLogger, Settings.SettingsManager.ChatLogger.Groups[0], mainView.ChatLogger1List); chatLoggerGroup2GUI = new ChatLoggerGUI(chatLogger, Settings.SettingsManager.ChatLogger.Groups[1], mainView.ChatLogger2List); inventoryToolsView = new InventoryToolsView(mainView, inventoryExporter); tinkeringToolsView = new TinkeringToolsView(mainView); accountServerCharacterGUI = new AccountServerCharacterGUI(mainView); mainView.CombatTrackerClearCurrentStats.Hit += (s2, e2) => { try { combatTrackerCurrent.ClearStats(); } catch (Exception ex) { Debug.LogException(ex); } }; mainView.CombatTrackerExportCurrentStats.Hit += (s2, e2) => { try { combatTrackerCurrent.ExportStats(PluginPersonalFolder.FullName + @"\" + CoreManager.Current.CharacterFilter.Server + @"\" + CoreManager.Current.CharacterFilter.Name + ".CombatTracker." + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".xml", true); } catch (Exception ex) { Debug.LogException(ex); } }; mainView.CombatTrackerClearPersistentStats.Hit += new EventHandler(CombatTrackerClearPersistentStats_Hit); mainView.CorpseTrackerClearHistory.Hit += new EventHandler(CorpseTrackerClearHistory_Hit); mainView.PlayerTrackerClearHistory.Hit += new EventHandler(PlayerTrackerClearHistory_Hit); mainView.ChatLoggerClearHistory.Hit += new EventHandler(ChatLoggerClearHistory_Hit); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location); mainView.VersionLabel.Text = "Version: " + fvi.ProductVersion; //hud = new HUD(equipmentTracker); } catch (FileNotFoundException ex) { startupErrors.Add("Views failed to load: " + ex.Message + Environment.NewLine + "Is Virindi View Service Running?"); } catch (Exception ex) { Debug.LogException(ex); } } catch (Exception ex) { Debug.LogException(ex); } }