コード例 #1
0
ファイル: PluginCore.cs プロジェクト: Oonej/ChaosHelper
        void LoadWindow()
        {
            // Create the view
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("ChaosHelper.mainView.xml", out properties, out controls);

            // Display the view
            view = new VirindiViewService.HudView(properties, controls);

            TabView = view != null ? (HudTabView)view["nbMain"] : new HudTabView();

            ChatCommand  = view != null ? (HudTextBox)view["ChatCommand"] : new HudTextBox();
            ConfigChoice = view != null ? (HudCombo)view["ConfigFiles"] : new HudCombo(controls);
            VersionLbl   = view != null ? (HudStaticText)view["VersionLbl"] : new HudStaticText();

            SetChatBtn      = view != null ? (HudButton)view["ChatCommandSet"] : new HudButton();
            LoadConfigBtn   = view != null ? (HudButton)view["ReloadConfig"] : new HudButton();
            SaveDefaultsBtn = view != null ? (HudButton)view["SaveIni"] : new HudButton();

            popoutList = view != null ? (HudList)view["PopoutList"] : new HudList();

            SetChatBtn.Hit      += new EventHandler(ChatCommandSet_Click);
            LoadConfigBtn.Hit   += new EventHandler(ReloadConfig_Click);
            SaveDefaultsBtn.Hit += new EventHandler(SaveIni_Click);

            view.Location = new System.Drawing.Point(locx, locy);

            TabView.OpenTabChange += new EventHandler(TabChanged);

            VersionLbl.Text  = "Version 2.2.5.0";
            ChatCommand.Text = chatLoc;
        }
コード例 #2
0
ファイル: Wrapper_MyHuds.cs プロジェクト: Kkarinisme/Mishna
 public void InitializeRawXML(Decal.Adapter.Wrappers.PluginHost p, string pXML, string pWindowKey)
 {
     VirindiViewService.XMLParsers.Decal3XMLParser ps = new VirindiViewService.XMLParsers.Decal3XMLParser();
     ViewProperties iprop;
     ControlGroup igroup;
     ps.Parse(pXML, out iprop, out igroup);
     myView = new VirindiViewService.HudView(iprop, igroup, pWindowKey);
 }
コード例 #3
0
        public void InitializeRawXML(Decal.Adapter.Wrappers.PluginHost p, string pXML, string pWindowKey)
        {
            VirindiViewService.XMLParsers.Decal3XMLParser ps = new VirindiViewService.XMLParsers.Decal3XMLParser();
            ViewProperties iprop;
            ControlGroup   igroup;

            ps.Parse(pXML, out iprop, out igroup);
            myView = new VirindiViewService.HudView(iprop, igroup, pWindowKey);
        }
コード例 #4
0
        //List<HudB>

        public PopoutWindow()
        {
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("ChaosHelper.popoutView.xml", out popoutproperties, out popoutcontrols);

            popoutview                 = new VirindiViewService.HudView(popoutproperties, popoutcontrols);
            popoutview.ShowInBar       = false;
            popoutview.Visible         = false;
            popoutview.UserMinimizable = true;

            popoutTempLayout = popoutview != null ? (HudFixedLayout)popoutview["popout"] : new HudFixedLayout();

            //popoutview.VisibleChanged += Popoutview_VisibleChanged;
        }
