public static void ViewInit()
        {
            try
            {
                Deadeye.PrintMessageToWindow("Deadeye Starting!");
                View = MyClasses.MetaViewWrappers.ViewSystemSelector.CreateViewResource(PluginCore.MyHost, "ExamplePlugin.ViewXML.testlayout.xml");
                bSelectCraftOutput = (MyClasses.MetaViewWrappers.IButton)View["bSelectCraftOutput"];
                bSelectCraftInputA = (MyClasses.MetaViewWrappers.IButton)View["bSelectCraftInputA"];
                bSelectCraftInputB = (MyClasses.MetaViewWrappers.IButton)View["bSelectCraftInputB"];
                bToggleStartStop   = (MyClasses.MetaViewWrappers.IButton)View["bToggleStartStop"];

                txtCraftOutput = (MyClasses.MetaViewWrappers.ITextBox)View["txtCraftOutput"];
                txtLow         = (MyClasses.MetaViewWrappers.IStaticText)View["txtLow"];
                txtCraftInputA = (MyClasses.MetaViewWrappers.ITextBox)View["txtCraftInputA"];
                txtCraftInputB = (MyClasses.MetaViewWrappers.ITextBox)View["txtCraftInputB"];

                txtCommandOnLogin  = (MyClasses.MetaViewWrappers.ITextBox)View["txtCommandOnLogin"];
                chkStartOnLogin    = (MyClasses.MetaViewWrappers.ICheckBox)View["chkStartOnLogin"];
                chkLifetankOnLogin = (MyClasses.MetaViewWrappers.ICheckBox)View["chkLifetankOnLogin"];

                sldLow         = (MyClasses.MetaViewWrappers.ISlider)View["sldLow"];
                sldLow.Change += new EventHandler <MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(sldLow_Change);

                bSelectCraftOutput.Hit += new EventHandler(bSelectCraftOutput_Hit);
                bSelectCraftInputA.Hit += new EventHandler(bSelectCraftInputA_Hit);
                bSelectCraftInputB.Hit += new EventHandler(bSelectCraftInputB_Hit);

                chkLifetankOnLogin.Change += ChkLifetankOnLogin_Change;
                chkStartOnLogin.Change    += ChkStartOnLogin_Change;
                txtCommandOnLogin.Change  += TxtCommandOnLogin_Change;

                PluginCore.MyCore.CharacterFilter.Logoff += CharacterFilter_Logoff;

                bToggleStartStop.Hit += new EventHandler(bToggleStartStop_Hit);

                loadConfig();

                IsEnabled = DeadeyeSettings.startThisOnLogin;

                Deadeye.AddEventHandlers(DeadeyeSettings.startLtOnLogin, DeadeyeSettings.startCmdOnLogin);

                initTimer();

                if (IsEnabled)
                {
                    StartAutoFletcher();
                }
            }
            catch
            {
                Deadeye.PrintMessageToWindow("Unknown issue starting");
            }
        }
