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"); } }
public static void ViewDestroy() { bSelectCraftOutput = null; bSelectCraftInputA = null; bSelectCraftInputB = null; txtCraftOutput = null; txtLow = null; txtCraftInputA = null; txtCraftInputB = null; sldLow = null; View.Dispose(); }
//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); } }