コード例 #5
0
        public BotManagerView(Machine machine)
        {
            try
            {
                Machine = machine;
                VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
                parser.ParseFromResource("ACManager.Views.botManagerView.xml", out ViewProperties Properties, out ControlGroup Controls);

                View = new HudView(Properties, Controls);

                ConfigTab         = new ConfigTab(this);
                PortalsTab        = new PortalsTab(this);
                GemsTab           = new GemsTab(this);
                AdvertisementsTab = new AdvertisementsTab(this);
                InventoryTab      = new InventoryTab(this);
                EquipmentTab      = new EquipmentTab(this);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
コード例 #6
0
        private void LoadWindow()
        {
            // Create the view
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("RareHunter.mainView.xml", out properties, out controls);
            view = new VirindiViewService.HudView(properties, controls);

            TabView = view != null ? (HudTabView)view["nbMain"] : new HudTabView();

            killrate      = view != null ? (HudStaticText)view["killrate"] : new HudStaticText();
            time          = view != null ? (HudStaticText)view["time"] : new HudStaticText();
            killshr       = view != null ? (HudStaticText)view["killshr"] : new HudStaticText();
            rares         = view != null ? (HudStaticText)view["rares"] : new HudStaticText();
            totalInvRares = view != null ? (HudStaticText)view["totalInvRares"] : new HudStaticText();

            broadcaststats      = view != null ? (HudButton)view["broadcaststats"] : new HudButton();
            broadcaststats.Hit += new EventHandler(BroadCastMessage);

            broadcaststatsa      = view != null ? (HudButton)view["broadcaststatsa"] : new HudButton();
            broadcaststatsa.Hit += new EventHandler(BroadCastMessagea);

            broadcaststatsf      = view != null ? (HudButton)view["broadcaststatsf"] : new HudButton();
            broadcaststatsf.Hit += new EventHandler(BroadCastMessagef);

            refreshRares      = view != null ? (HudButton)view["refreshRares"] : new HudButton();
            refreshRares.Hit += new EventHandler(CharacterFilter_LoginComplete);

            resetstats      = view != null ? (HudButton)view["resetstats"] : new HudButton();
            resetstats.Hit += new EventHandler(ResetStats);

            resetHistory      = view != null ? (HudButton)view["resetHistory"] : new HudButton();
            resetHistory.Hit += new EventHandler(resetHistoryEvent);

            exportHistory      = view != null ? (HudButton)view["exportHistory"] : new HudButton();
            exportHistory.Hit += new EventHandler(exporthistoryEvent);

            email = view != null ? (HudTextBox)view["emailValue"] : new HudTextBox();
            pass  = view != null ? (HudTextBox)view["passwordValue"] : new HudTextBox();
            port  = view != null ? (HudTextBox)view["portValue"] : new HudTextBox();
            host  = view != null ? (HudTextBox)view["hostValue"] : new HudTextBox();
            ss1   = view != null ? (HudCheckBox)view["enableSS1Value"] : new HudCheckBox();

            showAllCB         = view != null ? (HudCheckBox)view["showAll"] : new HudCheckBox();
            showAllCB.Change += new EventHandler(toggleShowAll);

            raresFound = view != null ? (HudList)view["raresFound"] : new HudList();
            totalRares = view != null ? (HudList)view["inventoryRares"] : new HudList();

            sendemail         = view != null ? (HudCheckBox)view["sendEmailValue"] : new HudCheckBox();
            sendemail.Change += new EventHandler(SendEmailChanged);

            testEmail      = view != null ? (HudButton)view["testEmail"] : new HudButton();
            testEmail.Hit += new EventHandler(TestEmail);

            saveEmail      = view != null ? (HudButton)view["emailSave"] : new HudButton();
            saveEmail.Hit += new EventHandler(SaveEmailSettings);

            saveDiscord      = view != null ? (HudButton)view["discordSave"] : new HudButton();
            saveDiscord.Hit += new EventHandler(SaveEmailSettings);

            testDiscord            = view != null ? (HudButton)view["testDiscord"] : new HudButton();
            testDiscord.Hit       += new EventHandler(TestDiscord);
            discordwebhook         = view != null ? (HudCheckBox)view["discordWebhookValue"] : new HudCheckBox();
            discordwebhook.Change += new EventHandler(SendDiscordHookChanged);

            discordurl = view != null ? (HudTextBox)view["discordWebhookURLValue"] : new HudTextBox();

            tier1cb         = view != null ? (HudCheckBox)view["notifytier1"] : new HudCheckBox();
            tier1cb.Change += new EventHandler(SaveEmailSettings);

            tier2cb         = view != null ? (HudCheckBox)view["notifytier2"] : new HudCheckBox();
            tier2cb.Change += new EventHandler(SaveEmailSettings);

            tier3cb         = view != null ? (HudCheckBox)view["notifytier3"] : new HudCheckBox();
            tier3cb.Change += new EventHandler(SaveEmailSettings);

            tier4cb         = view != null ? (HudCheckBox)view["notifytier4"] : new HudCheckBox();
            tier4cb.Change += new EventHandler(SaveEmailSettings);

            tier5cb         = view != null ? (HudCheckBox)view["notifytier5"] : new HudCheckBox();
            tier5cb.Change += new EventHandler(SaveEmailSettings);

            tier6cb         = view != null ? (HudCheckBox)view["notifytier6"] : new HudCheckBox();
            tier6cb.Change += new EventHandler(SaveEmailSettings);
        }
コード例 #7
0
ファイル: MainView.cs プロジェクト: IbespwnAC/MagTools
		public MainView()
		{
			try
			{
				// Create the view
				VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
				parser.ParseFromResource("MagTools.Views.mainView.xml", out properties, out controls);

				// Display the view
				view = new VirindiViewService.HudView(properties, controls);


				// Assign the views objects to our local variables

				// Mana Tracker
				ManaList = view != null ? (HudList)view["ManaList"] : new HudList();

				ManaTotal = view != null ? (HudStaticText)view["ManaTotal"] : new HudStaticText();
				ManaRecharge = view != null ? (HudCheckBox)view["ManaRecharge"] : new HudCheckBox();
				UnretainedTotal = view != null ? (HudStaticText)view["UnretainedTotal"] : new HudStaticText();

				// Combat Tracker
				CombatTrackerMonsterListCurrent = view != null ? (HudList)view["CombatTrackerMonsterListCurrent"] : new HudList();
				CombatTrackerDamageListCurrent = view != null ? (HudList)view["CombatTrackerDamageListCurrent"] : new HudList();
				CombatTrackerMonsterListPersistent = view != null ? (HudList)view["CombatTrackerMonsterListPersistent"] : new HudList();
				CombatTrackerDamageListPersistent = view != null ? (HudList)view["CombatTrackerDamageListPersistent"] : new HudList();

				// Combat Tracker - Options
				CombatTrackerClearCurrentStats = view != null ? (HudButton)view["CombatTrackerClearCurrentStats"] : new HudButton();
				CombatTrackerExportCurrentStats = view != null ? (HudButton)view["CombatTrackerExportCurrentStats"] : new HudButton();
				CombatTrackerClearPersistentStats = view != null ? (HudButton)view["CombatTrackerClearPersistentStats"] : new HudButton();

				CombatTrackerExportOnLogOff = view != null ? (HudCheckBox)view["CombatTrackerExportOnLogOff"] : new HudCheckBox();
				CombatTrackerPersistent = view != null ? (HudCheckBox)view["CombatTrackerPersistent"] : new HudCheckBox();
				CombatTrackerSortAlphabetically = view != null ? (HudCheckBox)view["CombatTrackerSortAlphabetically"] : new HudCheckBox();

				// Corpse Tracker
				CorpseTrackerList = view != null ? (HudList)view["CorpseTrackerList"] : new HudList();

				// Corpse Tracker - Options
				CorpseTrackerClearHistory = view != null ? (HudButton)view["CorpseTrackerClearHistory"] : new HudButton();

				CorpseTrackerEnabled = view != null ? (HudCheckBox)view["CorpseTrackerEnabled"] : new HudCheckBox();
				CorpseTrackerPersistent = view != null ? (HudCheckBox)view["CorpseTrackerPersistent"] : new HudCheckBox();
				CorpseTrackerTrackAllCorpses = view != null ? (HudCheckBox)view["CorpseTrackerTrackAllCorpses"] : new HudCheckBox();
				CorpseTrackerTrackFellowCorpses = view != null ? (HudCheckBox)view["CorpseTrackerTrackFellowCorpses"] : new HudCheckBox();
				CorpseTrackerTrackPermittedCorpses = view != null ? (HudCheckBox)view["CorpseTrackerTrackPermittedCorpses"] : new HudCheckBox();

				// Player Tracker
				PlayerTrackerList = view != null ? (HudList)view["PlayerTrackerList"] : new HudList();

				// Player Tracker - Options
				PlayerTrackerClearHistory = view != null ? (HudButton)view["PlayerTrackerClearHistory"] : new HudButton();

				PlayerTrackerEnabled = view != null ? (HudCheckBox)view["PlayerTrackerEnabled"] : new HudCheckBox();
				PlayerTrackerPersistent = view != null ? (HudCheckBox)view["PlayerTrackerPersistent"] : new HudCheckBox();

				// Consumable Tracker
				ConsumableTrackerList = view != null ? (HudList)view["ConsumableTrackerList"] : new HudList();


				// Chat Logger
				ChatLogger1List = view != null ? (HudList)view["ChatLogger1List"] : new HudList();
				ChatLogger2List = view != null ? (HudList)view["ChatLogger2List"] : new HudList();

				// Chat Logger - Options
				ChatLoggerClearHistory = view != null ? (HudButton)view["ChatLoggerClearHistory"] : new HudButton();
				ChatLoggerPersistent = view != null ? (HudCheckBox)view["ChatLoggerPersistent"] : new HudCheckBox();

				ChatGroup1OptionsList = view != null ? (HudList)view["ChatGroup1OptionsList"] : new HudList();
				ChatGroup2OptionsList = view != null ? (HudList)view["ChatGroup2OptionsList"] : new HudList();


				// Tools - Inventory
				ClipboardWornEquipment = view != null ? (HudButton)view["ClipboardWornEquipment"] : new HudButton();
				ClipboardInventoryInfo = view != null ? (HudButton)view["ClipboardInventoryInfo"] : new HudButton();

				InventorySearch = view != null ? (HudTextBox)view["InventorySearch"] : new HudTextBox();
				InventoryList = view != null ? (HudList)view["InventoryList"] : new HudList();
				InventoryItemText = view != null ? (HudStaticText)view["InventoryItemText"] : new HudStaticText();

				// Tools - Tinkering
				TinkeringAddSelectedItem = view != null ? (HudButton)view["TinkeringAddSelectedItem"] : new HudButton();

				TinkeringMaterial = view != null ? (HudCombo)view["TinkeringMaterial"] : new HudCombo(view.Controls);
				TinkeringMinimumPercent = view != null ? (HudTextBox)view["TinkeringMinimumPercent"] : new HudTextBox();
				TinkeringTargetTotalTinks = view != null ? (HudTextBox)view["TinkeringTargetTotalTinks"] : new HudTextBox();

				TinkeringStart = view != null ? (HudButton)view["TinkeringStart"] : new HudButton();
				TinkeringStop = view != null ? (HudButton)view["TinkeringStop"] : new HudButton();

				TinkeringList = view != null ? (HudList)view["TinkeringList"] : new HudList();

				// Tools - Character
				LoginText = view != null ? (HudTextBox)view["LoginText"] : new HudTextBox();
				LoginAdd = view != null ? (HudButton)view["LoginAdd"] : new HudButton();
				LoginList = view != null ? (HudList)view["LoginList"] : new HudList();

				LoginCompleteText = view != null ? (HudTextBox)view["LoginCompleteText"] : new HudTextBox();
				LoginCompleteAdd = view != null ? (HudButton)view["LoginCompleteAdd"] : new HudButton();
				LoginCompleteList = view != null ? (HudList)view["LoginCompleteList"] : new HudList();

				PeriodicCommandText = view != null ? (HudTextBox)view["PeriodicCommandText"] : new HudTextBox();
				PeriodicCommandInterval = view != null ? (HudTextBox)view["PeriodicCommandInterval"] : new HudTextBox();
				PeriodicCommandOffset = view != null ? (HudTextBox)view["PeriodicCommandOffset"] : new HudTextBox();
				PeriodicCommandAdd = view != null ? (HudButton)view["PeriodicCommandAdd"] : new HudButton();
				PeriodicCommandList = view != null ? (HudList)view["PeriodicCommandList"] : new HudList();


				// Misc - Options
				OptionList = view != null ? (HudList)view["OptionList"] : new HudList();

				OutputWindow = view != null ? (HudTextBox)view["OutputWindow"] : new HudTextBox();

				// Misc - Filters
				FiltersList = view != null ? (HudList)view["FiltersList"] : new HudList();

				// Misc - Client
				ClientRemoveFrame = view != null ? (HudCheckBox)view["ClientRemoveFrame"] : new HudCheckBox();

				ClientSetWindowPosition = view != null ? (HudButton)view["ClientSetWindowPosition"] : new HudButton();
				ClientDelWindowPosition = view != null ? (HudButton)view["ClientDelWindowPosition"] : new HudButton();
				ClientSetPosition = view != null ? (HudStaticText)view["ClientSetPosition"] : new HudStaticText();

				NoFocusFPS = view != null ? (HudTextBox)view["NoFocusFPS"] : new HudTextBox();

				// Misc - About
				VersionLabel = view != null ? (HudStaticText)view["VersionLabel"] : new HudStaticText();


				// ******************************************************
				// Link some of our controls to our configuration manager
				// ******************************************************

				// Mana Tracker
				ManaRecharge.Checked = Settings.SettingsManager.ManaManagement.AutoRecharge.Value;
				Settings.SettingsManager.ManaManagement.AutoRecharge.Changed += obj => { ManaRecharge.Checked = obj.Value; };
				ManaRecharge.Change += (s, e) => { try { Settings.SettingsManager.ManaManagement.AutoRecharge.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				// Combat Tracker
				CombatTrackerExportOnLogOff.Checked = Settings.SettingsManager.CombatTracker.ExportOnLogOff.Value;
				Settings.SettingsManager.CombatTracker.ExportOnLogOff.Changed += obj => { CombatTrackerExportOnLogOff.Checked = obj.Value; };
				CombatTrackerExportOnLogOff.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.ExportOnLogOff.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CombatTrackerPersistent.Checked = Settings.SettingsManager.CombatTracker.Persistent.Value;
				Settings.SettingsManager.CombatTracker.Persistent.Changed += obj => { CombatTrackerPersistent.Checked = obj.Value; };
				CombatTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CombatTrackerSortAlphabetically.Checked = Settings.SettingsManager.CombatTracker.SortAlphabetically.Value;
				Settings.SettingsManager.CombatTracker.SortAlphabetically.Changed += obj => { CombatTrackerSortAlphabetically.Checked = obj.Value; };
				CombatTrackerSortAlphabetically.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.SortAlphabetically.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				// Corpse Tracker
				CorpseTrackerEnabled.Checked = Settings.SettingsManager.CorpseTracker.Enabled.Value;
				Settings.SettingsManager.CorpseTracker.Enabled.Changed += obj => { CorpseTrackerEnabled.Checked = obj.Value; };
				CorpseTrackerEnabled.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.Enabled.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CorpseTrackerPersistent.Checked = Settings.SettingsManager.CorpseTracker.Persistent.Value;
				Settings.SettingsManager.CorpseTracker.Persistent.Changed += obj => { CorpseTrackerPersistent.Checked = obj.Value; };
				CorpseTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CorpseTrackerTrackAllCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Value;
				Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Changed += obj => { CorpseTrackerTrackAllCorpses.Checked = obj.Value; };
				CorpseTrackerTrackAllCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CorpseTrackerTrackFellowCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Value;
				Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Changed += obj => { CorpseTrackerTrackFellowCorpses.Checked = obj.Value; };
				CorpseTrackerTrackFellowCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				CorpseTrackerTrackPermittedCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Value;
				Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Changed += obj => { CorpseTrackerTrackPermittedCorpses.Checked = obj.Value; };
				CorpseTrackerTrackPermittedCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				// Player Tracker
				PlayerTrackerEnabled.Checked = Settings.SettingsManager.PlayerTracker.Enabled.Value;
				Settings.SettingsManager.PlayerTracker.Enabled.Changed += obj => { PlayerTrackerEnabled.Checked = obj.Value; };
				PlayerTrackerEnabled.Change += (s, e) => { try { Settings.SettingsManager.PlayerTracker.Enabled.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				PlayerTrackerPersistent.Checked = Settings.SettingsManager.PlayerTracker.Persistent.Value;
				Settings.SettingsManager.PlayerTracker.Persistent.Changed += obj => { PlayerTrackerPersistent.Checked = obj.Value; };
				PlayerTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.PlayerTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };


				// Chat Logger
				ChatLoggerPersistent.Checked = Settings.SettingsManager.ChatLogger.Persistent.Value;
				Settings.SettingsManager.ChatLogger.Persistent.Changed += obj => { ChatLoggerPersistent.Checked = obj.Value; };
				ChatLoggerPersistent.Change += (s, e) => { try { Settings.SettingsManager.ChatLogger.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Area);
				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Tells);
				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Fellowship);
				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].General);
				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Trade);
				AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Allegiance);

				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Area);
				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Tells);
				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Fellowship);
				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].General);
				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Trade);
				AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Allegiance);


				// Misc.Options
				AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.Enabled);
				AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.ShowBuffedValues);
				AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.ShowValueAndBurden);
				AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.LeftClickIdent);
				AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.AutoClipboard);

				AddOption(OptionList, Settings.SettingsManager.AutoBuySell.Enabled);
				AddOption(OptionList, Settings.SettingsManager.AutoBuySell.TestMode);

				AddOption(OptionList, Settings.SettingsManager.AutoTradeAdd.Enabled);

				AddOption(OptionList, Settings.SettingsManager.AutoTradeAccept.Enabled);

				AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootChests);
				AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootCorpses);
				AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootMyCorpses);
				AddOption(OptionList, Settings.SettingsManager.Looting.LootSalvage);

				AddOption(OptionList, Settings.SettingsManager.Tinkering.AutoClickYes);

				AddOption(OptionList, Settings.SettingsManager.InventoryManagement.InventoryLogger);
				AddOption(OptionList, Settings.SettingsManager.InventoryManagement.AetheriaRevealer);
				AddOption(OptionList, Settings.SettingsManager.InventoryManagement.HeartCarver);
				AddOption(OptionList, Settings.SettingsManager.InventoryManagement.ShatteredKeyFixer);
				AddOption(OptionList, Settings.SettingsManager.InventoryManagement.KeyRinger);

				AddOption(OptionList, Settings.SettingsManager.Misc.OpenMainPackOnLogin);
				AddOption(OptionList, Settings.SettingsManager.Misc.MaximizeChatOnLogin);
				AddOption(OptionList, Settings.SettingsManager.Misc.LogOutOnDeath);
				AddOption(OptionList, Settings.SettingsManager.Misc.DebuggingEnabled);

				OutputWindow.Text = Settings.SettingsManager.Misc.OutputTargetWindow.Value.ToString(CultureInfo.InvariantCulture);
				OutputWindow.Change += (s, e) =>
				{
					try
					{
						int value;
						if (!int.TryParse(OutputWindow.Text, out value))
							value = Settings.SettingsManager.Misc.OutputTargetWindow.DefaultValue;
						Settings.SettingsManager.Misc.OutputTargetWindow.Value = value;
					}
					catch (Exception ex) { Debug.LogException(ex); }
				};

				// Misc.Filters
				AddOption(FiltersList, Settings.SettingsManager.Filters.AttackEvades);
				AddOption(FiltersList, Settings.SettingsManager.Filters.DefenseEvades);
				AddOption(FiltersList, Settings.SettingsManager.Filters.AttackResists);
				AddOption(FiltersList, Settings.SettingsManager.Filters.DefenseResists);
				AddOption(FiltersList, Settings.SettingsManager.Filters.NPKFails);
				AddOption(FiltersList, Settings.SettingsManager.Filters.DirtyFighting);
				AddOption(FiltersList, Settings.SettingsManager.Filters.MonsterDeaths);

				AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastingMine);
				AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastingOthers);
				AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastFizzles);
				AddOption(FiltersList, Settings.SettingsManager.Filters.CompUsage);
				AddOption(FiltersList, Settings.SettingsManager.Filters.SpellExpires);

				AddOption(FiltersList, Settings.SettingsManager.Filters.HealingKitSuccess);
				AddOption(FiltersList, Settings.SettingsManager.Filters.HealingKitFail);
				AddOption(FiltersList, Settings.SettingsManager.Filters.Salvaging);
				AddOption(FiltersList, Settings.SettingsManager.Filters.SalvagingFails);
				AddOption(FiltersList, Settings.SettingsManager.Filters.AuraOfCraftman);
				AddOption(FiltersList, Settings.SettingsManager.Filters.ManaStoneUsage);

				AddOption(FiltersList, Settings.SettingsManager.Filters.TradeBuffBotSpam);
				AddOption(FiltersList, Settings.SettingsManager.Filters.FailedAssess);

				AddOption(FiltersList, Settings.SettingsManager.Filters.KillTaskComplete);
				AddOption(FiltersList, Settings.SettingsManager.Filters.VendorTells);
				AddOption(FiltersList, Settings.SettingsManager.Filters.MonsterTell);
				AddOption(FiltersList, Settings.SettingsManager.Filters.NpcChatter);
				AddOption(FiltersList, Settings.SettingsManager.Filters.MasterArbitratorSpam);
				AddOption(FiltersList, Settings.SettingsManager.Filters.AllMasterArbitratorChat);

				AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextYoureTooBusy);
				AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextCasting);
				AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextAll);

				// Misc.Client
				ClientRemoveFrame.Checked = Settings.SettingsManager.Misc.RemoveWindowFrame.Value;
				Settings.SettingsManager.Misc.RemoveWindowFrame.Changed += obj => { ClientRemoveFrame.Checked = obj.Value; };
				ClientRemoveFrame.Change += (s, e) => { try { Settings.SettingsManager.Misc.RemoveWindowFrame.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

				ClientSetWindowPosition.Hit += (s, e) => { try { Client.WindowMover.SetWindowPosition(); UpdateClientWindowPositionLabel(); } catch (Exception ex) { Debug.LogException(ex); } };
				ClientDelWindowPosition.Hit += (s, e) =>  { try { Client.WindowMover.DeleteWindowPosition(); UpdateClientWindowPositionLabel(); } catch (Exception ex) { Debug.LogException(ex); } };
				UpdateClientWindowPositionLabel();

				NoFocusFPS.Text = Settings.SettingsManager.Misc.NoFocusFPS.Value.ToString(CultureInfo.InvariantCulture);
				NoFocusFPS.Change += (s, e) =>
				{
					try
					{
						int value;
						if (!int.TryParse(NoFocusFPS.Text, out value))
							value = Settings.SettingsManager.Misc.NoFocusFPS.DefaultValue;
						Settings.SettingsManager.Misc.NoFocusFPS.Value = value;
					}
					catch (Exception ex) { Debug.LogException(ex); }
				};
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
コード例 #8
0
ファイル: AceCreator.cs プロジェクト: fartwhif/AceCreator
        public void LoadWindow()
        {
            // Create the view
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("AceCreator.mainView.xml", out properties, out controls);
            view = new VirindiViewService.HudView(properties, controls);
            // view.Title = "ACE Content Creator - Version " + typeof(AceCreator).Assembly.GetName().Version;
            // Get the file version for the notepad.
            string          assemblyFolder    = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(assemblyFolder + @"\AceCreator.dll");

            //view.Title = "ACE Content Creator - Version " + typeof(AceCreator).Assembly.GetName().Version;
            view.Title = "ACE Content Creator - Version " + myFileVersionInfo.FileVersion;

            // In order to have some sort of organization and to keep the clutter down,
            // the varibles for each tab are declared in their corresponding TabFiles, along with the other control events.

            // ***** Content Tab *****
            ChoiceJSON         = (HudCombo)view["ChoiceJSON"];
            ChoiceJSON.Change += new EventHandler(ChoiceJSON_Change);

            CommandConvertJSON      = view != null ? (HudButton)view["CommandConvertJSON"] : new HudButton();
            CommandConvertJSON.Hit += new EventHandler(ButtonConvertJSON_Click);

            ButtonOpenJSON      = view != null ? (HudButton)view["ButtonOpenJSON"] : new HudButton();
            ButtonOpenJSON.Hit += new EventHandler(ButtonOpenJSON_Click);

            ChoiceSQL         = (HudCombo)view["ChoiceSQL"];
            ChoiceSQL.Change += new EventHandler(ChoiceSQL_Change);

            CommandConvertSQL      = view != null ? (HudButton)view["CommandConvertSQL"] : new HudButton();
            CommandConvertSQL.Hit += new EventHandler(ButtonConvertSQL_Click);

            ButtonOpenSQL      = view != null ? (HudButton)view["ButtonOpenSQL"] : new HudButton();
            ButtonOpenSQL.Hit += new EventHandler(ButtonOpenSQL_Click);

            TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];

            ButtonCreateWCID      = view != null ? (HudButton)view["ButtonCreateWCID"] : new HudButton();
            ButtonCreateWCID.Hit += new EventHandler(ButtonCreateWCID_Click);

            ButtonCreateInvWCID      = view != null ? (HudButton)view["ButtonCreateInvWCID"] : new HudButton();
            ButtonCreateInvWCID.Hit += new EventHandler(ButtonCreateInvWCID_Click);

            ButtonCreateInstantWCID      = view != null ? (HudButton)view["ButtonCreateInstantWCID"] : new HudButton();
            ButtonCreateInstantWCID.Hit += new EventHandler(ButtonCreateInstantWCID_Click);

            TextboxExportJsonWCID = (HudTextBox)view["TextboxExportJsonWCID"];

            ButtonExportJSON      = view != null ? (HudButton)view["ButtonExportJSON"] : new HudButton();
            ButtonExportJSON.Hit += new EventHandler(ButtonExportJSON_Click);

            TextboxExportSQLWCID = (HudTextBox)view["TextboxExportSQLWCID"];

            ButtonExportSQL      = view != null ? (HudButton)view["ButtonExportSQL"] : new HudButton();
            ButtonExportSQL.Hit += new EventHandler(ButtonExportSQL_Click);

            ButtonYotesWCIDLookUp      = view != null ? (HudButton)view["ButtonYotesWCIDLookUp"] : new HudButton();
            ButtonYotesWCIDLookUp.Hit += new EventHandler(ButtonYotesWCIDLookUp_Click);

            ButtonPCAPSWCIDLookUp      = view != null ? (HudButton)view["ButtonPCAPSWCIDLookUp"] : new HudButton();
            ButtonPCAPSWCIDLookUp.Hit += new EventHandler(ButtonPCAPSWCIDLookUp_Click);

            LabelGetInfo = (HudStaticText)view["LabelGetInfo"];

            ButtonRemoveInstace      = view != null ? (HudButton)view["ButtonRemoveInstace"] : new HudButton();
            ButtonRemoveInstace.Hit += new EventHandler(ButtonRemoveInstace_Click);

            ButtonMyLocation      = view != null ? (HudButton)view["ButtonMyLocation"] : new HudButton();
            ButtonMyLocation.Hit += new EventHandler(ButtonMyLocation_Click);

            ButtonDeleteItem      = view != null ? (HudButton)view["ButtonDeleteItem"] : new HudButton();
            ButtonDeleteItem.Hit += new EventHandler(ButtonDeleteItem_Click);

            CommandRefreshFilesList      = view != null ? (HudButton)view["CommandRefreshFilesList"] : new HudButton();
            CommandRefreshFilesList.Hit += new EventHandler(ButtonRefreshFilesList_Click);

            ButtonGetInfo      = view != null ? (HudButton)view["ButtonGetInfo"] : new HudButton();
            ButtonGetInfo.Hit += new EventHandler(ButtonGetInfo_Click);

            // ***** LandBlocks Tab *****

            ChoiceLandblockJSON = (HudCombo)view["ChoiceLandblockJSON"];
            //ChoiceLandblockJSON.Change += new EventHandler(ChoiceLandblockJSON_Change);

            ButtonImportLandblockJSON      = view != null ? (HudButton)view["ButtonImportLandblockJSON"] : new HudButton();
            ButtonImportLandblockJSON.Hit += new EventHandler(ButtonImportLandblockJSON_Click);

            ButtonEditLandblockJSON      = view != null ? (HudButton)view["ButtonEditLandblockJSON"] : new HudButton();
            ButtonEditLandblockJSON.Hit += new EventHandler(ButtonEditLandblockJSON_Click);

            ChoiceLandblockSQL = (HudCombo)view["ChoiceLandblockSQL"];
            //ChoiceLandblockSQL.Change += new EventHandler(ChoiceLandblockSQL_Change);

            ButtonImportLandblockSQL      = view != null ? (HudButton)view["ButtonImportLandblockSQL"] : new HudButton();
            ButtonImportLandblockSQL.Hit += new EventHandler(ButtonImportLandblockSQL_Click);

            ButtonEditLandblockSQL      = view != null ? (HudButton)view["ButtonEditLandblockSQL"] : new HudButton();
            ButtonEditLandblockSQL.Hit += new EventHandler(ButtonEditLandblockSQL_Click);

            ButtonReloadLandblock      = view != null ? (HudButton)view["ButtonReloadLandblock"] : new HudButton();
            ButtonReloadLandblock.Hit += new EventHandler(ButtonReloadLandblock_Click);

            ButtonClearCache      = view != null ? (HudButton)view["ButtonClearCache"] : new HudButton();
            ButtonClearCache.Hit += new EventHandler(ButtonClearCache_Click);


            // ***** Quests/Recipes Tab *****
            ChoiceQuestJSON            = (HudCombo)view["ChoiceQuestJSON"];
            ButtonImportQuestJSON      = view != null ? (HudButton)view["ButtonImportQuestJSON"] : new HudButton();
            ButtonImportQuestJSON.Hit += new EventHandler(ButtonImportQuestJSON_Click);
            ButtonEditQuestJSON        = view != null ? (HudButton)view["ButtonEditQuestJSON"] : new HudButton();
            ButtonEditQuestJSON.Hit   += new EventHandler(ButtonEditQuestJSON_Click);

            ChoiceQuestSQL            = (HudCombo)view["ChoiceQuestSQL"];
            ButtonImportQuestSQL      = view != null ? (HudButton)view["ButtonImportQuestSQL"] : new HudButton();
            ButtonImportQuestSQL.Hit += new EventHandler(ButtonImportQuestSQL_Click);
            ButtonEditQuestSQL        = view != null ? (HudButton)view["ButtonEditQuestSQL"] : new HudButton();
            ButtonEditQuestSQL.Hit   += new EventHandler(ButtonEditQuestSQL_Click);

            ChoiceRecipeJSON            = (HudCombo)view["ChoiceRecipeJSON"];
            ButtonImportRecipeJSON      = view != null ? (HudButton)view["ButtonImportRecipeJSON"] : new HudButton();
            ButtonImportRecipeJSON.Hit += new EventHandler(ButtonImportRecipeJSON_Click);
            ButtonEditRecipeJSON        = view != null ? (HudButton)view["ButtonEditRecipeJSON"] : new HudButton();
            ButtonEditRecipeJSON.Hit   += new EventHandler(ButtonEditRecipeJSON_Click);

            ChoiceRecipeSQL            = (HudCombo)view["ChoiceRecipeSQL"];
            ButtonImportRecipeSQL      = view != null ? (HudButton)view["ButtonImportRecipeSQL"] : new HudButton();
            ButtonImportRecipeSQL.Hit += new EventHandler(ButtonImportRecipeSQL_Click);
            ButtonEditRecipeSQL        = view != null ? (HudButton)view["ButtonEditRecipeSQL"] : new HudButton();
            ButtonEditRecipeSQL.Hit   += new EventHandler(ButtonEditRecipeSQL_Click);


            // ***** Paths Tab *****
            TextBoxPathJSON          = (HudTextBox)view["TextboxPathJSON"];
            TextBoxPathSQL           = (HudTextBox)view["TextboxPathSQL"];
            TextboxPathLandBlockJSON = (HudTextBox)view["TextboxPathLandBlockJSON"];
            TextboxPathLandBlockSQL  = (HudTextBox)view["TextboxPathLandBlockSQL"];

            TextboxPathQuestJSON = (HudTextBox)view["TextboxPathQuestJSON"];
            TextboxPathQuestSQL  = (HudTextBox)view["TextboxPathQuestSQL"];

            TextboxPathRecipeJSON = (HudTextBox)view["TextboxPathRecipeJSON"];
            TextboxPathRecipeSQL  = (HudTextBox)view["TextboxPathRecipeSQL"];


            ButtonSavePaths      = view != null ? (HudButton)view["ButtonSavePaths"] : new HudButton();
            ButtonSavePaths.Hit += new EventHandler(ButtonSavePaths_Click);

            ButtonLoadINI      = view != null ? (HudButton)view["ButtonLoadINI"] : new HudButton();
            ButtonLoadINI.Hit += new EventHandler(ButtonLoadINI_Click);

            ButtonOpenINI      = view != null ? (HudButton)view["ButtonOpenINI"] : new HudButton();
            ButtonOpenINI.Hit += new EventHandler(ButtonOpenINI_Click);

            ButtonACCWiki      = view != null ? (HudButton)view["ButtonACCWiki"] : new HudButton();
            ButtonACCWiki.Hit += new EventHandler(ButtonACCWiki_Click);
        }
コード例 #9
0
        public MainView()
        {
            try
            {
                // Create the view
                VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
                parser.ParseFromResource("MagTools.Views.mainView.xml", out properties, out controls);

                // Display the view
                view = new VirindiViewService.HudView(properties, controls);


                // Assign the views objects to our local variables

                // Mana Tracker
                ManaList = view != null ? (HudList)view["ManaList"] : new HudList();

                ManaTotal       = view != null ? (HudStaticText)view["ManaTotal"] : new HudStaticText();
                ManaRecharge    = view != null ? (HudCheckBox)view["ManaRecharge"] : new HudCheckBox();
                UnretainedTotal = view != null ? (HudStaticText)view["UnretainedTotal"] : new HudStaticText();

                // Combat Tracker
                CombatTrackerMonsterListCurrent    = view != null ? (HudList)view["CombatTrackerMonsterListCurrent"] : new HudList();
                CombatTrackerDamageListCurrent     = view != null ? (HudList)view["CombatTrackerDamageListCurrent"] : new HudList();
                CombatTrackerMonsterListPersistent = view != null ? (HudList)view["CombatTrackerMonsterListPersistent"] : new HudList();
                CombatTrackerDamageListPersistent  = view != null ? (HudList)view["CombatTrackerDamageListPersistent"] : new HudList();

                // Combat Tracker - Options
                CombatTrackerClearCurrentStats    = view != null ? (HudButton)view["CombatTrackerClearCurrentStats"] : new HudButton();
                CombatTrackerExportCurrentStats   = view != null ? (HudButton)view["CombatTrackerExportCurrentStats"] : new HudButton();
                CombatTrackerClearPersistentStats = view != null ? (HudButton)view["CombatTrackerClearPersistentStats"] : new HudButton();

                CombatTrackerExportOnLogOff     = view != null ? (HudCheckBox)view["CombatTrackerExportOnLogOff"] : new HudCheckBox();
                CombatTrackerPersistent         = view != null ? (HudCheckBox)view["CombatTrackerPersistent"] : new HudCheckBox();
                CombatTrackerSortAlphabetically = view != null ? (HudCheckBox)view["CombatTrackerSortAlphabetically"] : new HudCheckBox();

                // Corpse Tracker
                CorpseTrackerList = view != null ? (HudList)view["CorpseTrackerList"] : new HudList();

                // Corpse Tracker - Options
                CorpseTrackerClearHistory = view != null ? (HudButton)view["CorpseTrackerClearHistory"] : new HudButton();

                CorpseTrackerEnabled               = view != null ? (HudCheckBox)view["CorpseTrackerEnabled"] : new HudCheckBox();
                CorpseTrackerPersistent            = view != null ? (HudCheckBox)view["CorpseTrackerPersistent"] : new HudCheckBox();
                CorpseTrackerTrackAllCorpses       = view != null ? (HudCheckBox)view["CorpseTrackerTrackAllCorpses"] : new HudCheckBox();
                CorpseTrackerTrackFellowCorpses    = view != null ? (HudCheckBox)view["CorpseTrackerTrackFellowCorpses"] : new HudCheckBox();
                CorpseTrackerTrackPermittedCorpses = view != null ? (HudCheckBox)view["CorpseTrackerTrackPermittedCorpses"] : new HudCheckBox();

                // Player Tracker
                PlayerTrackerList = view != null ? (HudList)view["PlayerTrackerList"] : new HudList();

                // Player Tracker - Options
                PlayerTrackerClearHistory = view != null ? (HudButton)view["PlayerTrackerClearHistory"] : new HudButton();

                PlayerTrackerEnabled    = view != null ? (HudCheckBox)view["PlayerTrackerEnabled"] : new HudCheckBox();
                PlayerTrackerPersistent = view != null ? (HudCheckBox)view["PlayerTrackerPersistent"] : new HudCheckBox();

                // Consumable Tracker
                ConsumableTrackerList = view != null ? (HudList)view["ConsumableTrackerList"] : new HudList();


                // Chat Logger
                ChatLogger1List = view != null ? (HudList)view["ChatLogger1List"] : new HudList();
                ChatLogger2List = view != null ? (HudList)view["ChatLogger2List"] : new HudList();

                // Chat Logger - Options
                ChatLoggerClearHistory = view != null ? (HudButton)view["ChatLoggerClearHistory"] : new HudButton();
                ChatLoggerPersistent   = view != null ? (HudCheckBox)view["ChatLoggerPersistent"] : new HudCheckBox();

                ChatGroup1OptionsList = view != null ? (HudList)view["ChatGroup1OptionsList"] : new HudList();
                ChatGroup2OptionsList = view != null ? (HudList)view["ChatGroup2OptionsList"] : new HudList();


                // Tools - Inventory
                ClipboardWornEquipment = view != null ? (HudButton)view["ClipboardWornEquipment"] : new HudButton();
                ClipboardInventoryInfo = view != null ? (HudButton)view["ClipboardInventoryInfo"] : new HudButton();

                InventorySearch   = view != null ? (HudTextBox)view["InventorySearch"] : new HudTextBox();
                InventoryList     = view != null ? (HudList)view["InventoryList"] : new HudList();
                InventoryItemText = view != null ? (HudStaticText)view["InventoryItemText"] : new HudStaticText();

                // Tools - Tinkering
                TinkeringAddSelectedItem = view != null ? (HudButton)view["TinkeringAddSelectedItem"] : new HudButton();

                TinkeringMaterial         = view != null ? (HudCombo)view["TinkeringMaterial"] : new HudCombo(view.Controls);
                TinkeringMinimumPercent   = view != null ? (HudTextBox)view["TinkeringMinimumPercent"] : new HudTextBox();
                TinkeringTargetTotalTinks = view != null ? (HudTextBox)view["TinkeringTargetTotalTinks"] : new HudTextBox();

                TinkeringStart = view != null ? (HudButton)view["TinkeringStart"] : new HudButton();
                TinkeringStop  = view != null ? (HudButton)view["TinkeringStop"] : new HudButton();

                TinkeringList = view != null ? (HudList)view["TinkeringList"] : new HudList();

                // Tools - Character
                LoginText = view != null ? (HudTextBox)view["LoginText"] : new HudTextBox();
                LoginAdd  = view != null ? (HudButton)view["LoginAdd"] : new HudButton();
                LoginList = view != null ? (HudList)view["LoginList"] : new HudList();

                LoginCompleteText = view != null ? (HudTextBox)view["LoginCompleteText"] : new HudTextBox();
                LoginCompleteAdd  = view != null ? (HudButton)view["LoginCompleteAdd"] : new HudButton();
                LoginCompleteList = view != null ? (HudList)view["LoginCompleteList"] : new HudList();

                PeriodicCommandText     = view != null ? (HudTextBox)view["PeriodicCommandText"] : new HudTextBox();
                PeriodicCommandInterval = view != null ? (HudTextBox)view["PeriodicCommandInterval"] : new HudTextBox();
                PeriodicCommandOffset   = view != null ? (HudTextBox)view["PeriodicCommandOffset"] : new HudTextBox();
                PeriodicCommandAdd      = view != null ? (HudButton)view["PeriodicCommandAdd"] : new HudButton();
                PeriodicCommandList     = view != null ? (HudList)view["PeriodicCommandList"] : new HudList();


                // Misc - Options
                OptionList = view != null ? (HudList)view["OptionList"] : new HudList();

                OutputWindow = view != null ? (HudTextBox)view["OutputWindow"] : new HudTextBox();

                // Misc - Filters
                FiltersList = view != null ? (HudList)view["FiltersList"] : new HudList();

                // Misc - Client
                ClientRemoveFrame = view != null ? (HudCheckBox)view["ClientRemoveFrame"] : new HudCheckBox();

                ClientSetWindowPosition = view != null ? (HudButton)view["ClientSetWindowPosition"] : new HudButton();
                ClientDelWindowPosition = view != null ? (HudButton)view["ClientDelWindowPosition"] : new HudButton();
                ClientSetPosition       = view != null ? (HudStaticText)view["ClientSetPosition"] : new HudStaticText();

                NoFocusFPS = view != null ? (HudTextBox)view["NoFocusFPS"] : new HudTextBox();

                // Misc - About
                VersionLabel = view != null ? (HudStaticText)view["VersionLabel"] : new HudStaticText();


                // ******************************************************
                // Link some of our controls to our configuration manager
                // ******************************************************

                // Mana Tracker
                ManaRecharge.Checked = Settings.SettingsManager.ManaManagement.AutoRecharge.Value;
                Settings.SettingsManager.ManaManagement.AutoRecharge.Changed += obj => { ManaRecharge.Checked = obj.Value; };
                ManaRecharge.Change += (s, e) => { try { Settings.SettingsManager.ManaManagement.AutoRecharge.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                // Combat Tracker
                CombatTrackerExportOnLogOff.Checked = Settings.SettingsManager.CombatTracker.ExportOnLogOff.Value;
                Settings.SettingsManager.CombatTracker.ExportOnLogOff.Changed += obj => { CombatTrackerExportOnLogOff.Checked = obj.Value; };
                CombatTrackerExportOnLogOff.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.ExportOnLogOff.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CombatTrackerPersistent.Checked = Settings.SettingsManager.CombatTracker.Persistent.Value;
                Settings.SettingsManager.CombatTracker.Persistent.Changed += obj => { CombatTrackerPersistent.Checked = obj.Value; };
                CombatTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CombatTrackerSortAlphabetically.Checked = Settings.SettingsManager.CombatTracker.SortAlphabetically.Value;
                Settings.SettingsManager.CombatTracker.SortAlphabetically.Changed += obj => { CombatTrackerSortAlphabetically.Checked = obj.Value; };
                CombatTrackerSortAlphabetically.Change += (s, e) => { try { Settings.SettingsManager.CombatTracker.SortAlphabetically.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                // Corpse Tracker
                CorpseTrackerEnabled.Checked = Settings.SettingsManager.CorpseTracker.Enabled.Value;
                Settings.SettingsManager.CorpseTracker.Enabled.Changed += obj => { CorpseTrackerEnabled.Checked = obj.Value; };
                CorpseTrackerEnabled.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.Enabled.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CorpseTrackerPersistent.Checked = Settings.SettingsManager.CorpseTracker.Persistent.Value;
                Settings.SettingsManager.CorpseTracker.Persistent.Changed += obj => { CorpseTrackerPersistent.Checked = obj.Value; };
                CorpseTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CorpseTrackerTrackAllCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Value;
                Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Changed += obj => { CorpseTrackerTrackAllCorpses.Checked = obj.Value; };
                CorpseTrackerTrackAllCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackAllCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CorpseTrackerTrackFellowCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Value;
                Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Changed += obj => { CorpseTrackerTrackFellowCorpses.Checked = obj.Value; };
                CorpseTrackerTrackFellowCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackFellowCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                CorpseTrackerTrackPermittedCorpses.Checked = Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Value;
                Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Changed += obj => { CorpseTrackerTrackPermittedCorpses.Checked = obj.Value; };
                CorpseTrackerTrackPermittedCorpses.Change += (s, e) => { try { Settings.SettingsManager.CorpseTracker.TrackPermittedCorpses.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                // Player Tracker
                PlayerTrackerEnabled.Checked = Settings.SettingsManager.PlayerTracker.Enabled.Value;
                Settings.SettingsManager.PlayerTracker.Enabled.Changed += obj => { PlayerTrackerEnabled.Checked = obj.Value; };
                PlayerTrackerEnabled.Change += (s, e) => { try { Settings.SettingsManager.PlayerTracker.Enabled.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                PlayerTrackerPersistent.Checked = Settings.SettingsManager.PlayerTracker.Persistent.Value;
                Settings.SettingsManager.PlayerTracker.Persistent.Changed += obj => { PlayerTrackerPersistent.Checked = obj.Value; };
                PlayerTrackerPersistent.Change += (s, e) => { try { Settings.SettingsManager.PlayerTracker.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };


                // Chat Logger
                ChatLoggerPersistent.Checked = Settings.SettingsManager.ChatLogger.Persistent.Value;
                Settings.SettingsManager.ChatLogger.Persistent.Changed += obj => { ChatLoggerPersistent.Checked = obj.Value; };
                ChatLoggerPersistent.Change += (s, e) => { try { Settings.SettingsManager.ChatLogger.Persistent.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Area);
                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Tells);
                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Fellowship);
                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].General);
                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Trade);
                AddOption(ChatGroup1OptionsList, Settings.SettingsManager.ChatLogger.Groups[0].Allegiance);

                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Area);
                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Tells);
                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Fellowship);
                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].General);
                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Trade);
                AddOption(ChatGroup2OptionsList, Settings.SettingsManager.ChatLogger.Groups[1].Allegiance);


                // Misc.Options
                AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.Enabled);
                AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.ShowBuffedValues);
                AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.ShowValueAndBurden);
                AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.LeftClickIdent);
                AddOption(OptionList, Settings.SettingsManager.ItemInfoOnIdent.AutoClipboard);

                AddOption(OptionList, Settings.SettingsManager.AutoBuySell.Enabled);
                AddOption(OptionList, Settings.SettingsManager.AutoBuySell.TestMode);

                AddOption(OptionList, Settings.SettingsManager.AutoTradeAdd.Enabled);

                AddOption(OptionList, Settings.SettingsManager.AutoTradeAccept.Enabled);

                AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootChests);
                AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootCorpses);
                AddOption(OptionList, Settings.SettingsManager.Looting.AutoLootMyCorpses);
                AddOption(OptionList, Settings.SettingsManager.Looting.LootSalvage);

                AddOption(OptionList, Settings.SettingsManager.Tinkering.AutoClickYes);

                AddOption(OptionList, Settings.SettingsManager.InventoryManagement.InventoryLogger);
                AddOption(OptionList, Settings.SettingsManager.InventoryManagement.AetheriaRevealer);
                AddOption(OptionList, Settings.SettingsManager.InventoryManagement.HeartCarver);
                AddOption(OptionList, Settings.SettingsManager.InventoryManagement.ShatteredKeyFixer);
                AddOption(OptionList, Settings.SettingsManager.InventoryManagement.KeyRinger);

                AddOption(OptionList, Settings.SettingsManager.Misc.OpenMainPackOnLogin);
                AddOption(OptionList, Settings.SettingsManager.Misc.MaximizeChatOnLogin);
                AddOption(OptionList, Settings.SettingsManager.Misc.LogOutOnDeath);
                AddOption(OptionList, Settings.SettingsManager.Misc.DebuggingEnabled);

                OutputWindow.Text    = Settings.SettingsManager.Misc.OutputTargetWindow.Value.ToString(CultureInfo.InvariantCulture);
                OutputWindow.Change += (s, e) =>
                {
                    try
                    {
                        int value;
                        if (!int.TryParse(OutputWindow.Text, out value))
                        {
                            value = Settings.SettingsManager.Misc.OutputTargetWindow.DefaultValue;
                        }
                        Settings.SettingsManager.Misc.OutputTargetWindow.Value = value;
                    }
                    catch (Exception ex) { Debug.LogException(ex); }
                };

                // Misc.Filters
                AddOption(FiltersList, Settings.SettingsManager.Filters.AttackEvades);
                AddOption(FiltersList, Settings.SettingsManager.Filters.DefenseEvades);
                AddOption(FiltersList, Settings.SettingsManager.Filters.AttackResists);
                AddOption(FiltersList, Settings.SettingsManager.Filters.DefenseResists);
                AddOption(FiltersList, Settings.SettingsManager.Filters.NPKFails);
                AddOption(FiltersList, Settings.SettingsManager.Filters.DirtyFighting);
                AddOption(FiltersList, Settings.SettingsManager.Filters.MonsterDeaths);

                AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastingMine);
                AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastingOthers);
                AddOption(FiltersList, Settings.SettingsManager.Filters.SpellCastFizzles);
                AddOption(FiltersList, Settings.SettingsManager.Filters.CompUsage);
                AddOption(FiltersList, Settings.SettingsManager.Filters.SpellExpires);

                AddOption(FiltersList, Settings.SettingsManager.Filters.HealingKitSuccess);
                AddOption(FiltersList, Settings.SettingsManager.Filters.HealingKitFail);
                AddOption(FiltersList, Settings.SettingsManager.Filters.Salvaging);
                AddOption(FiltersList, Settings.SettingsManager.Filters.SalvagingFails);
                AddOption(FiltersList, Settings.SettingsManager.Filters.AuraOfCraftman);
                AddOption(FiltersList, Settings.SettingsManager.Filters.ManaStoneUsage);

                AddOption(FiltersList, Settings.SettingsManager.Filters.TradeBuffBotSpam);
                AddOption(FiltersList, Settings.SettingsManager.Filters.FailedAssess);

                AddOption(FiltersList, Settings.SettingsManager.Filters.KillTaskComplete);
                AddOption(FiltersList, Settings.SettingsManager.Filters.VendorTells);
                AddOption(FiltersList, Settings.SettingsManager.Filters.MonsterTell);
                AddOption(FiltersList, Settings.SettingsManager.Filters.NpcChatter);
                AddOption(FiltersList, Settings.SettingsManager.Filters.MasterArbitratorSpam);
                AddOption(FiltersList, Settings.SettingsManager.Filters.AllMasterArbitratorChat);

                AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextYoureTooBusy);
                AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextCasting);
                AddOption(FiltersList, Settings.SettingsManager.Filters.StatusTextAll);

                // Misc.Client
                ClientRemoveFrame.Checked = Settings.SettingsManager.Misc.RemoveWindowFrame.Value;
                Settings.SettingsManager.Misc.RemoveWindowFrame.Changed += obj => { ClientRemoveFrame.Checked = obj.Value; };
                ClientRemoveFrame.Change += (s, e) => { try { Settings.SettingsManager.Misc.RemoveWindowFrame.Value = ((HudCheckBox)s).Checked; } catch (Exception ex) { Debug.LogException(ex); } };

                ClientSetWindowPosition.Hit += (s, e) => { try { Client.WindowMover.SetWindowPosition(); UpdateClientWindowPositionLabel(); } catch (Exception ex) { Debug.LogException(ex); } };
                ClientDelWindowPosition.Hit += (s, e) => { try { Client.WindowMover.DeleteWindowPosition(); UpdateClientWindowPositionLabel(); } catch (Exception ex) { Debug.LogException(ex); } };
                UpdateClientWindowPositionLabel();

                NoFocusFPS.Text    = Settings.SettingsManager.Misc.NoFocusFPS.Value.ToString(CultureInfo.InvariantCulture);
                NoFocusFPS.Change += (s, e) =>
                {
                    try
                    {
                        int value;
                        if (!int.TryParse(NoFocusFPS.Text, out value))
                        {
                            value = Settings.SettingsManager.Misc.NoFocusFPS.DefaultValue;
                        }
                        Settings.SettingsManager.Misc.NoFocusFPS.Value = value;
                    }
                    catch (Exception ex) { Debug.LogException(ex); }
                };
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
コード例 #10
0
ファイル: AceCreator.cs プロジェクト: harliq/AceCreator
        public void LoadWindow()
        {
            // Create the view
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("AceCreator.mainView.xml", out properties, out controls);
            view = new VirindiViewService.HudView(properties, controls);
            // view.Title = "ACE Content Creator - Version " + typeof(AceCreator).Assembly.GetName().Version;
            // Get the file version for the notepad.
            string          assemblyFolder    = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(assemblyFolder + @"\AceCreator.dll");

            //view.Title = "ACE Content Creator - Version " + typeof(AceCreator).Assembly.GetName().Version;
            view.Title = "ACE Content Creator - Version " + myFileVersionInfo.FileVersion;

            // In order to have some sort of organization and to keep the clutter down,
            // the varibles for each tab are declared in their corresponding TabFiles, along with the other control events.

            // ***** Content Tab *****
            ChoiceJSON         = (HudCombo)view["ChoiceJSON"];
            ChoiceJSON.Change += new EventHandler(ChoiceJSON_Change);

            CommandConvertJSON      = view != null ? (HudButton)view["CommandConvertJSON"] : new HudButton();
            CommandConvertJSON.Hit += new EventHandler(ButtonConvertJSON_Click);

            ButtonOpenJSON      = view != null ? (HudButton)view["ButtonOpenJSON"] : new HudButton();
            ButtonOpenJSON.Hit += new EventHandler(ButtonOpenJSON_Click);

            ChoiceSQL         = (HudCombo)view["ChoiceSQL"];
            ChoiceSQL.Change += new EventHandler(ChoiceSQL_Change);

            CommandConvertSQL      = view != null ? (HudButton)view["CommandConvertSQL"] : new HudButton();
            CommandConvertSQL.Hit += new EventHandler(ButtonConvertSQL_Click);

            ButtonOpenSQL      = view != null ? (HudButton)view["ButtonOpenSQL"] : new HudButton();
            ButtonOpenSQL.Hit += new EventHandler(ButtonOpenSQL_Click);

            TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];

            ButtonCreateWCID      = view != null ? (HudButton)view["ButtonCreateWCID"] : new HudButton();
            ButtonCreateWCID.Hit += new EventHandler(ButtonCreateWCID_Click);

            ButtonCreateInvWCID      = view != null ? (HudButton)view["ButtonCreateInvWCID"] : new HudButton();
            ButtonCreateInvWCID.Hit += new EventHandler(ButtonCreateInvWCID_Click);

            ButtonCreateInstantWCID      = view != null ? (HudButton)view["ButtonCreateInstantWCID"] : new HudButton();
            ButtonCreateInstantWCID.Hit += new EventHandler(ButtonCreateInstantWCID_Click);

            TextboxExportJsonWCID = (HudTextBox)view["TextboxExportJsonWCID"];

            ButtonExportJSON      = view != null ? (HudButton)view["ButtonExportJSON"] : new HudButton();
            ButtonExportJSON.Hit += new EventHandler(ButtonExportJSON_Click);

            TextboxExportSQLWCID = (HudTextBox)view["TextboxExportSQLWCID"];

            ButtonExportSQL      = view != null ? (HudButton)view["ButtonExportSQL"] : new HudButton();
            ButtonExportSQL.Hit += new EventHandler(ButtonExportSQL_Click);

            ButtonYotesWCIDLookUp      = view != null ? (HudButton)view["ButtonYotesWCIDLookUp"] : new HudButton();
            ButtonYotesWCIDLookUp.Hit += new EventHandler(ButtonYotesWCIDLookUp_Click);

            ButtonPCAPSWCIDLookUp      = view != null ? (HudButton)view["ButtonPCAPSWCIDLookUp"] : new HudButton();
            ButtonPCAPSWCIDLookUp.Hit += new EventHandler(ButtonPCAPSWCIDLookUp_Click);

            LabelGetInfo = (HudStaticText)view["LabelGetInfo"];

            ButtonRemoveInstace      = view != null ? (HudButton)view["ButtonRemoveInstace"] : new HudButton();
            ButtonRemoveInstace.Hit += new EventHandler(ButtonRemoveInstace_Click);

            ButtonMyLocation      = view != null ? (HudButton)view["ButtonMyLocation"] : new HudButton();
            ButtonMyLocation.Hit += new EventHandler(ButtonMyLocation_Click);

            ButtonDeleteItem      = view != null ? (HudButton)view["ButtonDeleteItem"] : new HudButton();
            ButtonDeleteItem.Hit += new EventHandler(ButtonDeleteItem_Click);

            CommandRefreshFilesList      = view != null ? (HudButton)view["CommandRefreshFilesList"] : new HudButton();
            CommandRefreshFilesList.Hit += new EventHandler(ButtonRefreshFilesList_Click);

            ButtonGetInfo      = view != null ? (HudButton)view["ButtonGetInfo"] : new HudButton();
            ButtonGetInfo.Hit += new EventHandler(ButtonGetInfo_Click);

            // ***** Nudge Tab *****
            ButtonNudgeN      = view != null ? (HudButton)view["ButtonNudgeN"] : new HudButton();
            ButtonNudgeN.Hit += new EventHandler(ButtonNudgeN_Click);

            ButtonNudgeNE      = view != null ? (HudButton)view["ButtonNudgeNE"] : new HudButton();
            ButtonNudgeNE.Hit += new EventHandler(ButtonNudgeNE_Click);

            ButtonNudgeE      = view != null ? (HudButton)view["ButtonNudgeE"] : new HudButton();
            ButtonNudgeE.Hit += new EventHandler(ButtonNudgeE_Click);

            ButtonNudgeSE      = view != null ? (HudButton)view["ButtonNudgeSE"] : new HudButton();
            ButtonNudgeSE.Hit += new EventHandler(ButtonNudgeSE_Click);

            ButtonNudgeS      = view != null ? (HudButton)view["ButtonNudgeS"] : new HudButton();
            ButtonNudgeS.Hit += new EventHandler(ButtonNudgeS_Click);

            ButtonNudgeSW      = view != null ? (HudButton)view["ButtonNudgeSW"] : new HudButton();
            ButtonNudgeSW.Hit += new EventHandler(ButtonNudgeSW_Click);

            ButtonNudgeW      = view != null ? (HudButton)view["ButtonNudgeW"] : new HudButton();
            ButtonNudgeW.Hit += new EventHandler(ButtonNudgeW_Click);

            ButtonNudgeNW      = view != null ? (HudButton)view["ButtonNudgeNW"] : new HudButton();
            ButtonNudgeNW.Hit += new EventHandler(ButtonNudgeNW_Click);

            ButtonNudgeUp      = view != null ? (HudButton)view["ButtonNudgeUp"] : new HudButton();
            ButtonNudgeUp.Hit += new EventHandler(ButtonNudgeUp_Click);

            ButtonNudgeDown      = view != null ? (HudButton)view["ButtonNudgeDown"] : new HudButton();
            ButtonNudgeDown.Hit += new EventHandler(ButtonNudgeDown_Click);


            TextboxNudgeValueCustom = (HudTextBox)view["TextboxNudgeValueCustom"];

            ButtonRotateN      = view != null ? (HudButton)view["ButtonRotateN"] : new HudButton();
            ButtonRotateN.Hit += new EventHandler(ButtonRotateN_Click);

            ButtonRotateE      = view != null ? (HudButton)view["ButtonRotateE"] : new HudButton();
            ButtonRotateE.Hit += new EventHandler(ButtonRotateE_Click);

            ButtonRotateS      = view != null ? (HudButton)view["ButtonRotateS"] : new HudButton();
            ButtonRotateS.Hit += new EventHandler(ButtonRotateS_Click);

            ButtonRotateW      = view != null ? (HudButton)view["ButtonRotateW"] : new HudButton();
            ButtonRotateW.Hit += new EventHandler(ButtonRotateW_Click);


            ButtonRotateNE      = view != null ? (HudButton)view["ButtonRotateNE"] : new HudButton();
            ButtonRotateNE.Hit += new EventHandler(ButtonRotateNE_Click);

            ButtonRotateSE      = view != null ? (HudButton)view["ButtonRotateSE"] : new HudButton();
            ButtonRotateSE.Hit += new EventHandler(ButtonRotateSE_Click);

            ButtonRotateSW      = view != null ? (HudButton)view["ButtonRotateSW"] : new HudButton();
            ButtonRotateSW.Hit += new EventHandler(ButtonRotateSW_Click);

            ButtonRotateNW      = view != null ? (HudButton)view["ButtonRotateNW"] : new HudButton();
            ButtonRotateNW.Hit += new EventHandler(ButtonRotateNW_Click);


            ButtonFreeRotate      = view != null ? (HudButton)view["ButtonFreeRotate"] : new HudButton();
            ButtonFreeRotate.Hit += new EventHandler(ButtonFreeRotate_Click);

            TextboxFreeRotate = (HudTextBox)view["TextboxFreeRotate"];


            ButtonNudgeHere      = view != null ? (HudButton)view["ButtonNudgeHere"] : new HudButton();
            ButtonNudgeHere.Hit += new EventHandler(ButtonNudgeHere_Click);

            ButtonRotateHere      = view != null ? (HudButton)view["ButtonRotateHere"] : new HudButton();
            ButtonRotateHere.Hit += new EventHandler(ButtonRotateHere_Click);



            // ***** LandBlocks Tab *****
            ChoiceLandblockJSON = (HudCombo)view["ChoiceLandblockJSON"];
            //ChoiceLandblockJSON.Change += new EventHandler(ChoiceLandblockJSON_Change);

            ButtonImportLandblockJSON      = view != null ? (HudButton)view["ButtonImportLandblockJSON"] : new HudButton();
            ButtonImportLandblockJSON.Hit += new EventHandler(ButtonImportLandblockJSON_Click);

            ButtonEditLandblockJSON      = view != null ? (HudButton)view["ButtonEditLandblockJSON"] : new HudButton();
            ButtonEditLandblockJSON.Hit += new EventHandler(ButtonEditLandblockJSON_Click);

            ChoiceLandblockSQL = (HudCombo)view["ChoiceLandblockSQL"];
            //ChoiceLandblockSQL.Change += new EventHandler(ChoiceLandblockSQL_Change);

            ButtonImportLandblockSQL      = view != null ? (HudButton)view["ButtonImportLandblockSQL"] : new HudButton();
            ButtonImportLandblockSQL.Hit += new EventHandler(ButtonImportLandblockSQL_Click);

            ButtonEditLandblockSQL      = view != null ? (HudButton)view["ButtonEditLandblockSQL"] : new HudButton();
            ButtonEditLandblockSQL.Hit += new EventHandler(ButtonEditLandblockSQL_Click);

            ButtonReloadLandblock      = view != null ? (HudButton)view["ButtonReloadLandblock"] : new HudButton();
            ButtonReloadLandblock.Hit += new EventHandler(ButtonReloadLandblock_Click);

            ButtonClearCache      = view != null ? (HudButton)view["ButtonClearCache"] : new HudButton();
            ButtonClearCache.Hit += new EventHandler(ButtonClearCache_Click);

            ButtonGetCurrentLandblock      = view != null ? (HudButton)view["ButtonGetCurrentLandblock"] : new HudButton();
            ButtonGetCurrentLandblock.Hit += new EventHandler(ButtonGetCurrentLandblock_Click);

            ButtonExportLandblock      = view != null ? (HudButton)view["ButtonExportLandblock"] : new HudButton();
            ButtonExportLandblock.Hit += new EventHandler(ButtonExportLandblock_Click);

            TextboxFreeRotate = (HudTextBox)view["TextboxFreeRotate"];



            // ***** Quests/Recipes Tab *****
            ChoiceQuestJSON            = (HudCombo)view["ChoiceQuestJSON"];
            ButtonImportQuestJSON      = view != null ? (HudButton)view["ButtonImportQuestJSON"] : new HudButton();
            ButtonImportQuestJSON.Hit += new EventHandler(ButtonImportQuestJSON_Click);
            ButtonEditQuestJSON        = view != null ? (HudButton)view["ButtonEditQuestJSON"] : new HudButton();
            ButtonEditQuestJSON.Hit   += new EventHandler(ButtonEditQuestJSON_Click);

            ChoiceQuestSQL            = (HudCombo)view["ChoiceQuestSQL"];
            ButtonImportQuestSQL      = view != null ? (HudButton)view["ButtonImportQuestSQL"] : new HudButton();
            ButtonImportQuestSQL.Hit += new EventHandler(ButtonImportQuestSQL_Click);
            ButtonEditQuestSQL        = view != null ? (HudButton)view["ButtonEditQuestSQL"] : new HudButton();
            ButtonEditQuestSQL.Hit   += new EventHandler(ButtonEditQuestSQL_Click);

            ChoiceRecipeJSON            = (HudCombo)view["ChoiceRecipeJSON"];
            ButtonImportRecipeJSON      = view != null ? (HudButton)view["ButtonImportRecipeJSON"] : new HudButton();
            ButtonImportRecipeJSON.Hit += new EventHandler(ButtonImportRecipeJSON_Click);
            ButtonEditRecipeJSON        = view != null ? (HudButton)view["ButtonEditRecipeJSON"] : new HudButton();
            ButtonEditRecipeJSON.Hit   += new EventHandler(ButtonEditRecipeJSON_Click);

            ChoiceRecipeSQL            = (HudCombo)view["ChoiceRecipeSQL"];
            ButtonImportRecipeSQL      = view != null ? (HudButton)view["ButtonImportRecipeSQL"] : new HudButton();
            ButtonImportRecipeSQL.Hit += new EventHandler(ButtonImportRecipeSQL_Click);

            ButtonEditRecipeSQL      = view != null ? (HudButton)view["ButtonEditRecipeSQL"] : new HudButton();
            ButtonEditRecipeSQL.Hit += new EventHandler(ButtonEditRecipeSQL_Click);


            // ***** Advanced Tab *****

            ChoiceGenerator         = (HudCombo)view["ChoiceGenerator"];
            ChoiceGenerator.Change += new EventHandler(ChoiceGenerator_Change);

            TextboxGeneratorWCID = (HudTextBox)view["TextboxGeneratorWCID"];

            ButtonCreateGenerator      = view != null ? (HudButton)view["ButtonCreateGenerator"] : new HudButton();
            ButtonCreateGenerator.Hit += new EventHandler(ButtonCreateGenerator_Click);

            ButtonEditGeneratorList      = view != null ? (HudButton)view["ButtonEditGeneratorList"] : new HudButton();
            ButtonEditGeneratorList.Hit += new EventHandler(ButtonEditGeneratorList_Click);

            ButtonRefreshGeneratorList      = view != null ? (HudButton)view["ButtonRefreshGeneratorList"] : new HudButton();
            ButtonRefreshGeneratorList.Hit += new EventHandler(ButtonRefreshGeneratorList_Click);

            ChoiceChildList         = (HudCombo)view["ChoiceChildList"];
            ChoiceChildList.Change += new EventHandler(ChoiceChildList_Change);

            ButtonGetParentGUID      = view != null ? (HudButton)view["ButtonGetParentGUID"] : new HudButton();
            ButtonGetParentGUID.Hit += new EventHandler(ButtonGetParentGUID_Click);

            ButtonLinkChild      = view != null ? (HudButton)view["ButtonLinkChild"] : new HudButton();
            ButtonLinkChild.Hit += new EventHandler(ButtonLinkChild_Click);

            TextboxParentGUID = (HudTextBox)view["TextboxParentGUID"];
            TextboxChildWCID  = (HudTextBox)view["TextboxChildWCID"];

            ButtonCreateMob      = view != null ? (HudButton)view["ButtonCreateMob"] : new HudButton();
            ButtonCreateMob.Hit += new EventHandler(ButtonCreateMob_Click);

            ButtonAdvancedRemoveInst      = view != null ? (HudButton)view["ButtonAdvancedRemoveInst"] : new HudButton();
            ButtonAdvancedRemoveInst.Hit += new EventHandler(ButtonRemoveInstace_Click);

            ButtonAdvancedAddEncounter      = view != null ? (HudButton)view["ButtonAdvancedAddEncounter"] : new HudButton();
            ButtonAdvancedAddEncounter.Hit += new EventHandler(ButtonAdvancedAddEncounter_Click);

            TextBoxEncounterWCID = (HudTextBox)view["TextBoxEncounterWCID"];

            ButtonAdvancedRemoveEncounter      = view != null ? (HudButton)view["ButtonAdvancedRemoveEncounter"] : new HudButton();
            ButtonAdvancedRemoveEncounter.Hit += new EventHandler(ButtonAdvancedRemoveEncounter_Click);

            // ***** Paths Tab *****
            TextBoxPathJSON          = (HudTextBox)view["TextboxPathJSON"];
            TextBoxPathSQL           = (HudTextBox)view["TextboxPathSQL"];
            TextboxPathLandBlockJSON = (HudTextBox)view["TextboxPathLandBlockJSON"];
            TextboxPathLandBlockSQL  = (HudTextBox)view["TextboxPathLandBlockSQL"];

            TextboxPathQuestJSON = (HudTextBox)view["TextboxPathQuestJSON"];
            TextboxPathQuestSQL  = (HudTextBox)view["TextboxPathQuestSQL"];

            TextboxPathRecipeJSON = (HudTextBox)view["TextboxPathRecipeJSON"];
            TextboxPathRecipeSQL  = (HudTextBox)view["TextboxPathRecipeSQL"];


            ButtonSavePaths      = view != null ? (HudButton)view["ButtonSavePaths"] : new HudButton();
            ButtonSavePaths.Hit += new EventHandler(ButtonSavePaths_Click);

            ButtonLoadINI      = view != null ? (HudButton)view["ButtonLoadINI"] : new HudButton();
            ButtonLoadINI.Hit += new EventHandler(ButtonLoadINI_Click);

            ButtonOpenINI      = view != null ? (HudButton)view["ButtonOpenINI"] : new HudButton();
            ButtonOpenINI.Hit += new EventHandler(ButtonOpenINI_Click);


            // ***** Help Tab *****
            ButtonACCWiki      = view != null ? (HudButton)view["ButtonACCWiki"] : new HudButton();
            ButtonACCWiki.Hit += new EventHandler(ButtonACCWiki_Click);

            ButtonACEWiki      = view != null ? (HudButton)view["ButtonACEWiki"] : new HudButton();
            ButtonACEWiki.Hit += new EventHandler(ButtonACEWiki_Click);

            // *** Making some stuff not seen ***
            // ButtonYotesWCIDLookUp.Visible = false;
            ButtonCreateMob.Visible = false;
        }