Пример #2
0
        void ViewInit()
        {
            try
            {

                //Create view here
                View = MyClasses.MetaViewWrappers.ViewSystemSelector.CreateViewResource(PluginCore.host, "Handyman.Views.MainView.xml");
                VirindiViewService.ViewProperties myprop = new ViewProperties();

                chkEnabled = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnabled"];
                chkArmorTink = (MyClasses.MetaViewWrappers.ICheckBox)View["chkArmorTink"];
                chkItemTink = (MyClasses.MetaViewWrappers.ICheckBox)View["chkItemTink"];
                chkMagicItemTink = (MyClasses.MetaViewWrappers.ICheckBox)View["chkMagicItemTink"];
                chkWeaponTink = (MyClasses.MetaViewWrappers.ICheckBox)View["chkWeaponTink"];
                chkSalvaging = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSalvaging"];
             //   chkSetUst = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetUst"];
                chkAlchemy = (MyClasses.MetaViewWrappers.ICheckBox)View["chkAlchemy"];
             //   chkSetFocusingStone = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetFocusingStone"];
                chkCooking = (MyClasses.MetaViewWrappers.ICheckBox)View["chkCooking"];
                chkFletching = (MyClasses.MetaViewWrappers.ICheckBox)View["chkFletching"];
                chkLockpick = (MyClasses.MetaViewWrappers.ICheckBox)View["chkLockpick"];
                //chkTier4Rares = (MyClasses.MetaViewWrappers.ICheckBox)View["chkTier4Rares"];

                chkBuffsEnabled = (MyClasses.MetaViewWrappers.ICheckBox)View["chkBuffsEnabled"];
                chkBuffOnStart = (MyClasses.MetaViewWrappers.ICheckBox)View["chkBuffOnStart"];
                chkUseBeers = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseBeers"];
                chkUseRares = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseRares"];
                chkUseBuffBot = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseBuffBot"];
                chkSetBuffingWand = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetBuffingWand"];
                chkUseLevelVIIBuffs = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseLevelVIIBuffs"];
                chkUseLevelVIIIBuffs = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseLevelVIIIBuffs"];

                chkLogOff = (MyClasses.MetaViewWrappers.ICheckBox)View["chkLogOff"];
                //chkUseCharge = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseCharge"];
                //chkEquip = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEquip"];
                //chkUseWeb = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseWeb"];
                chkRareAllegChan = (MyClasses.MetaViewWrappers.ICheckBox)View["chkRareAllegChan"];
                chkRareTradeChan = (MyClasses.MetaViewWrappers.ICheckBox)View["chkRareTradeChan"];
                chkEnableMail = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnableMail"];
                chkEnterSpamMail = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnterSpamMail"];
                chkEnterSpamRare = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnterSpamRare"];

                //chkCalcMajors = (MyClasses.MetaViewWrappers.ICheckBox)View["chkCalcMajors"];
                //chkJourneymanPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkJourneymanPet"];
                //chkArtisanPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkArtisanPet"];
                //chkMasterPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkMasterPet"];

                listMessages = (MyClasses.MetaViewWrappers.IList)View["listMessages"];
                listReturn = (MyClasses.MetaViewWrappers.IList)View["listReturn"];

            //    btnCheckVersion = (MyClasses.MetaViewWrappers.IButton)View["btnCheckVersion"];
                btnClearMessages = (MyClasses.MetaViewWrappers.IButton)View["btnClearMessages"];
                btnAddReturn = (MyClasses.MetaViewWrappers.IButton)View["btnAddReturn"];
                btnRemoveReturn = (MyClasses.MetaViewWrappers.IButton)View["btnRemoveReturn"];

                txtReturnTo = (MyClasses.MetaViewWrappers.ITextBox)View["txtReturnTo"];

                chkEnabled.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnabled_Change);
                chkArmorTink.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkArmorTink_Change);
                chkItemTink.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkItemTink_Change);
                chkWeaponTink.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkWeaponTink_Change);
                chkMagicItemTink.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkMagicItemTink_Change);
                chkSalvaging.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSalvaging_Change);
                //chkSetUst.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSetUst_Change);
                //chkSetFocusingStone.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSetFocusingStone_Change);
                chkAlchemy.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkAlchemy_Change);
                chkCooking.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkCooking_Change);
                chkFletching.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkFletching_Change);
                chkLockpick.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkLockpick_Change);
                //chkTier4Rares.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkTier4Rares_Change);

                chkBuffsEnabled.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffsEnabled_Change);
                chkBuffOnStart.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffOnStart_Change);
                chkUseBeers.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseBeers_Change);
                chkUseRares.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseRares_Change);
                chkUseBuffBot.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseBuffBot_Change);
                chkSetBuffingWand.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffingWand_Change);
              //  chkUseLevelVIIBuffs.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseLevelVIIBuffs_Change);
             //   chkUseLevelVIIIBuffs.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseLevelVIIIBuffs_Change);

                chkLogOff.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkLogOff_Change);
                //chkUseCharge.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseCharge_Change);
                //chkEquip.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEquip_Change);
                //chkUseWeb.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseWeb_Change);
                chkRareAllegChan.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkRareAllegChan_Change);
                chkRareTradeChan.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkRareTradeChan_Change);
                chkEnableMail.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnableMail_Change);
                chkEnterSpamMail.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnterSpamMail_Change);
                chkEnterSpamRare.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnterSpamRare_Change);

                //chkCalcMajors.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkCalcMajors_Change);
                //chkJourneymanPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkJourneymanPet_Change);
                //chkArtisanPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkArtisanPet_Change);
                //chkMasterPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkMasterPet_Change);

            //    Decal.Adapter.CoreManager.Current.ItemSelected += new EventHandler<ItemSelectedEventArgs>(Current_ItemSelected);
                CraftbotMasterTimer.Tick += new EventHandler(CraftbotMasterTimer_Tick);
                Core.CharacterFilter.ActionComplete += new EventHandler(CharacterFilter_ActionComplete);
                Core.ChatBoxMessage += new EventHandler<Decal.Adapter.ChatTextInterceptEventArgs>(Core_ChatBoxMessage);
                Core.WorldFilter.EnterTrade += new EventHandler<Decal.Adapter.Wrappers.EnterTradeEventArgs>(WorldFilter_EnterTrade);
                Core.WorldFilter.AddTradeItem += new EventHandler<AddTradeItemEventArgs>(WorldFilter_AddTradeItem);
               //     Core.WindowMessage += new EventHandler<WindowMessageEventArgs>(Core_WindowMessage);

                //btnCheckVersion.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnCheckVersion_Click);
                //btnClearMessages.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnClearMessages_Click);
                //btnAddReturn.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnAddReturn_Click);
                //btnRemoveReturn.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnRemoveReturn_Click);

                //listMessages.Selected += new EventHandler<MVListSelectEventArgs>(listMessages_Selected);
                //listReturn.Selected += new EventHandler<MVListSelectEventArgs>(listReturn_Selected);

                //txtReturnTo.End += new EventHandler<MVTextBoxEndEventArgs>(txtReturnTo_End);

            }

            catch (Exception ex) { Util.LogError(ex); }
        }
