Exemplo n.º 1
0
        public CombatTrackerGUI(CombatTracker combatTracker, HudList monsterList, HudList damageInfoList)
        {
            try
            {
                if (combatTracker == null)
                {
                    return;
                }

                this.combatTracker = combatTracker;
                this.monsterList   = monsterList;

                combatTrackerGUIInfo = new CombatTrackerGUIInfo(damageInfoList);

                monsterList.ClearColumnsAndRows();

                // Each character is a max of 6 pixels wide
                monsterList.AddColumn(typeof(HudStaticText), 5, null);
                monsterList.AddColumn(typeof(HudStaticText), 111, null);
                monsterList.AddColumn(typeof(HudStaticText), 37, null);
                monsterList.AddColumn(typeof(HudStaticText), 55, null);                 // This cannot go any smaller without pruning text
                monsterList.AddColumn(typeof(HudStaticText), 77, null);

                HudList.HudListRowAccessor newRow = monsterList.AddRow();
                ((HudStaticText)newRow[2]).Text          = "KB's";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text          = "Dmg Rcvd";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "Dmg Givn";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = monsterList.AddRow();
                ((HudStaticText)newRow[0]).Text          = "*";
                ((HudStaticText)newRow[1]).Text          = "All";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                selectedRow = 1;

                monsterList.Click += new HudList.delClickedControl(monsterList_Click);

                combatTracker.InfoCleared         += new Action <bool>(combatTracker_InfoCleared);
                combatTracker.StatsLoaded         += new Action <List <CombatInfo> >(combatTracker_StatsLoaded);
                combatTracker.CombatInfoUpdated   += new Action <CombatInfo>(combatTracker_CombatInfoUpdated);
                combatTracker.AetheriaInfoUpdated += new Action <AetheriaInfo>(combatTracker_AetheriaInfoUpdated);
                combatTracker.CloakInfoUpdated    += new Action <CloakInfo>(combatTracker_CloakInfoUpdated);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 2
0
		public CombatTrackerGUI(CombatTracker combatTracker, HudList monsterList, HudList damageInfoList)
		{
			try
			{
				if (combatTracker == null)
					return;

				this.combatTracker = combatTracker;
				this.monsterList = monsterList;

				combatTrackerGUIInfo = new CombatTrackerGUIInfo(damageInfoList);

				monsterList.ClearColumnsAndRows();

				// Each character is a max of 6 pixels wide
				monsterList.AddColumn(typeof(HudStaticText), 5, null);
				monsterList.AddColumn(typeof(HudStaticText), 111, null);
				monsterList.AddColumn(typeof(HudStaticText), 37, null);
				monsterList.AddColumn(typeof(HudStaticText), 55, null); // This cannot go any smaller without pruning text
				monsterList.AddColumn(typeof(HudStaticText), 77, null);

				HudList.HudListRowAccessor newRow = monsterList.AddRow();
				((HudStaticText)newRow[2]).Text = "KB's";
				((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Dmg Rcvd";
				((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[4]).Text = "Dmg Givn";
				((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = monsterList.AddRow();
				((HudStaticText)newRow[0]).Text = "*";
				((HudStaticText)newRow[1]).Text = "All";
				((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				
				selectedRow = 1;

				monsterList.Click += new HudList.delClickedControl(monsterList_Click);

				combatTracker.InfoCleared += new Action<bool>(combatTracker_InfoCleared);
				combatTracker.StatsLoaded += new Action<List<CombatInfo>>(combatTracker_StatsLoaded);
				combatTracker.CombatInfoUpdated += new Action<CombatInfo>(combatTracker_CombatInfoUpdated);
				combatTracker.AetheriaInfoUpdated += new Action<AetheriaInfo>(combatTracker_AetheriaInfoUpdated);
				combatTracker.CloakInfoUpdated += new Action<CloakInfo>(combatTracker_CloakInfoUpdated);
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
Exemplo n.º 3
0
        void CharacterFilter_LoginComplete(object sender, EventArgs e)
        {
            try
            {
                hudView = new HudView("Mag-HUD", 200, 80, new ACImage(Color.Black), false);

                hudView.Visible         = true;
                hudView.UserMinimizable = false;
                hudView.ShowIcon        = false;
                hudView.UserResizeable  = true;
                //View.ClickThrough = true;
                hudView.Theme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");

                hudView.LoadUserSettings();

                hudListHead = new HudList();
                hudView.Controls.HeadControl = hudListHead;

                hudListHead.Padding       = 0;           // Default: 1
                hudListHead.WPadding      = 0;           // Default: 7
                hudListHead.WPaddingOuter = 0;           // Default: 3

                hudListHead.AddColumn(typeof(HudPictureBox), 16, null);
                hudListHead.AddColumn(typeof(HudStaticText), 999, null);

                HudList.HudListRowAccessor newRow = hudListHead.AddRow();
                ((HudPictureBox)newRow[0]).Image = new ACImage(13107);                 // Major Mana Stone
                //((HudStaticText)newRow[1]).Text = "Cool Stuff Here 0 1 2 3 45 6 7 8sdf 8asdf 8asdf8asdf8asdf";

                hudUpdateTimer.Interval = 1000;
                hudUpdateTimer.Start();
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 4
0
        private void _processPlayerAdd(Player player)
        {
            bool    enemy       = player.Enemy;
            HudList playersView = enemy ? _enemyListView : _friendlyListView;
            int     icon        = enemy ? EnemyIcon : FriendlyIcon;
            D3DObj  playerIcon  = CoreManager.Current.D3DService.MarkObjectWithShape(player.Id, D3DShape.Sphere, Color.Red.ToArgb());

            playerIcon.Scale(enemy ? 0.3f : 0.3f);
            playerIcon.Anchor(player.Id, 0.2f, 0.0f, 0.0f, 2.5f);
            playerIcon.Color = enemy ? Color.FromArgb(200, Color.Red).ToArgb() : Color.FromArgb(220, Color.LightBlue).ToArgb();
            playerIcon.OrientToCamera(true);
            _playerIcons.Add(_playerIconFactory(player.Id, playerIcon));

            HudList.HudListRowAccessor row = playersView.AddRow();
            ((HudPictureBox)row[0]).Image     = icon;
            ((HudStaticText)row[1]).Text      = player.Name;
            ((HudStaticText)row[1]).TextColor = enemy ? Color.Red : Color.LightBlue;

            if (!enemy)
            {
                ((HudStaticText)row[1]).TextColor = Color.LightGreen;
                ((HudPictureBox)row[2]).Image     = 100670841;
                ((HudPictureBox)row[3]).Image     = 100670842;
            }
        }
Exemplo n.º 5
0
        public CorpseTrackerGUI(IItemTracker <TrackedCorpse> tracker, HudList hudList)
        {
            try
            {
                this.tracker = tracker;
                this.hudList = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudStaticText), 53, null);
                hudList.AddColumn(typeof(HudStaticText), 162, null);
                hudList.AddColumn(typeof(HudStaticText), 100, null);
                hudList.AddColumn(typeof(HudStaticText), 0, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text = "Time";
                ((HudStaticText)newRow[1]).Text = "Name";
                ((HudStaticText)newRow[2]).Text = "Coords";
                ((HudStaticText)newRow[3]).Text = "Id";

                tracker.ItemsAdded  += new Action <System.Collections.Generic.ICollection <TrackedCorpse> >(corpseTracker_ItemsAdded);
                tracker.ItemChanged += new Action <TrackedCorpse>(corpseTracker_ItemChanged);
                tracker.ItemRemoved += new Action <TrackedCorpse>(corpseTracker_ItemRemoved);

                hudList.Click += new HudList.delClickedControl(hudList_Click);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 6
0
        public PlayerTrackerGUI(ITracker <TrackedPlayer> tracker, HudList hudList)
        {
            try
            {
                this.tracker = tracker;
                this.hudList = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudStaticText), 75, null);
                hudList.AddColumn(typeof(HudStaticText), 140, null);
                hudList.AddColumn(typeof(HudStaticText), 100, null);
                hudList.AddColumn(typeof(HudStaticText), 0, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text = "Time";
                ((HudStaticText)newRow[1]).Text = "Name";
                ((HudStaticText)newRow[2]).Text = "Coords";
                ((HudStaticText)newRow[3]).Text = "Id";

                tracker.ItemAdded   += new Action <TrackedPlayer>(playerTracker_ItemAdded);
                tracker.ItemChanged += new Action <TrackedPlayer>(playerTracker_ItemChanged);
                tracker.ItemRemoved += new Action <TrackedPlayer>(playerTracker_ItemRemoved);

                hudList.Click += new HudList.delClickedControl(hudList_Click);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 7
0
		public CorpseTrackerGUI(ITracker<TrackedCorpse> tracker, HudList hudList)
		{
			try
			{
				this.tracker = tracker;
				this.hudList = hudList;

				hudList.ClearColumnsAndRows();

				hudList.AddColumn(typeof(HudStaticText), 53, null);
				hudList.AddColumn(typeof(HudStaticText), 162, null);
				hudList.AddColumn(typeof(HudStaticText), 100, null);
				hudList.AddColumn(typeof(HudStaticText), 0, null);

				HudList.HudListRowAccessor newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Time";
				((HudStaticText)newRow[1]).Text = "Name";
				((HudStaticText)newRow[2]).Text = "Coords";
				((HudStaticText)newRow[3]).Text = "Id";

				tracker.ItemAdded += new Action<TrackedCorpse>(corpseTracker_ItemAdded);
				tracker.ItemChanged += new Action<TrackedCorpse>(corpseTracker_ItemChanged);
				tracker.ItemRemoved += new Action<TrackedCorpse>(corpseTracker_ItemRemoved);

				hudList.Click += new HudList.delClickedControl(hudList_Click);
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
Exemplo n.º 8
0
        public void Clear()
        {
            hudList.ClearRows();

            HudList.HudListRowAccessor newRow = hudList.AddRow();
            ((HudStaticText)newRow[0]).Text = "Time";
            ((HudStaticText)newRow[1]).Text = "Message";
        }
Exemplo n.º 9
0
        public InventoryTrackerGUI(IItemTracker <TrackedProfitLoss> profitLossTracker, IItemTracker <TrackedInventory> inventoryTracker, HudList hudList)
        {
            try
            {
                this.profitLossTracker = profitLossTracker;
                this.inventoryTracker  = inventoryTracker;
                this.hudList           = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudPictureBox), 16, null);
                hudList.AddColumn(typeof(HudStaticText), 55, null);
                hudList.AddColumn(typeof(HudStaticText), 35, null);
                hudList.AddColumn(typeof(HudStaticText), 65, null);
                hudList.AddColumn(typeof(HudStaticText), 65, null);
                hudList.AddColumn(typeof(HudStaticText), 40, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[3]).Text          = "MMD/h ~5m";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "MMD/h ~1h";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Peas";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Comps";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Salvage";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Net Profit";

                hudList.AddRow();

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[2]).Text          = "Count";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text          = "Avg/h ~5m";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "Avg/h ~1h";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[5]).Text          = "(Hrs)";
                ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                profitLossTracker.ItemsAdded  += new Action <ICollection <TrackedProfitLoss> >(profitLossTracker_ItemsAdded);
                profitLossTracker.ItemChanged += new Action <TrackedProfitLoss>(profitLossTracker_ItemChanged);
                profitLossTracker.ItemRemoved += new Action <TrackedProfitLoss>(profitLossTracker_ItemRemoved);

                inventoryTracker.ItemsAdded  += new Action <ICollection <TrackedInventory> >(consumableTracker_ItemsAdded);
                inventoryTracker.ItemChanged += new Action <TrackedInventory>(consumableTracker_ItemChanged);
                inventoryTracker.ItemRemoved += new Action <TrackedInventory>(consumableTracker_ItemRemoved);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 10
0
        void CharacterFilter_Login(object sender, Decal.Adapter.Wrappers.LoginEventArgs e)
        {
            try
            {
                var loginCommands = Settings.SettingsManager.Server.GetOnLoginCommands(CoreManager.Current.CharacterFilter.Server);

                foreach (var command in loginCommands)
                {
                    HudList.HudListRowAccessor newRow = loginList.AddRow();

                    ((HudStaticText)newRow[0]).Text  = command;
                    ((HudPictureBox)newRow[1]).Image = 0x60028FC;
                    ((HudPictureBox)newRow[2]).Image = 0x60028FD;
                    ((HudPictureBox)newRow[3]).Image = 0x60011F8;
                }

                var loginCompleteCommands = Settings.SettingsManager.Server.GetOnLoginCompleteCommands(CoreManager.Current.CharacterFilter.Server);

                foreach (var command in loginCompleteCommands)
                {
                    HudList.HudListRowAccessor newRow = loginCompleteList.AddRow();

                    ((HudStaticText)newRow[0]).Text  = command;
                    ((HudPictureBox)newRow[1]).Image = 0x60028FC;
                    ((HudPictureBox)newRow[2]).Image = 0x60028FD;
                    ((HudPictureBox)newRow[3]).Image = 0x60011F8;
                }

                var periodicCommands = Settings.SettingsManager.Server.GetPeriodicCommands(CoreManager.Current.CharacterFilter.Server);

                foreach (var command in periodicCommands)
                {
                    HudList.HudListRowAccessor newRow = periodicCommandList.AddRow();

                    ((HudStaticText)newRow[0]).Text  = command.Command;
                    ((HudStaticText)newRow[1]).Text  = command.Interval.TotalMinutes.ToString(CultureInfo.InvariantCulture);
                    ((HudStaticText)newRow[2]).Text  = command.OffsetFromMidnight.TotalMinutes.ToString(CultureInfo.InvariantCulture);
                    ((HudPictureBox)newRow[3]).Image = 0x60011F8;
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 11
0
        void consumableTracker_ItemsAdded(ICollection <TrackedInventory> items)
        {
            try
            {
                foreach (var item in items)
                {
                    int zIndex = GetZIndex(item.ObjectClass);

                    for (int row = 7; row <= hudList.RowCount; row++)
                    {
                        if (row == hudList.RowCount)
                        {
                            HudList.HudListRowAccessor newRow = hudList.AddRow();

                            ((HudPictureBox)newRow[0]).Image = item.Icon + 0x6000000;
                            ((HudStaticText)newRow[1]).Text  = item.Name;

                            ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                            cachedInventory.Add(item);

                            break;
                        }

                        if ((cachedInventory[row - 7].ObjectClass == item.ObjectClass && cachedInventory[row - 7].ItemValue < item.ItemValue) || (GetZIndex(cachedInventory[row - 7].ObjectClass) > zIndex))
                        {
                            HudList.HudListRowAccessor newRow = hudList.InsertRow(row);

                            ((HudPictureBox)newRow[0]).Image = item.Icon + 0x6000000;
                            ((HudStaticText)newRow[1]).Text  = item.Name;

                            ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                            cachedInventory.Insert(row - 7, item);

                            break;
                        }
                    }

                    UpdateInventoryItem(item);
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 12
0
        void AddOption(HudList hudList, Setting <bool> setting)
        {
            HudList.HudListRowAccessor newRow = hudList.AddRow();

            ((HudCheckBox)newRow[0]).Checked = setting.Value;
            setting.Changed += obj => { ((HudCheckBox)newRow[0]).Checked = obj.Value; };
            ((HudCheckBox)newRow[0]).Change += (s, e) =>
            {
                try
                {
                    setting.Value = ((HudCheckBox)s).Checked;
                }
                catch (Exception ex) { Debug.LogException(ex); }
            };
            ((HudStaticText)newRow[1]).Text = setting.Description;
        }
Exemplo n.º 13
0
        void TinkeringAddSelectedItem_Hit(object sender, EventArgs e)
        {
            try
            {
                if (CoreManager.Current.Actions.CurrentSelection == 0)
                {
                    return;
                }

                WorldObject wo = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];

                if (wo == null)
                {
                    return;
                }

                if (wo.ObjectClass != ObjectClass.Armor && wo.ObjectClass != ObjectClass.Clothing &&
                    wo.ObjectClass != ObjectClass.MeleeWeapon && wo.ObjectClass != ObjectClass.MissileWeapon && wo.ObjectClass != ObjectClass.WandStaffOrb &&
                    wo.ObjectClass != ObjectClass.Jewelry)
                {
                    return;
                }

                for (int row = 0; row < tinkeringList.RowCount; row++)
                {
                    int id;

                    if (int.TryParse(((HudStaticText)tinkeringList[row][6]).Text, out id) && id == wo.Id)
                    {
                        return;
                    }
                }

                HudList.HudListRowAccessor newRow = tinkeringList.AddRow();

                //((HudPictureBox)newRow[0]).Image
                ((HudPictureBox)newRow[1]).Image = wo.Icon + 0x6000000;
                ((HudStaticText)newRow[2]).Text  = wo.Name;
                //((HudStaticText)newRow[3]).Text
                //((HudStaticText)newRow[4]).Text
                ((HudPictureBox)newRow[5]).Image = 0x60011F8;
                ((HudStaticText)newRow[6]).Text  = wo.Id.ToString(CultureInfo.InvariantCulture);

                CoreManager.Current.Actions.RequestId(wo.Id);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 14
0
        public ChatLoggerGUI(ILogger <LoggedChat> logger, Settings.SettingsManager.ChatLogger.Group settings, HudList hudList)
        {
            try
            {
                this.logger   = logger;
                this.settings = settings;
                this.hudList  = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudStaticText), 75, null);
                hudList.AddColumn(typeof(HudStaticText), 500, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text = "Time";
                ((HudStaticText)newRow[1]).Text = "Message";

                logger.LogItem += new Action <LoggedChat>(chatLogger_LogItem);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 15
0
        void InventorySearch_Change(object sender, EventArgs e)
        {
            try
            {
                inventoryList.ClearRows();

                var regex = new Regex(inventorySearch.Text, RegexOptions.IgnoreCase);

                foreach (var wo in CoreManager.Current.WorldFilter.GetInventory())
                {
                    var itemInfo = new ItemInfo.ItemInfo(wo);

                    if (regex.IsMatch(itemInfo.ToString()))
                    {
                        HudList.HudListRowAccessor newRow = inventoryList.AddRow();

                        ((HudPictureBox)newRow[0]).Image = wo.Icon + 0x6000000;
                        ((HudStaticText)newRow[1]).Text  = wo.Name;
                        ((HudStaticText)newRow[2]).Text  = wo.Id.ToString(CultureInfo.InvariantCulture);
                    }
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 16
0
		public CombatTrackerGUIInfo(HudList hudList)
		{
			try
			{
				hudList.ClearColumnsAndRows();

				// Each character is a max of 6 pixels wide
				hudList.AddColumn(typeof(HudStaticText), 40, null);
				hudList.AddColumn(typeof(HudStaticText), 52, null);
				hudList.AddColumn(typeof(HudStaticText), 52, null);
				hudList.AddColumn(typeof(HudStaticText), 45, null); // This cannot go any smaller without purning labels
				hudList.AddColumn(typeof(HudStaticText), 96, null);

				HudList.HudListRowAccessor newRow;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[1]).Text = "Mel/Msl";
				((HudStaticText)newRow[1]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[2]).Text = "Magic";
				((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Attacks";
				attacksText = ((HudStaticText)newRow[4]);
				attacksText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Typeless";
				typelessMeleeMissileText = ((HudStaticText)newRow[1]);
				typelessMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				typelessMagicText = ((HudStaticText)newRow[2]);
				typelessMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Evades";
				evadesText = ((HudStaticText)newRow[4]);
				evadesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Slash";
				slashMeleeMissileText = ((HudStaticText)newRow[1]);
				slashMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				slashMagicText = ((HudStaticText)newRow[2]);
				slashMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Resists";
				resistsText = ((HudStaticText)newRow[4]);
				resistsText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Pierce";
				pierceMeleeMissileText = ((HudStaticText)newRow[1]);
				pierceMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				pierceMagicText = ((HudStaticText)newRow[2]);
				pierceMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "A.Surges";
				aSurgesText = ((HudStaticText)newRow[4]);
				aSurgesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Bludge";
				bludgeMeleeMissileText = ((HudStaticText)newRow[1]);
				bludgeMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				bludgeMagicText = ((HudStaticText)newRow[2]);
				bludgeMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "C.Surges";
				cSurgesText = ((HudStaticText)newRow[4]);
				cSurgesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Fire";
				fireMeleeMissileText = ((HudStaticText)newRow[1]);
				fireMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				fireMagicText = ((HudStaticText)newRow[2]);
				fireMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Cold";
				coldMeleeMissileText = ((HudStaticText)newRow[1]);
				coldMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				coldMagicText = ((HudStaticText)newRow[2]);
				coldMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Av/Mx";
				avgMaxText = ((HudStaticText)newRow[4]);
				avgMaxText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Acid";
				acidMeleeMissileText = ((HudStaticText)newRow[1]);
				acidMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				acidMagicText = ((HudStaticText)newRow[2]);
				acidMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Crits";
				critsText = ((HudStaticText)newRow[4]);
				critsText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Electric";
				electricMeleeMissileText = ((HudStaticText)newRow[1]);
				electricMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				electricMagicText = ((HudStaticText)newRow[2]);
				electricMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Av/Mx";
				critsAvgMaxText = ((HudStaticText)newRow[4]);
				critsAvgMaxText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

				hudList.AddRow();

				newRow = hudList.AddRow();
				((HudStaticText)newRow[0]).Text = "Total";
				totalMeleeMissileText = ((HudStaticText)newRow[1]);
				totalMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				totalMagicText = ((HudStaticText)newRow[2]);
				totalMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Total";
				totalDmgText = ((HudStaticText)newRow[4]);
				totalDmgText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
Exemplo n.º 17
0
        private void RenderKillTaskPopUp()
        {
            try
            {
                KTPopView = new HudView(KTHolder.TaskName, 320, 500, null);
                KTPopView.UserAlphaChangeable = false;
                KTPopView.ShowInBar = false;
                KTPopView.UserResizeable = true;
                KTPopView.Visible = true;
                KTPopView.Ghosted = false;
                KTPopView.UserClickThroughable = false;
                KTPopView.UserMinimizable = true;
                KTPopView.UserGhostable = false;

                KTPopTabView = new HudTabView();
                KTPopView.Controls.HeadControl = KTPopTabView;

                KTPopLayout = new HudFixedLayout();
                KTPopTabView.AddTab(KTPopLayout, "Edit");

                KTLabel1 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel1, new Rectangle(0,0,100,16));
                KTLabel1.Text = "Kill Task Name:";

                KTPopTaskName = new HudTextBox();
                KTPopLayout.AddControl(KTPopTaskName, new Rectangle(0,20,mKTSet.HudWidth, 16));
                KTPopTaskName.Text = KTHolder.TaskName;

                KTLabel2 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel2, new Rectangle(0,40,75,16));
                KTLabel2.Text = "Number:";

                KTPopCompleteCount = new HudTextBox();
                KTPopLayout.AddControl(KTPopCompleteCount, new Rectangle(80,40,220,16));
                KTPopCompleteCount.Text = KTHolder.CompleteCount.ToString();

                KTLabel3 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel3, new Rectangle(0,60,100,16));
                KTLabel3.Text = "Creature List:";

                KTPopMobsList = new HudList();
                KTPopLayout.AddControl(KTPopMobsList, new Rectangle(0,80,300,90));
                KTPopMobsList.AddColumn(typeof(HudStaticText),250,null);
                KTPopMobsList.AddColumn(typeof(HudPictureBox),16,null);

                foreach(string mob in KTHolder.MobNames)
                {
                    KTPopRow = KTPopMobsList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = mob;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopMobsList.Click += KTPopMobsList_Click;

                KTPopMobTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopMobTxt, new Rectangle(0,180,250,16));

                KTPopMobAddButton = new HudButton();
                KTPopLayout.AddControl(KTPopMobAddButton, new Rectangle(260,180,40,16));
                KTPopMobAddButton.Text = "Add";

                KTPopMobAddButton.Hit += KTPopMobAddButton_Hit;

                KTLabel4 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel4, new Rectangle(0,200,100,16));
                KTLabel4.Text = "NPC List:";

                KTPopNPCList = new HudList();
                KTPopLayout.AddControl(KTPopNPCList, new Rectangle(0,220,300,90));
                KTPopNPCList.AddColumn(typeof(HudStaticText),250,null);
                KTPopNPCList.AddColumn(typeof(HudPictureBox),16,null);

                foreach(string mob in KTHolder.NPCNames)
                {
                    KTPopRow = KTPopNPCList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = mob;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopNPCList.Click += KTPopNPCList_Click;

                KTPopNPCTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCTxt, new Rectangle(0,320,250,16));

                KTPopNPCAddButton = new HudButton();
                KTPopLayout.AddControl(KTPopNPCAddButton, new Rectangle(260,320,40,16));
                KTPopNPCAddButton.Text = "Add";

                KTPopNPCAddButton.Hit += KTPopNPCAddButton_Hit;

                KTLabel5 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel5, new Rectangle(0,340,75,16));
                KTLabel5.Text = "NPC Info:";

                KTPopNPCInfo = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCInfo, new Rectangle(80,340,220,16));
                KTPopNPCInfo.Text = KTHolder.NPCInfo;

                KTLabel6 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel6, new Rectangle(0,360,75,16));
                KTLabel6.Text = "NPC Coords:";

                KTPopNPCCoords = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCCoords, new Rectangle(80,360,220,16));
                KTPopNPCCoords.Text = KTHolder.NPCCoords;

                KTLabel7 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel7, new Rectangle(0,380,75,16));
                KTLabel7.Text = "Flag Text:";

                KTPopNPCFlagTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCFlagTxt, new Rectangle(80,380,220,16));
                KTPopNPCFlagTxt.Text = KTHolder.NPCYellowFlagText;

                KTLabel8 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel8, new Rectangle(0, 400, 75,16));
                KTLabel8.Text = "Comp. Text:";

                KTPopNPCCompleteTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCCompleteTxt, new Rectangle(80,400,220,16));
                KTPopNPCCompleteTxt.Text = KTHolder.NPCYellowCompleteText;

                KTPopView.VisibleChanged += KTPopView_VisibleChanged;

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 18
0
		void AddOption(HudList hudList, Setting<bool> setting)
		{
			HudList.HudListRowAccessor newRow = hudList.AddRow();

			((HudCheckBox)newRow[0]).Checked = setting.Value;
			setting.Changed += obj => { ((HudCheckBox)newRow[0]).Checked = obj.Value; };
			((HudCheckBox)newRow[0]).Change += (s, e) =>
			{
				try
				{
					setting.Value = ((HudCheckBox)s).Checked;
				}
				catch (Exception ex) { Debug.LogException(ex); }
			};
			((HudStaticText)newRow[1]).Text = setting.Description;

		}
Exemplo n.º 19
0
        public CombatTrackerGUIInfo(HudList hudList)
        {
            try
            {
                hudList.ClearColumnsAndRows();

                // Each character is a max of 6 pixels wide
                hudList.AddColumn(typeof(HudStaticText), 40, null);
                hudList.AddColumn(typeof(HudStaticText), 52, null);
                hudList.AddColumn(typeof(HudStaticText), 52, null);
                hudList.AddColumn(typeof(HudStaticText), 45, null);                 // This cannot go any smaller without purning labels
                hudList.AddColumn(typeof(HudStaticText), 96, null);

                HudList.HudListRowAccessor newRow;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text          = "Mel/Msl";
                ((HudStaticText)newRow[1]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[2]).Text          = "Magic";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text          = "Attacks";
                attacksText = ((HudStaticText)newRow[4]);
                attacksText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text        = "Typeless";
                typelessMeleeMissileText               = ((HudStaticText)newRow[1]);
                typelessMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                typelessMagicText = ((HudStaticText)newRow[2]);
                typelessMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Evades";
                evadesText = ((HudStaticText)newRow[4]);
                evadesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text     = "Slash";
                slashMeleeMissileText               = ((HudStaticText)newRow[1]);
                slashMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                slashMagicText = ((HudStaticText)newRow[2]);
                slashMagicText.TextAlignment    = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Resists";
                resistsText = ((HudStaticText)newRow[4]);
                resistsText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text      = "Pierce";
                pierceMeleeMissileText               = ((HudStaticText)newRow[1]);
                pierceMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                pierceMagicText = ((HudStaticText)newRow[2]);
                pierceMagicText.TextAlignment   = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "A.Surges";
                aSurgesText = ((HudStaticText)newRow[4]);
                aSurgesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text      = "Bludge";
                bludgeMeleeMissileText               = ((HudStaticText)newRow[1]);
                bludgeMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                bludgeMagicText = ((HudStaticText)newRow[2]);
                bludgeMagicText.TextAlignment   = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "C.Surges";
                cSurgesText = ((HudStaticText)newRow[4]);
                cSurgesText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text    = "Fire";
                fireMeleeMissileText               = ((HudStaticText)newRow[1]);
                fireMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                fireMagicText = ((HudStaticText)newRow[2]);
                fireMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text    = "Cold";
                coldMeleeMissileText               = ((HudStaticText)newRow[1]);
                coldMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                coldMagicText = ((HudStaticText)newRow[2]);
                coldMagicText.TextAlignment     = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Av/Mx";
                avgMaxText = ((HudStaticText)newRow[4]);
                avgMaxText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text    = "Acid";
                acidMeleeMissileText               = ((HudStaticText)newRow[1]);
                acidMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                acidMagicText = ((HudStaticText)newRow[2]);
                acidMagicText.TextAlignment     = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Crits";
                critsText = ((HudStaticText)newRow[4]);
                critsText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text        = "Electric";
                electricMeleeMissileText               = ((HudStaticText)newRow[1]);
                electricMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                electricMagicText = ((HudStaticText)newRow[2]);
                electricMagicText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Av/Mx";
                critsAvgMaxText = ((HudStaticText)newRow[4]);
                critsAvgMaxText.TextAlignment = VirindiViewService.WriteTextFormats.Right;

                hudList.AddRow();

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text     = "Total";
                totalMeleeMissileText               = ((HudStaticText)newRow[1]);
                totalMeleeMissileText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
                totalMagicText = ((HudStaticText)newRow[2]);
                totalMagicText.TextAlignment    = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text = "Total";
                totalDmgText = ((HudStaticText)newRow[4]);
                totalDmgText.TextAlignment = VirindiViewService.WriteTextFormats.Right;
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Exemplo n.º 20
0
        ////Basic function to populate the listviews.  It receives the listview name, the 
        ////list from which it is populated, and the number of columns that are displayed.
        ////For each item in the list it pulls out the variables, then sets up the lists,
        private void populateLst(HudList lstView, List<XElement> lst, int mlist)
        {
            try
            {

                lstView.ClearRows();
                string mdescr = "";
                string vcombine = "";
                string spriority = "";
                string vname = "";
                string mname = "";
                string vID = "";

                foreach (XElement element in lst)
                {
                    if (mlist == 4)
                    {
                        mchecked = Convert.ToBoolean(element.Element("Enabled").Value);
                        mname = element.Element("Name").Value.ToString().Trim();
                        spriority = element.Element("Priority").Value.ToString();

                    }
                    else if (mlist == 5)
                    {
                        //   mchecked = Convert.ToBoolean(element.Element("checked").Value);
                        vname = element.Element("Name").Value.ToString();
                        vID = element.Element("ID").Value.ToString();

                    }
                    else
                    {
                        mchecked = Convert.ToBoolean(element.Element("checked").Value);
                        vname = element.Element("key").Value.ToString();
                        if (lstView == lstNotifySalvage) { vcombine = element.Element("combine").Value.ToString(); }
                    }

                    lstView.AddRow();
                    HudList.HudListRowAccessor newRow = lstView.AddRow();
                    switch (mlist)
                    {
                        case 1:
                           ((HudCheckBox)newRow[0]).Checked = mchecked;
                           ((HudStaticText)newRow[1]).Text = vname;
                           ((HudPictureBox)newRow[2]).Image = 0x6005e6a;
                            break;
                        case 2:
                            ((HudCheckBox)newRow[0]).Checked = mchecked;
                            ((HudStaticText)newRow[1]).Text = vname;
                            ((HudStaticText)newRow[2]).Text = vcombine;
                            break;
                        case 4:
                            ((HudCheckBox)newRow[0]).Checked = mchecked;
                            ((HudStaticText)newRow[1]).Text = spriority;
                            ((HudStaticText)newRow[2]).Text = mname;
                            ((HudStaticText)newRow[3]).Text = mdescr;
                            ((HudPictureBox)newRow[4]).Image = 0x6005e6a;
                            break;
                        case 5:
                            ((HudStaticText)newRow[0]).Text = mname;
                            ((HudPictureBox)newRow[1]).Image = 0x6005e6a;
                            break;

                    }
                }
            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 21
0
        private void UpdateArmorHuds(HudList hud)
        {
            try {
            hud.ClearRows();

            HashSet<InventoryObject> SearchSet1 = new HashSet<InventoryObject>();
            HashSet<InventoryObject> SearchSet2 = new HashSet<InventoryObject>();
            HashSet<InventoryObject> SearchSet3 = new HashSet<InventoryObject>();

            if (Search.ObjectClass != AObjectClass.Unknown) { SearchSet1 = nVenTory.GetByObjectClass(Search.ObjectClass); }
            if (Search.SearchSpellIds.Count > 0) { SearchSet2.UnionWith(nVenTory.GetBySpellIds(Search.SearchSpellIds)); }
            if (Search.SearchNames.Count > 0) foreach (string name in Search.SearchNames) { SearchSet3.UnionWith(nVenTory.GetByObjectName(@name)); }
            if (Search.SearchFragments.Count > 0) foreach (string fragment in Search.SearchFragments) { SearchSet3.UnionWith(nVenTory.GetByLowercaseFragment(@fragment)); }

            if (Search.ObjectClass != AObjectClass.Unknown && SearchSet1.Count == 0) { return; }
            if (Search.SearchSpellIds.Count > 0 && SearchSet2.Count == 0) { return; }
            if ((Search.SearchNames.Count > 0 || Search.SearchFragments.Count > 0) && SearchSet3.Count == 0) { return; }

            HashSet<InventoryObject> SearchInventoryItems = new HashSet<InventoryObject>();
            if (Search.ObjectClass != AObjectClass.Unknown && Search.SearchSpellIds.Count > 0 && (Search.SearchNames.Count > 0 || Search.SearchFragments.Count > 0))
            {
                SearchInventoryItems = SearchSet1;
                SearchInventoryItems.IntersectWith(SearchSet2);
                SearchInventoryItems.IntersectWith(SearchSet3);
            }
            else if (Search.ObjectClass != AObjectClass.Unknown && Search.SearchSpellIds.Count > 0 && Search.SearchNames.Count == 0 && Search.SearchFragments.Count == 0)
            {
                SearchInventoryItems = SearchSet1;
                SearchInventoryItems.IntersectWith(SearchSet2);
            }
            else if (Search.ObjectClass != AObjectClass.Unknown && Search.SearchSpellIds.Count == 0 && (Search.SearchNames.Count > 0 || Search.SearchFragments.Count > 0))
            {
                SearchInventoryItems = SearchSet1;
                SearchInventoryItems.IntersectWith(SearchSet3);
            }
            else if (Search.ObjectClass == AObjectClass.Unknown && Search.SearchSpellIds.Count > 0 && (Search.SearchNames.Count > 0 || Search.SearchFragments.Count > 0))
            {
                SearchInventoryItems = SearchSet2;
                SearchInventoryItems.IntersectWith(SearchSet3);
            }
            else if (Search.ObjectClass != AObjectClass.Unknown && Search.SearchSpellIds.Count == 0 && Search.SearchNames.Count == 0 && Search.SearchFragments.Count == 0)
            {
                SearchInventoryItems = SearchSet1;
            }
            else if (Search.ObjectClass == AObjectClass.Unknown && Search.SearchSpellIds.Count > 0 && Search.SearchNames.Count == 0 && Search.SearchFragments.Count == 0)
            {
                SearchInventoryItems = SearchSet2;
            }
            else if (Search.ObjectClass == AObjectClass.Unknown && Search.SearchSpellIds.Count == 0 && (Search.SearchNames.Count > 0 || Search.SearchFragments.Count > 0))
            {
                SearchInventoryItems = SearchSet3;
            }

            if (Search.EquipSkill != 0) { SearchInventoryItems.RemoveWhere(x => x.EquipSkill != Search.EquipSkill); }
            if (Search.ArmorSet != 0) { SearchInventoryItems.RemoveWhere(x => x.ArmorSet != Search.ArmorSet); }
            if (Search.ArmorCoverage != 0) { SearchInventoryItems.RemoveWhere(x => x.Coverage != Search.ArmorCoverage); }
            if (Search.ArmorLevel != 0) { SearchInventoryItems.RemoveWhere(x => x.WieldReqValue != Search.ArmorLevel); }

             if (Search.ArmorRatings != 0) { SearchInventoryItems.RemoveWhere(x => x.aetherObject.Values((ALongValueKeys)Search.ArmorRatings) == 0); }
            if (Search.Material != 0) { SearchInventoryItems.RemoveWhere(x => x.Material != Search.Material); }

            if (SearchInventoryItems.Count == 0) { return; }
            HudList.HudListRowAccessor HudRow;

            foreach (InventoryObject io in SearchInventoryItems)
            {
                HudRow = hud.AddRow();
                StringConstructor sc = new StringConstructor(io);
                ((HudPictureBox)HudRow[0]).Image = io.Icon + 0x6000000;
                ((HudStaticText)HudRow[1]).Text = sc.NameInfo;
                if (sc.SetInfo.Length > 1) ((HudStaticText)HudRow[2]).Text = sc.SetInfo.Substring(1);
                if (sc.RatingsInfo.Length > 1) ((HudStaticText)HudRow[3]).Text = sc.RatingsInfo.Substring(1);
                ((HudStaticText)HudRow[4]).Text = io.OwnerOrChest;
                ((HudStaticText)HudRow[5]).Text = sc.SpellInfo;

                ((HudStaticText)HudRow[6]).Text = io.Id.ToString();
            }
            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 22
0
        //// Use this for lists simply needing a selection to be made
        private void populateLst(HudList lstView, List<IDNameLoadable> lst, int mlist)
        {
            lstView.ClearRows();

            foreach (IDNameLoadable element in lst)
            {
                try
                {
                    string vname = element.name;
                    string snum = element.ID.ToString();
                    bool mchecked = false;

                    lstView.AddRow();
                    HudList.HudListRowAccessor newRow = lstView.AddRow();

                     switch (mlist)
                    {
                        case 3:
                            ((HudCheckBox)newRow[0]).Checked = mchecked;
                            ((HudStaticText)newRow[1]).Text = vname;
                            ((HudStaticText)newRow[2]).Text = snum;

                            break;
                        case 5:
                            ((HudStaticText)newRow[0]).Text = vname;
                            ((HudStaticText)newRow[1]).Text = snum;
                            ((HudPictureBox)newRow[1]).Image = 0x6005e6a;
                            break;

                    }
                }
                catch (Exception ex) { LogError(ex); }
            }
        }
Exemplo n.º 23
0
        void AddNamesToList(string sourceName, string targetName, bool allowSorting = true)
        {
            if (String.IsNullOrEmpty(sourceName) && String.IsNullOrEmpty(targetName))
            {
                return;
            }

            // We don't add ourself to the list.
            if ((sourceName == CoreManager.Current.CharacterFilter.Name && sourceName == targetName) ||
                (sourceName == CoreManager.Current.CharacterFilter.Name && String.IsNullOrEmpty(targetName)) ||
                (String.IsNullOrEmpty(sourceName) && targetName == CoreManager.Current.CharacterFilter.Name))
            {
                return;
            }

            for (int row = 2; row <= monsterList.RowCount; row++)
            {
                // Have we reached the end of the row list? If so, we haven't found this name in the list
                if (row == monsterList.RowCount)
                {
                    HudList.HudListRowAccessor newRow = monsterList.AddRow();

                    if (String.IsNullOrEmpty(sourceName))
                    {
                        ((HudStaticText)newRow[1]).Text = targetName;
                    }
                    else if (String.IsNullOrEmpty(targetName))
                    {
                        ((HudStaticText)newRow[1]).Text = sourceName;
                    }
                    else if (sourceName == CoreManager.Current.CharacterFilter.Name)
                    {
                        ((HudStaticText)newRow[1]).Text = targetName;
                    }
                    else
                    {
                        ((HudStaticText)newRow[1]).Text = sourceName;
                    }

                    ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                    ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                    ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                    // Sort the list
                    if (allowSorting && Settings.SettingsManager.CombatTracker.SortAlphabetically.Value)
                    {
                        SortListAlphabetically();
                    }

                    break;
                }

                if (!String.IsNullOrEmpty(sourceName) && ((HudStaticText)monsterList[row][1]).Text == sourceName)
                {
                    break;
                }

                if (!String.IsNullOrEmpty(targetName) && ((HudStaticText)monsterList[row][1]).Text == targetName)
                {
                    break;
                }
            }
        }
Exemplo n.º 24
0
        private void RenderPortalGearHud()
        {
            try
            {
                if (DynamicPortalGearView != null)
                {
                    DisposePortalGearHud();
                }

                AssembleRecallSpellsList();

                int PortalHudWidth = 0;
                if(TextRecallList.Count + PortalSpellList.Count + MiscRecallList.Count > RecallSpellList.Count)
                {
                    PortalHudWidth = (TextRecallList.Count + PortalSpellList.Count + MiscRecallList.Count) * 30;
                }
                else
                {
                    PortalHudWidth = (RecallSpellList.Count) * 30;
                }
                int PortalHudHeight = 70;
                if(RecallSpellList.Count == 0)
                {
                    PortalHudHeight = 35;
                }

                DynamicPortalGearView = new VirindiViewService.HudView("", PortalHudWidth, PortalHudHeight, new ACImage(0x6AA2), false, "PortalGear");
             				DynamicPortalGearView.ShowInBar = false;
                DynamicPortalGearView.UserAlphaChangeable = false;
                DynamicPortalGearView.Visible = true;
                DynamicPortalGearView.UserClickThroughable = false;
                DynamicPortalGearView.UserGhostable = true;
                DynamicPortalGearView.UserMinimizable = true;
                DynamicPortalGearView.UserResizeable = false;
                DynamicPortalGearView.LoadUserSettings();

                DynamicPortalGearTabView = new HudTabView();
                DynamicPortalGearView.Controls.HeadControl = DynamicPortalGearTabView;

                DynamicPortalGearLayout = new HudFixedLayout();
                DynamicPortalGearTabView.AddTab(DynamicPortalGearLayout, "Portals");

               	int shiftbase = 0;
               	for(int i = 0; i < MiscRecallList.Count; i++)
                {
                    DynamicPortalGearLayout.AddControl(MiscRecallList[i].PortalIcon, new Rectangle(i*30, 0, 25, 25));
                    if(MiscRecallList[i].Identifier == "caster") VirindiViewService.TooltipSystem.AssociateTooltip(MiscRecallList[i].PortalIcon, "Select Caster");
                    if(MiscRecallList[i].Identifier == "hubgem") VirindiViewService.TooltipSystem.AssociateTooltip(MiscRecallList[i].PortalIcon, "Facility Hub Gem");
                }
               	shiftbase = MiscRecallList.Count * 30;

                //Text based recall Tiles
                for(int i = 0; i < TextRecallList.Count; i++)
                {
                    DynamicPortalGearLayout.AddControl(TextRecallList[i].PortalIcon, new Rectangle(shiftbase + i * 30, 0, 25, 25));
                    if(TextRecallList[i].Identifier == "atlifestone") VirindiViewService.TooltipSystem.AssociateTooltip(TextRecallList[i].PortalIcon, "Lifestone Recall (/@ls)");
                    if(TextRecallList[i].Identifier == "athouse") VirindiViewService.TooltipSystem.AssociateTooltip(TextRecallList[i].PortalIcon, "House Recall (/@hr)");
                    if(TextRecallList[i].Identifier == "atmansion") VirindiViewService.TooltipSystem.AssociateTooltip(TextRecallList[i].PortalIcon, "Mansion recall (/@hom)");
                    if(TextRecallList[i].Identifier == "atallegiance") VirindiViewService.TooltipSystem.AssociateTooltip(TextRecallList[i].PortalIcon, "Allegiance Hometown (/@ah)");
                    if(TextRecallList[i].Identifier == "atmarket") VirindiViewService.TooltipSystem.AssociateTooltip(TextRecallList[i].PortalIcon, "Marketplace (/@mp)");
                }
                shiftbase += TextRecallList.Count * 30;

                //Portal spell tiles
                if(PortalSpellList.Count > 0)
                {
                    for(int i = 0; i < PortalSpellList.Count; i++)
                    {
                        DynamicPortalGearLayout.AddControl(PortalSpellList[i].PortalIcon, new Rectangle(shiftbase + i * 30, 0, 25, 25));

                        if(PortalSpellList[i].Identifier == "portalrecall") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Portal Recall");
                        if(PortalSpellList[i].Identifier == "lifestonetie") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Lifestone Tie");
                        if(PortalSpellList[i].Identifier == "lifestonerecall") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Lifestone Recall");
                        if(PortalSpellList[i].Identifier == "tieportalone")  VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Tie Portal I");
                        if(PortalSpellList[i].Identifier == "recallportalone") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Recall Portal I");
                        if(PortalSpellList[i].Identifier == "summonportalone") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Summon Portal I");
                        if(PortalSpellList[i].Identifier == "tieportaltwo")  VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Tie Portal II");
                        if(PortalSpellList[i].Identifier == "recallportaltwo") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Recall Portal II");
                        if(PortalSpellList[i].Identifier == "summonportaltwo") VirindiViewService.TooltipSystem.AssociateTooltip(PortalSpellList[i].PortalIcon, "Summon Portal II");
                    }
                }

                //Recall spell tiles
                if(RecallSpellList.Count > 0)
                {
                    for(int i = 0; i < RecallSpellList.Count; i++)
                    {
                        DynamicPortalGearLayout.AddControl(RecallSpellList[i].PortalIcon, new Rectangle(i * 30, 30, 25, 25));
                        if(RecallSpellList[i].Identifier == "sanctuary") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Sanctuary Recall");
                        if(RecallSpellList[i].Identifier == "bananaland") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "BananaLand Recall");
                        if(RecallSpellList[i].Identifier == "colo")  VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Coloseum Recall");
                        if(RecallSpellList[i].Identifier == "aerlinthe") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Aerlinthe Recall");
                        if(RecallSpellList[i].Identifier == "caul") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Singularity Caul Recall");
                        if(RecallSpellList[i].Identifier == "bur") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Bur Recall");
                        if(RecallSpellList[i].Identifier == "olthoi") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Olthoi North Recall");
                        if(RecallSpellList[i].Identifier == "facility")  VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Facility Recall");
                        if(RecallSpellList[i].Identifier == "gearknight") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "GearKnight Resistance Camp Recall");
                        if(RecallSpellList[i].Identifier == "neftet") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Neftet Recall");
                        if(RecallSpellList[i].Identifier == "rynthid")  VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Rynthid Recall");
                        if(RecallSpellList[i].Identifier == "mhoire") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Mhoire Recall");
                        if(RecallSpellList[i].Identifier == "glendenwood") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Glendenwood Recall");
                        if(RecallSpellList[i].Identifier == "mtlethe") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Mount Lethe Recall");
                        if(RecallSpellList[i].Identifier == "ulgrim") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Ulgrim's Recall");
                        if(RecallSpellList[i].Identifier == "candeth") VirindiViewService.TooltipSystem.AssociateTooltip(RecallSpellList[i].PortalIcon, "Candeth Keep Recall");
                    }
                }

                DynamicPortalGearMissingLayout = new HudFixedLayout();
                DynamicPortalGearTabView.AddTab(DynamicPortalGearMissingLayout, "Missing");

                DynaicPortalGearMissingSpellsList = new HudList();
                DynamicPortalGearMissingLayout.AddControl(DynaicPortalGearMissingSpellsList, new Rectangle(0,0,DynamicPortalGearView.Width, DynamicPortalGearView.Height));
                DynaicPortalGearMissingSpellsList.AddColumn(typeof(HudStaticText),DynamicPortalGearView.Width,null);

                HudList.HudListRowAccessor nrow;
                foreach(string spell in MissingSpellsList)
                {
                    nrow = DynaicPortalGearMissingSpellsList.AddRow();
                    ((HudStaticText)nrow[0]).Text = spell;
                }

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 25
0
		void CharacterFilter_LoginComplete(object sender, EventArgs e)
		{
			try
			{
				hudView = new HudView("Mag-HUD", 200, 80, new ACImage(Color.Black), false);

				hudView.Visible = true;
				hudView.UserMinimizable = false;
				hudView.ShowIcon = false;
				hudView.UserResizeable = true;
				//View.ClickThrough = true;
				hudView.Theme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");

				hudView.LoadUserSettings();

				hudListHead = new HudList();
				hudView.Controls.HeadControl = hudListHead;

				hudListHead.Padding = 0; // Default: 1
				hudListHead.WPadding = 0; // Default: 7
				hudListHead.WPaddingOuter = 0; // Default: 3

				hudListHead.AddColumn(typeof(HudPictureBox), 16, null);
				hudListHead.AddColumn(typeof(HudStaticText), 999, null);

				HudList.HudListRowAccessor newRow = hudListHead.AddRow();
				((HudPictureBox)newRow[0]).Image = new ACImage(13107); // Major Mana Stone
				//((HudStaticText)newRow[1]).Text = "Cool Stuff Here 0 1 2 3 45 6 7 8sdf 8asdf 8asdf8asdf8asdf";

				hudUpdateTimer.Interval = 1000;
				hudUpdateTimer.Start();
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
Exemplo n.º 26
0
        private void _PopulateList(HudList target, List<IDNameLoadable> source, List<int> selected)
        {
            try
            {
                HudList.HudListRowAccessor row = new HudList.HudListRowAccessor();
             		target.ClearRows();
                foreach(IDNameLoadable entry in source)
                {
                    row = target.AddRow();
                    if (selected.Contains(entry.ID))
                    {
                        ((HudCheckBox)row[0]).Checked = true;
                        ((HudTextBox)row[1]).Text = entry.name;
                        ((HudTextBox)row[2]).Text = entry.ID.ToString();
                    }
                }

            }catch(Exception ex){LogError(ex);}
        }