コード例 #11
0
        public static void ViewInit()
        {
            VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser();
            parser.ParseFromResource("mudsort.mainView.xml", out properties, out controls);
            View = new VirindiViewService.HudView(properties, controls);

            edtSourceContainer = View != null ? (HudTextBox)View["edtSourceContainer"]    : new HudTextBox();
            edtDestContainer   = View != null ? (HudTextBox)View["edtDestContainer"]      : new HudTextBox();
            edtInsertion       = View != null ? (HudTextBox)View["edtInsertion"]          : new HudTextBox();
            cmbObjClassFilters = View != null ? (HudCombo)View["cmbObjClassFilters"]    : new HudCombo(new ControlGroup());
            edtSortString      = View != null ? (HudTextBox)View["edtSortString"]         : new HudTextBox();
            prgProgressBar     = View != null ? (HudProgressBar)View["prgProgressBar"]        : new HudProgressBar();
            btnActivate        = View != null ? (HudButton)View["btnActivate"]           : new HudButton();

            cmbSortListFilters = View != null ? (HudCombo)View["cmbSortListFilters"] : new HudCombo(new ControlGroup());
            lstSortSettings    = View != null ? (HudList)View["lstSortSettings"]     : new HudList();

            chkIdentifyOnLogin  = View != null ? (HudCheckBox)View["chkIdentifyOnLogin"] : new HudCheckBox();
            chkReverseSortList  = View != null ? (HudCheckBox)View["chkReverseSortList"] : new HudCheckBox();
            edtSavedSortString1 = View != null ? (HudTextBox)View["edtSavedSortString1"] : new HudTextBox();
            edtSavedSortString2 = View != null ? (HudTextBox)View["edtSavedSortString2"] : new HudTextBox();
            edtSavedSortString3 = View != null ? (HudTextBox)View["edtSavedSortString3"] : new HudTextBox();

            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnSourceContainer"], "Sets the source Backpack/Person/Chest for sorting to your current Selection");
            VirindiViewService.TooltipSystem.AssociateTooltip(edtSourceContainer, "The Backpack/Person/Chest the items will move from when sorted (Default = Your Character ID)");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnDestContainer"], "Sets the destination Backpack/Person/Chest for sorting to your current Selection");
            VirindiViewService.TooltipSystem.AssociateTooltip(edtDestContainer, "The Backpack/Person/Chest the items will move to when sorted (Default = Your Character ID)");
            VirindiViewService.TooltipSystem.AssociateTooltip(edtInsertion, "The slot # you wish to start inserting at when sorting (Default = 0)");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySortString"], "Copies the Sort String below to your clipboard");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSortString"], "Pastes the contents of your clipboard into the box below");
            VirindiViewService.TooltipSystem.AssociateTooltip(edtSortString, "The Sort String to use when sorting. (Use Build tab to create a new one)");
            VirindiViewService.TooltipSystem.AssociateTooltip(cmbObjClassFilters, "Limit sorting to specific types of items");
            VirindiViewService.TooltipSystem.AssociateTooltip(btnActivate, "Begins the sorting process. Press again to cancel.");

            VirindiViewService.TooltipSystem.AssociateTooltip(cmbSortListFilters, "Limit filter based on key type");

            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderCode"], "Sort Flag Code (Used in Sort String)");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderName"], "Sort Flag Name");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderUp"], "Increase Sort Flag Priority");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderDown"], "Lower Sort Flag Priority");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderAdd"], "Add/Remove Sort Flag");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderOrder"], "Change Sort Flag Order (Trailing - in Sort String)");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderKey"], "Sort Flag Key Type");

            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPropertyDump"], "Dump ALL properties of Selected Item to chat");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString1"], "Saved Sort String #1");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString1"], "Copy Saved Sort String #1 to clipboard");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString1"], "Paste contents of Clipboard into Saved Sort String #1");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString2"], "Saved Sort String #2");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString2"], "Copy Saved Sort String #2 to clipboard");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString2"], "Paste contents of Clipboard into Saved Sort String #2");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString3"], "Saved Sort String #3");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString3"], "Copy Saved Sort String #3 to clipboard");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString3"], "Paste contents of Clipboard into Saved Sort String #3");
            VirindiViewService.TooltipSystem.AssociateTooltip(View["btnSaveSettings"], "Save all settings");

            if (View != null)
            {
                View.UserResizeable = true;

                chkIdentifyOnLogin.Checked = Properties.Settings.Default.IdentifyOnLogin;
                chkReverseSortList.Checked = Properties.Settings.Default.ReverseSortList;
                edtSortString.Text         = Properties.Settings.Default.DefaultSortString;
                edtSavedSortString1.Text   = Properties.Settings.Default.SavedSortString1;
                edtSavedSortString2.Text   = Properties.Settings.Default.SavedSortString2;
                edtSavedSortString3.Text   = Properties.Settings.Default.SavedSortString3;

                View["btnSourceContainer"].Hit += (s, e) =>
                {
                    PluginCore.getInstance().setSourceContainer();
                };

                View["btnDestContainer"].Hit += (s, e) =>
                {
                    PluginCore.getInstance().setDestContainer();
                };

                View["edtInsertion"].KeyEvent += (s, e) =>
                {
                    int slot = 0;
                    try
                    {
                        slot = Convert.ToInt32(((HudTextBox)View["edtInsertion"]).Text);
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                    PluginCore.getInstance().containerDestSlot = slot;
                };

                View["edtSortString"].KeyEvent += (s, e) =>
                {
                    try
                    {
                        Properties.Settings.Default.DefaultSortString = MainView.edtSortString.Text;
                        Properties.Settings.Default.Save();
                        PluginCore.getInstance().createSortFlagListFromString(((HudTextBox)View["edtSortString"]).Text);
                        PluginCore.getInstance().rebuildLstSortSettings();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnCopySortString"].Hit += (s, e) =>
                {
                    try { System.Windows.Forms.Clipboard.SetText(edtSortString.Text); }catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnPasteSortString"].Hit += (s, e) =>
                {
                    edtSortString.Text = System.Windows.Forms.Clipboard.GetText();
                    PluginCore.getInstance().createSortFlagListFromString(edtSortString.Text);
                    PluginCore.getInstance().rebuildLstSortSettings();
                };

                View["btnActivate"].Hit += (s, e) =>
                {
                    if (((HudButton)View["btnActivate"]).Text.Equals("Cancel"))
                    {
                        ((HudButton)View["btnActivate"]).Text = "Activate";
                        PluginCore.getInstance().cancel();
                    }
                    else
                    {
                        ((HudButton)View["btnActivate"]).Text = "Cancel";
                        PluginCore.getInstance().activate();
                    }
                };

                ((HudCombo)View["cmbSortListFilters"]).Change += (s, e) =>
                {
                    PluginCore.getInstance().createSortFlagListFromString(edtSortString.Text);
                    PluginCore.getInstance().rebuildLstSortSettings();
                };


                ((HudList)View["lstSortSettings"]).Click += new HudList.delClickedControl(lstSortSettings_Selected);

                ((HudCheckBox)View["chkIdentifyOnLogin"]).Change += (s, e) =>
                {
                    Properties.Settings.Default.IdentifyOnLogin = ((HudCheckBox)View["chkIdentifyOnLogin"]).Checked;
                    Properties.Settings.Default.Save();
                };

                ((HudCheckBox)View["chkReverseSortList"]).Change += (s, e) =>
                {
                    Properties.Settings.Default.ReverseSortList = ((HudCheckBox)View["chkReverseSortList"]).Checked;
                    Properties.Settings.Default.Save();
                };

                View["btnPropertyDump"].Hit += (s, e) =>
                {
                    try
                    {
                        foreach (SortFlag sf in SortFlag.sortedFlagList.Values)
                        {
                            sf.propertyDumpSelection();
                        }
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                edtSavedSortString1.KeyEvent += (s, e) =>
                {
                    try
                    {
                        Properties.Settings.Default.SavedSortString1 = edtSavedSortString1.Text;
                        Properties.Settings.Default.Save();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                edtSavedSortString2.KeyEvent += (s, e) =>
                {
                    try
                    {
                        Properties.Settings.Default.SavedSortString2 = edtSavedSortString2.Text;
                        Properties.Settings.Default.Save();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                edtSavedSortString3.KeyEvent += (s, e) =>
                {
                    try
                    {
                        Properties.Settings.Default.SavedSortString3 = edtSavedSortString3.Text;
                        Properties.Settings.Default.Save();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnCopySavedSortString1"].Hit += (s, e) =>
                {
                    try
                    {
                        System.Windows.Forms.Clipboard.SetText(edtSavedSortString1.Text);
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnPasteSavedSortString1"].Hit += (s, e) =>
                {
                    try
                    {
                        edtSavedSortString1.Text = System.Windows.Forms.Clipboard.GetText();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnCopySavedSortString2"].Hit += (s, e) =>
                {
                    try
                    {
                        System.Windows.Forms.Clipboard.SetText(edtSavedSortString2.Text);
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnPasteSavedSortString2"].Hit += (s, e) =>
                {
                    try
                    {
                        edtSavedSortString2.Text = System.Windows.Forms.Clipboard.GetText();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnCopySavedSortString3"].Hit += (s, e) =>
                {
                    try
                    {
                        System.Windows.Forms.Clipboard.SetText(edtSavedSortString3.Text);
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnPasteSavedSortString3"].Hit += (s, e) =>
                {
                    try
                    {
                        edtSavedSortString3.Text = System.Windows.Forms.Clipboard.GetText();
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };

                View["btnSaveSettings"].Hit += (s, e) =>
                {
                    try
                    {
                        Properties.Settings.Default.Save();
                        Util.WriteToChat("Settings Saved!");
                    }
                    catch (Exception ex) { Util.LogError(ex); }
                };
            }
        }