Пример #3
0
        //MyClasses.MetaViewWrappers.IList ToonAttributes;
        void ViewInit()
        {
            try
            {

                //Create view here
                View = MyClasses.MetaViewWrappers.ViewSystemSelector.CreateViewResource(PluginCore.host, "Mishna.Views.mainView.xml");

                btnGetInventory = (MyClasses.MetaViewWrappers.IButton)View["btnGetInventory"];
                btnUpdateInventory = (MyClasses.MetaViewWrappers.IButton)View["btnUpdateInventory"];
                btnGetBurden = (MyClasses.MetaViewWrappers.IButton)View["btnGetBurden"];
               //          btnGetToonArmor = (MyClasses.MetaViewWrappers.IButton)View["btnGetToonArmor"];
                btnGetToonStats = (MyClasses.MetaViewWrappers.IButton)View["btnGetToonStats"];
                btnLstInventory = (MyClasses.MetaViewWrappers.IButton)View["btnLstInventory"];
                btnClrInventory = (MyClasses.MetaViewWrappers.IButton)View["btnClrInventory"];

                cmbSelectClass = (MyClasses.MetaViewWrappers.ICombo)View["cmbSelectClass"];
                cmbSelectClass.Selected = 0;
                cmbWieldAttrib = (MyClasses.MetaViewWrappers.ICombo)View["cmbWieldAttrib"];
                cmbWieldAttrib.Selected = 0;
                cmbDamageType = (MyClasses.MetaViewWrappers.ICombo)View["cmbDamageType"];
                cmbDamageType.Selected = 0;
               cmbLevel = (MyClasses.MetaViewWrappers.ICombo)View["cmbLevel"];
                cmbLevel.Selected = 0;
                cmbArmorSet = (MyClasses.MetaViewWrappers.ICombo)View["cmbArmorSet"];
                cmbArmorSet.Selected = 0;
                cmbMaterial = (MyClasses.MetaViewWrappers.ICombo)View["cmbMaterial"];
                cmbMaterial.Selected = 0;
                cmbCoverage = (MyClasses.MetaViewWrappers.ICombo)View["cmbCoverage"];
                cmbCoverage.Selected = 0;
                cmbArmorLevel = (MyClasses.MetaViewWrappers.ICombo)View["cmbArmorLevel"];
                cmbArmorLevel.Selected = 0;
                cmbSalvWork = (MyClasses.MetaViewWrappers.ICombo)View["cmbSalvWork"];
                cmbSalvWork.Selected = 0;
                cmbEmbue = (MyClasses.MetaViewWrappers.ICombo)View["cmbEmbue"];
                cmbEmbue.Selected = 0;

                chkInventory = (MyClasses.MetaViewWrappers.ICheckBox)View["chkInventory"];
                chkInventory.Checked = binventoryEnabled;
                chkInventoryBurden = (MyClasses.MetaViewWrappers.ICheckBox)View["chkInventoryBurden"];
                chkInventoryBurden.Checked = binventoryBurdenEnabled;
                chkInventoryComplete = (MyClasses.MetaViewWrappers.ICheckBox)View["chkInventoryComplete"];
                chkInventoryComplete.Checked = binventoryCompleteEnabled;
                chkInventoryWaiting = (MyClasses.MetaViewWrappers.ICheckBox)View["chkInventoryWaiting"];
                chkInventoryWaiting.Checked = binventoryWaitingEnabled;
                chkToonStats = (MyClasses.MetaViewWrappers.ICheckBox)View["chkToonStats"];
                chkToonStats.Checked = btoonStatsEnabled;
                //chkToonArmor = (MyClasses.MetaViewWrappers.ICheckBox)View["chkToonArmor"];
                //chkToonArmor.Checked = btoonArmorEnabled;
                chkQuickSlotsv = (MyClasses.MetaViewWrappers.ICheckBox)View["chkQuickSlotsv"];
                chkQuickSlotsv.Checked = bquickSlotsvEnabled;
                chkQuickSlotsh = (MyClasses.MetaViewWrappers.ICheckBox)View["chkQuickSlotsh"];
                chkQuickSlotsh.Checked = bquickSlotshEnabled;

                lstInventory = (MyClasses.MetaViewWrappers.IList)View["lstInventory"];

                txbSelect = (MyClasses.MetaViewWrappers.ITextBox)View["txbSelect"];

                lblWeapons = (MyClasses.MetaViewWrappers.IStaticText)View["lblWeapons"];
                lblArmor = (MyClasses.MetaViewWrappers.IStaticText)View["lblArmor"];
                lblSalvage = (MyClasses.MetaViewWrappers.IStaticText)View["lblSalvage"];
                lblSetup = (MyClasses.MetaViewWrappers.IStaticText)View["lblSetup"];
                lblInventoryExpl = (MyClasses.MetaViewWrappers.IStaticText)View["lblInventoryExpl"];

                btnGetInventory.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnGetInventory_Click);
                btnUpdateInventory.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnUpdateInventory_Click);
                btnGetBurden.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnGetBurden_Click);
             //   btnGetToonArmor.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnGetToonArmor_Click);
                btnGetToonStats.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnGetToonStats_Click);
                btnLstInventory.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnLstInventory_Click);
                btnClrInventory.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnClrInventory_Click);
                cmbSelectClass.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbSelectClass_Change);
                cmbWieldAttrib.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbWieldAttrib_Change);
                cmbDamageType.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbDamageType_Change);
                cmbLevel.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbLevel_Change);
                cmbMaterial.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbMaterial_Change);
                cmbArmorSet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbArmorSet_Change);
                cmbArmorLevel.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbArmorLevel_Change);
                cmbCoverage.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbCoverage_Change);
                cmbSalvWork.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbSalvWork_Change);
                cmbEmbue.Change += new EventHandler<MyClasses.MetaViewWrappers.MVIndexChangeEventArgs>(cmbEmbue_Change);
                chkInventory.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkInventory_Change);
                chkInventoryWaiting.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkInventoryWaiting_Change);
                chkInventoryBurden.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkInventoryBurden_Change);
                chkInventoryComplete.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkInventoryComplete_Change);
                chkToonStats.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkToonStats_Change);
              //  chkArmor.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkArmor_Change);
                 chkQuickSlotsv.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkQuickSlotsv_Change);
                 chkQuickSlotsh.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkQuickSlotsh_Change);

                lstInventory.Selected += new EventHandler<MVListSelectEventArgs>(lstInventory_Selected);
              //              ServerDispatch.Handler += new EventHandler<ServerDispatch_Handler

             //           CoreManager.Current.CharacterFilter.Login += new EventHandler<Decal.Adapter.Wrappers.LoginEventArgs>(CharacterFilter_Login);
             //           CoreManager.Current.WorldFilter.CreateObject += new EventHandler<Decal.Adapter.Wrappers.CreateObjectEventArgs>(WorldFilter_CreateObject);
             //           CoreManager.Current.WorldFilter.ChangeObject += new EventHandler<Decal.Adapter.Wrappers.ChangeObjectEventArgs>(WorldFilter_ChangeObject);
             //           CoreManager.Current.WorldFilter.ReleaseObject += new EventHandler<Decal.Adapter.Wrappers.ReleaseObjectEventArgs>(WorldFilter_ReleaseObject);

            //              CoreManager.Current.RenderFrame += new EventHandler<EventArgs>(Current_RenderFrame);

            }
            catch (Exception ex) { Mishna.PluginCore.Util.LogError(ex); }
        }
Пример #4
0
        void ViewInit()
        {
            try
            {
                //Create view here
                View = MyClasses.MetaViewWrappers.ViewSystemSelector.CreateViewResource(PluginCore.host, "Handyman.Views.MainView.xml");
                VirindiViewService.ViewProperties myprop = new ViewProperties();


                chkEnabled       = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnabled"];
                chkArmorTink     = (MyClasses.MetaViewWrappers.ICheckBox)View["chkArmorTink"];
                chkItemTink      = (MyClasses.MetaViewWrappers.ICheckBox)View["chkItemTink"];
                chkMagicItemTink = (MyClasses.MetaViewWrappers.ICheckBox)View["chkMagicItemTink"];
                chkWeaponTink    = (MyClasses.MetaViewWrappers.ICheckBox)View["chkWeaponTink"];
                chkSalvaging     = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSalvaging"];
                //   chkSetUst = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetUst"];
                chkAlchemy = (MyClasses.MetaViewWrappers.ICheckBox)View["chkAlchemy"];
                //   chkSetFocusingStone = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetFocusingStone"];
                chkCooking   = (MyClasses.MetaViewWrappers.ICheckBox)View["chkCooking"];
                chkFletching = (MyClasses.MetaViewWrappers.ICheckBox)View["chkFletching"];
                chkLockpick  = (MyClasses.MetaViewWrappers.ICheckBox)View["chkLockpick"];
                //chkTier4Rares = (MyClasses.MetaViewWrappers.ICheckBox)View["chkTier4Rares"];

                chkBuffsEnabled      = (MyClasses.MetaViewWrappers.ICheckBox)View["chkBuffsEnabled"];
                chkBuffOnStart       = (MyClasses.MetaViewWrappers.ICheckBox)View["chkBuffOnStart"];
                chkUseBeers          = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseBeers"];
                chkUseRares          = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseRares"];
                chkUseBuffBot        = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseBuffBot"];
                chkSetBuffingWand    = (MyClasses.MetaViewWrappers.ICheckBox)View["chkSetBuffingWand"];
                chkUseLevelVIIBuffs  = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseLevelVIIBuffs"];
                chkUseLevelVIIIBuffs = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseLevelVIIIBuffs"];

                chkLogOff = (MyClasses.MetaViewWrappers.ICheckBox)View["chkLogOff"];
                //chkUseCharge = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseCharge"];
                //chkEquip = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEquip"];
                //chkUseWeb = (MyClasses.MetaViewWrappers.ICheckBox)View["chkUseWeb"];
                chkRareAllegChan = (MyClasses.MetaViewWrappers.ICheckBox)View["chkRareAllegChan"];
                chkRareTradeChan = (MyClasses.MetaViewWrappers.ICheckBox)View["chkRareTradeChan"];
                chkEnableMail    = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnableMail"];
                chkEnterSpamMail = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnterSpamMail"];
                chkEnterSpamRare = (MyClasses.MetaViewWrappers.ICheckBox)View["chkEnterSpamRare"];

                //chkCalcMajors = (MyClasses.MetaViewWrappers.ICheckBox)View["chkCalcMajors"];
                //chkJourneymanPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkJourneymanPet"];
                //chkArtisanPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkArtisanPet"];
                //chkMasterPet = (MyClasses.MetaViewWrappers.ICheckBox)View["chkMasterPet"];

                listMessages = (MyClasses.MetaViewWrappers.IList)View["listMessages"];
                listReturn   = (MyClasses.MetaViewWrappers.IList)View["listReturn"];

                //    btnCheckVersion = (MyClasses.MetaViewWrappers.IButton)View["btnCheckVersion"];
                btnClearMessages = (MyClasses.MetaViewWrappers.IButton)View["btnClearMessages"];
                btnAddReturn     = (MyClasses.MetaViewWrappers.IButton)View["btnAddReturn"];
                btnRemoveReturn  = (MyClasses.MetaViewWrappers.IButton)View["btnRemoveReturn"];

                txtReturnTo = (MyClasses.MetaViewWrappers.ITextBox)View["txtReturnTo"];

                chkEnabled.Change       += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnabled_Change);
                chkArmorTink.Change     += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkArmorTink_Change);
                chkItemTink.Change      += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkItemTink_Change);
                chkWeaponTink.Change    += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkWeaponTink_Change);
                chkMagicItemTink.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkMagicItemTink_Change);
                chkSalvaging.Change     += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSalvaging_Change);
                //chkSetUst.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSetUst_Change);
                //chkSetFocusingStone.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkSetFocusingStone_Change);
                chkAlchemy.Change   += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkAlchemy_Change);
                chkCooking.Change   += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkCooking_Change);
                chkFletching.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkFletching_Change);
                chkLockpick.Change  += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkLockpick_Change);
                //chkTier4Rares.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkTier4Rares_Change);

                chkBuffsEnabled.Change   += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffsEnabled_Change);
                chkBuffOnStart.Change    += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffOnStart_Change);
                chkUseBeers.Change       += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseBeers_Change);
                chkUseRares.Change       += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseRares_Change);
                chkUseBuffBot.Change     += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseBuffBot_Change);
                chkSetBuffingWand.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkBuffingWand_Change);
                //  chkUseLevelVIIBuffs.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseLevelVIIBuffs_Change);
                //   chkUseLevelVIIIBuffs.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseLevelVIIIBuffs_Change);


                chkLogOff.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkLogOff_Change);
                //chkUseCharge.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseCharge_Change);
                //chkEquip.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEquip_Change);
                //chkUseWeb.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkUseWeb_Change);
                chkRareAllegChan.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkRareAllegChan_Change);
                chkRareTradeChan.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkRareTradeChan_Change);
                chkEnableMail.Change    += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnableMail_Change);
                chkEnterSpamMail.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnterSpamMail_Change);
                chkEnterSpamRare.Change += new EventHandler <MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkEnterSpamRare_Change);

                //chkCalcMajors.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkCalcMajors_Change);
                //chkJourneymanPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkJourneymanPet_Change);
                //chkArtisanPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkArtisanPet_Change);
                //chkMasterPet.Change += new EventHandler<MyClasses.MetaViewWrappers.MVCheckBoxChangeEventArgs>(chkMasterPet_Change);

                //    Decal.Adapter.CoreManager.Current.ItemSelected += new EventHandler<ItemSelectedEventArgs>(Current_ItemSelected);
                CraftbotMasterTimer.Tick            += new EventHandler(CraftbotMasterTimer_Tick);
                Core.CharacterFilter.ActionComplete += new EventHandler(CharacterFilter_ActionComplete);
                Core.ChatBoxMessage           += new EventHandler <Decal.Adapter.ChatTextInterceptEventArgs>(Core_ChatBoxMessage);
                Core.WorldFilter.EnterTrade   += new EventHandler <Decal.Adapter.Wrappers.EnterTradeEventArgs>(WorldFilter_EnterTrade);
                Core.WorldFilter.AddTradeItem += new EventHandler <AddTradeItemEventArgs>(WorldFilter_AddTradeItem);
                //     Core.WindowMessage += new EventHandler<WindowMessageEventArgs>(Core_WindowMessage);


                //btnCheckVersion.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnCheckVersion_Click);
                //btnClearMessages.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnClearMessages_Click);
                //btnAddReturn.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnAddReturn_Click);
                //btnRemoveReturn.Click += new EventHandler<MyClasses.MetaViewWrappers.MVControlEventArgs>(btnRemoveReturn_Click);

                //listMessages.Selected += new EventHandler<MVListSelectEventArgs>(listMessages_Selected);
                //listReturn.Selected += new EventHandler<MVListSelectEventArgs>(listReturn_Selected);


                //txtReturnTo.End += new EventHandler<MVTextBoxEndEventArgs>(txtReturnTo_End);
            }

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