Ejemplo n.º 1
0
        private void btnAdd(VirindiViewService.HudView hud)
        {
            try
            {

                quickiesHud = hud;
                baddItem = true;
                bremoveItem = false;
                bdual = false;
                Core.ItemSelected += Current_ItemSelected;
            }

            catch (Exception ex) { LogError(ex); }
        }
Ejemplo n.º 2
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (view != null)
                    {
                        view.VisibleChanged -= View_VisibleChanged;
                        view.Dispose();
                    }
                    view = null;
                }
                disposedValue = true;
            }
        }
Ejemplo n.º 3
0
        protected void CreateFromXMLResource(string resourcePath, bool doIcon = true, bool doTitle = true)
        {
            try
            {
                new Decal3XMLParser().ParseFromResource(resourcePath, out properties, out controls);

                if (doIcon)
                {
                    properties.Icon = GetIcon("Commander.Assets.Images.Commander.png");
                }
                if (doTitle)
                {
                    properties.Title = string.Format($@"{_globals.PluginName} v{_globals.Version}");
                }

                view = new VirindiViewService.HudView(properties, controls);
                view.VisibleChanged += View_VisibleChanged;
            } catch (Exception ex) { _logger.Error(ex); }
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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;
        }
        private void btnAdd(VirindiViewService.HudView hud)
        {
            try
            {
                quickiesHud = hud;
                baddItem = true;
                bremoveItem = false;
            }

            catch (Exception ex) { LogError(ex); }
        }
        private void RenderVerticalQuickSlots()
        {
            WriteToChat("I am in the function to render vertical quickslots");

            if (quickiesvHud != null)
            {
                DisposeVerticalQuickSlots();
            }
            if (!File.Exists(quickSlotsvFilename))
            {
                XDocument tempDoc = new XDocument(new XElement("Objs"));
                tempDoc.Save(quickSlotsvFilename);
                tempDoc = null;
            }

            xdocQuickSlotsv = XDocument.Load(quickSlotsvFilename);

            if (vpt.X == 0) { vpt.X = 200; }
            if (vpt.Y == 0) { vpt.Y = 200; }

            quickiesvHud = new VirindiViewService.HudView("", 30, 340, new ACImage(Color.Transparent));
            quickiesvHud.ShowInBar = false;
            quickiesvHud.UserAlphaChangeable = false;
            quickiesvHud.Visible = true;
            quickiesvHud.UserGhostable = true;
            quickiesvHud.UserMinimizable = false;
            quickiesvHud.UserResizeable = false;
            quickiesvHud.Location = vpt;
            if (mvtheme == null)
                {mvtheme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");}
            quickiesvHud.Theme = mvtheme;
            quickiesvHud_Head = new HudFixedLayout();
            quickiesvHud.Controls.HeadControl = quickiesvHud_Head;

            quickiesvTabView = new HudTabView();
            quickiesvTabFixedLayout = new HudFixedLayout();

            quickiesvHud_Head.AddControl(quickiesvTabView, new Rectangle(0,0,30,300));
            quickiesvTabView.AddTab(quickiesvTabFixedLayout,null);

            btnQuickiesvAdd = new VirindiViewService.Controls.HudButton();
            btnQuickiesvAdd.Text = "+";
            btnQuickiesvAdd.Visible = true;

            btnQuickiesvRemove = new VirindiViewService.Controls.HudButton();
            btnQuickiesvRemove.Text = "-";
            btnQuickiesvRemove.Visible = true;

            quickiesvTabFixedLayout.AddControl(btnQuickiesvAdd, new Rectangle(0, 0, 12, 12));
            quickiesvTabFixedLayout.AddControl(btnQuickiesvRemove, new Rectangle(15, 0, 12, 12));

            mQuickStackv0 = new HudImageStack();
            mQuickStackv1 = new HudImageStack();
            mQuickStackv2 = new HudImageStack();
            mQuickStackv3 = new HudImageStack();
            mQuickStackv4 = new HudImageStack();
            mQuickStackv5 = new HudImageStack();
            mQuickStackv6 = new HudImageStack();
            mQuickStackv7 = new HudImageStack();
            mQuickStackv8 = new HudImageStack();
            mQuickStackv9 = new HudImageStack();
            mQuickStackv10 = new HudImageStack();
            mQuickStackv11 = new HudImageStack();
            mQuickStackv12 = new HudImageStack();
            mQuickStackv13 = new HudImageStack();
            mQuickStackv14 = new HudImageStack();

            chkQuickiev0 = new HudCheckBox();
            chkQuickiev1 = new HudCheckBox();
            chkQuickiev2 = new HudCheckBox();
            chkQuickiev3 = new HudCheckBox();
            chkQuickiev4 = new HudCheckBox();
            chkQuickiev5 = new HudCheckBox();
            chkQuickiev6 = new HudCheckBox();
            chkQuickiev7 = new HudCheckBox();
            chkQuickiev8 = new HudCheckBox();
            chkQuickiev9 = new HudCheckBox();
            chkQuickiev10 = new HudCheckBox();
            chkQuickiev11 = new HudCheckBox();
            chkQuickiev12 = new HudCheckBox();
            chkQuickiev13 = new HudCheckBox();
            chkQuickiev14 = new HudCheckBox();

            vst.Add(mQuickStackv0);
            vst.Add(mQuickStackv1);
            vst.Add(mQuickStackv2);
            vst.Add(mQuickStackv3);
            vst.Add(mQuickStackv4);
            vst.Add(mQuickStackv5);
            vst.Add(mQuickStackv6);
            vst.Add(mQuickStackv7);
            vst.Add(mQuickStackv8);
            vst.Add(mQuickStackv9);
            vst.Add(mQuickStackv10);
            vst.Add(mQuickStackv11);
            vst.Add(mQuickStackv12);
            vst.Add(mQuickStackv13);
            vst.Add(mQuickStackv14);

            vID.Add(nQuickieIDv0);
            vID.Add(nQuickieIDv1);
            vID.Add(nQuickieIDv2);
            vID.Add(nQuickieIDv3);
            vID.Add(nQuickieIDv4);
            vID.Add(nQuickieIDv5);
            vID.Add(nQuickieIDv6);
            vID.Add(nQuickieIDv7);
            vID.Add(nQuickieIDv8);
            vID.Add(nQuickieIDv9);
            vID.Add(nQuickieIDv10);
            vID.Add(nQuickieIDv11);
            vID.Add(nQuickieIDv12);
            vID.Add(nQuickieIDv13);
            vID.Add(nQuickieIDv14);

            chkQuickiev0 = new HudCheckBox(); vchk.Add(chkQuickiev0);
            chkQuickiev1 = new HudCheckBox(); vchk.Add(chkQuickiev1);
            chkQuickiev2 = new HudCheckBox(); vchk.Add(chkQuickiev2);
            chkQuickiev3 = new HudCheckBox(); vchk.Add(chkQuickiev3);
            chkQuickiev4 = new HudCheckBox(); vchk.Add(chkQuickiev4);
            chkQuickiev5 = new HudCheckBox(); vchk.Add(chkQuickiev5);
            chkQuickiev6 = new HudCheckBox(); vchk.Add(chkQuickiev6);
            chkQuickiev7 = new HudCheckBox(); vchk.Add(chkQuickiev7);
            chkQuickiev8 = new HudCheckBox(); vchk.Add(chkQuickiev8);
            chkQuickiev9 = new HudCheckBox(); vchk.Add(chkQuickiev9);
            chkQuickiev10 = new HudCheckBox(); vchk.Add(chkQuickiev10);
            chkQuickiev11 = new HudCheckBox(); vchk.Add(chkQuickiev11);
            chkQuickiev12= new HudCheckBox(); vchk.Add(chkQuickiev12);
            chkQuickiev13 = new HudCheckBox(); vchk.Add(chkQuickiev13);
            chkQuickiev14 = new HudCheckBox(); vchk.Add(chkQuickiev14);

            quickiesvHud_Head.AddControl(chkQuickiev0, new Rectangle(0, 15, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev1, new Rectangle(0, 35, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev2, new Rectangle(0, 55, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev3, new Rectangle(0, 75, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev4, new Rectangle(0, 95, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev5, new Rectangle(0, 115, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev6, new Rectangle(0, 135, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev7, new Rectangle(0, 150, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev8, new Rectangle(0, 175, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev9, new Rectangle(0, 195, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev10, new Rectangle(0, 215, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev11, new Rectangle(0, 235, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev12, new Rectangle(0, 255, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev13, new Rectangle(0, 275, 10, 20));
            quickiesvHud_Head.AddControl(chkQuickiev14, new Rectangle(0, 295, 10, 20));

            mQuickStackv0.Hit += (sender,obj) => mQuickStackv0_Hit(sender,obj);
            quickiesvHud.ThemeChanged += (sender, obj) => quickiesvHud_ThemeChanged(sender, obj);
            quickiesvHud.Moved += (sender, obj) => quickiesvHud_Moved(sender, obj);
            btnQuickiesvAdd.Hit += (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);
            btnQuickiesvRemove.Hit += (sender, obj) => btnQuickiesvRemove_Hit(sender, obj);
               chkQuickiev0.Change += (sender, obj) => chkQuickiev0_Change(sender, obj);
            chkQuickiev1.Change += (sender, obj) => chkQuickiev1_Change(sender, obj);
            chkQuickiev2.Change += (sender, obj) => chkQuickiev2_Change(sender, obj);
            chkQuickiev3.Change += (sender, obj) => chkQuickiev3_Change(sender, obj);
            chkQuickiev4.Change += (sender, obj) => chkQuickiev4_Change(sender, obj);
            chkQuickiev5.Change += (sender, obj) => chkQuickiev5_Change(sender, obj);
            chkQuickiev6.Change += (sender, obj) => chkQuickiev6_Change(sender, obj);
            chkQuickiev7.Change += (sender, obj) => chkQuickiev7_Change(sender, obj);
            chkQuickiev8.Change += (sender, obj) => chkQuickiev8_Change(sender, obj);
            chkQuickiev9.Change += (sender, obj) => chkQuickiev9_Change(sender, obj);
            chkQuickiev10.Change += (sender, obj) => chkQuickiev10_Change(sender, obj);
            chkQuickiev11.Change += (sender, obj) => chkQuickiev11_Change(sender, obj);
            chkQuickiev12.Change += (sender, obj) => chkQuickiev12_Change(sender, obj);
            chkQuickiev13.Change += (sender, obj) => chkQuickiev13_Change(sender, obj);
            chkQuickiev14.Change += (sender, obj) => chkQuickiev14_Change(sender, obj);
            mQuickStackv0.Hit += (sender, obj) => mQuickStackv0_Hit(sender, obj);

            if (xdocQuickSlotsv.Root.HasElements)
            {
                doGetData(xdocQuickSlotsv, quickSlotsvFilename);
            }
        }
Ejemplo n.º 8
0
        private void DisposeVerticalQuickSlots()
        {
            if (btnQuickiesvAdd != null) {btnQuickiesvAdd.Hit -= (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);btnQuickiesvAdd.Dispose();}
            if (btnQuickiesvRemove != null) { btnQuickiesvRemove.Hit -= (sender, obj) => btnQuickiesvRemove_Hit(sender, obj); btnQuickiesvRemove.Dispose(); }
            if (btnQuickiesvDual != null) { btnQuickiesvDual.Hit -= (sender, obj) => btnQuickiesvDual_Hit(sender, obj); btnQuickiesvDual.Dispose(); }

            if (mQuickStackv0 != null) { mQuickStackv0.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv0.Dispose(); }
            if (mQuickStackv1 != null) { mQuickStackv1.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv1.Dispose(); }
            if (mQuickStackv2 != null) { mQuickStackv2.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv2.Dispose(); }
            if (mQuickStackv3 != null) { mQuickStackv3.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv3.Dispose(); }
            if (mQuickStackv4 != null) { mQuickStackv4.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv4.Dispose(); }
            if (mQuickStackv5 != null) { mQuickStackv5.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv5.Dispose(); }
            if (mQuickStackv6 != null) { mQuickStackv6.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv6.Dispose(); }
            if (mQuickStackv7 != null) { mQuickStackv7.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv7.Dispose(); }
            if (mQuickStackv8 != null) { mQuickStackv8.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv8.Dispose(); }
            if (mQuickStackv9 != null) { mQuickStackv9.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv9.Dispose(); }
            if (mQuickStackv10 != null) { mQuickStackv10.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv10.Dispose(); }
            if (mQuickStackv11 != null) { mQuickStackv11.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv11.Dispose(); }
            if (mQuickStackv12 != null) { mQuickStackv12.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv12.Dispose(); }
            if (mQuickStackv13 != null) { mQuickStackv13.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv13.Dispose(); }
            if (mQuickStackv14 != null) { mQuickStackv14.Hit -= (sender, obj) => mQuickStackv0_Hit(sender, obj); mQuickStackv14.Dispose(); }

            quickiesvTabView.Dispose();
            quickiesvHud.Dispose();
            nquickiev = 0;
            try
            {

                for (int i = 0; i <vst.Count; i++)
                { vst[i] = null; }
            }
            catch (Exception ex) { LogError(ex); }

            try
            {

                for (int i = 0; i < vID.Count; i++)
                { vID[i] = 0; }
            }
            catch (Exception ex) { LogError(ex); }

            quickiesvHud = null;
        }
Ejemplo n.º 9
0
        private void RenderVerticalQuickSlots()
        {
            if (quickiesvHud != null)
            {
                DisposeVerticalQuickSlots();
            }
            if (!File.Exists(quickSlotsvFilename))
            {
                XDocument tempQDoc = new XDocument(new XElement("Objs"));
                tempQDoc.Save(quickSlotsvFilename);
                tempQDoc = null;
            }

            xdocQuickSlotsv = XDocument.Load(quickSlotsvFilename);

            nCountV = xdocQuickSlotsv.Root.Descendants().Count();
            nCountV = nCountV / 5;

            quickiesvHud = new VirindiViewService.HudView("", 30,30+ 25*nCountV, new ACImage(Color.Transparent),false,"quickiesvhud");
            quickiesvHud.ShowInBar = false;
            quickiesvHud.UserAlphaChangeable = false;
            quickiesvHud.Visible = true;
            quickiesvHud.UserClickThroughable = false;
            quickiesvHud.UserGhostable = true;
            quickiesvHud.UserMinimizable = false;
            quickiesvHud.UserResizeable =  false;
            quickiesvHud.LoadUserSettings();
            quickiesvTabView = new HudTabView();
            quickiesvHud.Controls.HeadControl = quickiesvTabView;
            quickiesvTabFixedLayout = new HudFixedLayout();

            quickiesvTabView.AddTab(quickiesvTabFixedLayout, "");

                btnQuickiesvAdd = new VirindiViewService.Controls.HudButton();
                btnQuickiesvAdd.Text = "+";
                btnQuickiesvAdd.Visible = true;

                btnQuickiesvDual = new VirindiViewService.Controls.HudButton();
                btnQuickiesvDual.Text = "~";
                btnQuickiesvDual.Visible = true;

                btnQuickiesvRemove = new VirindiViewService.Controls.HudButton();
                btnQuickiesvRemove.Text = "-";
                btnQuickiesvRemove.Visible = true;

                quickiesvTabFixedLayout.AddControl(btnQuickiesvAdd, new Rectangle(0, 0, 12, 12));
                quickiesvTabFixedLayout.AddControl(btnQuickiesvRemove, new Rectangle(15, 0, 12, 12));
                quickiesvTabFixedLayout.AddControl(btnQuickiesvDual, new Rectangle(6, 15, 12, 12));

            mQuickStackv0 = new HudImageStack();
            mQuickStackv1 = new HudImageStack();
            mQuickStackv2 = new HudImageStack();
            mQuickStackv3 = new HudImageStack();
            mQuickStackv4 = new HudImageStack();
            mQuickStackv5 = new HudImageStack();
            mQuickStackv6 = new HudImageStack();
            mQuickStackv7 = new HudImageStack();
            mQuickStackv8 = new HudImageStack();
            mQuickStackv9 = new HudImageStack();
            mQuickStackv10 = new HudImageStack();
            mQuickStackv11 = new HudImageStack();
            mQuickStackv12 = new HudImageStack();
            mQuickStackv13 = new HudImageStack();
            mQuickStackv14 = new HudImageStack();

            vst.Add(mQuickStackv0);
            vst.Add(mQuickStackv1);
            vst.Add(mQuickStackv2);
            vst.Add(mQuickStackv3);
            vst.Add(mQuickStackv4);
            vst.Add(mQuickStackv5);
            vst.Add(mQuickStackv6);
            vst.Add(mQuickStackv7);
            vst.Add(mQuickStackv8);
            vst.Add(mQuickStackv9);
            vst.Add(mQuickStackv10);
            vst.Add(mQuickStackv11);
            vst.Add(mQuickStackv12);
            vst.Add(mQuickStackv13);
            vst.Add(mQuickStackv14);

            vID.Add(nQuickieIDv0);
            vID.Add(nQuickieIDv1);
            vID.Add(nQuickieIDv2);
            vID.Add(nQuickieIDv3);
            vID.Add(nQuickieIDv4);
            vID.Add(nQuickieIDv5);
            vID.Add(nQuickieIDv6);
            vID.Add(nQuickieIDv7);
            vID.Add(nQuickieIDv8);
            vID.Add(nQuickieIDv9);
            vID.Add(nQuickieIDv10);
            vID.Add(nQuickieIDv11);
            vID.Add(nQuickieIDv12);
            vID.Add(nQuickieIDv13);
            vID.Add(nQuickieIDv14);

            btnQuickiesvAdd.Hit += (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);
            btnQuickiesvRemove.Hit += (sender, obj) => btnQuickiesvRemove_Hit(sender, obj);
            btnQuickiesvDual.Hit += (sender, obj) => btnQuickiesvDual_Hit(sender, obj);

            if (xdocQuickSlotsv.Root.HasElements)
            {
                doGetData(xdocQuickSlotsv, quickSlotsvFilename);
            }
        }
Ejemplo n.º 10
0
        private void RenderVerticalQuickSlots()
        {
            try{
            if (quickiesvHud != null)
            {
                DisposeVerticalQuickSlots();
            }
            qsvswitches = new List<QSControls>();
            quickiesvHud = new VirindiViewService.HudView("", 30,30+ 25*mCharacterSettings.vQuickSlotItems.Count, new ACImage(Color.Transparent),false,"quickiesvhud");
            quickiesvHud.ShowInBar = false;
            quickiesvHud.UserAlphaChangeable = false;
            quickiesvHud.Visible = true;
            quickiesvHud.UserClickThroughable = false;
            quickiesvHud.UserGhostable = true;
            quickiesvHud.UserMinimizable = false;
            quickiesvHud.UserResizeable =  false;
            quickiesvHud.LoadUserSettings();
            quickiesvTabView = new HudTabView();
            quickiesvHud.Controls.HeadControl = quickiesvTabView;
            quickiesvTabFixedLayout = new HudFixedLayout();

            quickiesvTabView.AddTab(quickiesvTabFixedLayout, "");
                try{
                btnQuickiesvAdd = new VirindiViewService.Controls.HudButton();
                btnQuickiesvAdd.Text = "+";
                btnQuickiesvAdd.Visible = true;

                btnQuickiesvDual = new VirindiViewService.Controls.HudButton();
                btnQuickiesvDual.Text = "~";
                btnQuickiesvDual.Visible = true;

                btnQuickiesvRemove = new VirindiViewService.Controls.HudButton();
                btnQuickiesvRemove.Text = "-";
                btnQuickiesvRemove.Visible = true;

                quickiesvTabFixedLayout.AddControl(btnQuickiesvAdd, new Rectangle(0, 0, 12, 12));
                quickiesvTabFixedLayout.AddControl(btnQuickiesvRemove, new Rectangle(15, 0, 12, 12));
                quickiesvTabFixedLayout.AddControl(btnQuickiesvDual, new Rectangle(6, 15, 12, 12));
                }
                catch (Exception ex) { LogError(ex); }

                if (mCharacterSettings.vQuickSlotItems.Count > 0)
                {
                   for (int i = 0; i < mCharacterSettings.vQuickSlotItems.Count; i++)
                     {
                        doCreateNewQuickie(mCharacterSettings.vQuickSlotItems,i);

                        doCreateStack();
                        qsvswitches.Add(mQuickieControl);

                        quickiesvTabFixedLayout.AddControl(mQuickieControl.QuickSlotStack, new Rectangle(2, 30 + 20 * i, 20, 20));

                        mQuickieControl.QuickSlotStack.Hit += (sender, obj) => mvQuickStacks_Hit(sender, obj);
                       //  VirindiViewService.TooltipSystem.AssociateTooltip(QSControlsList[i].QuickSlotToolTip);// QuickSlotToolTip.ToString();
                     }
               }

            btnQuickiesvAdd.Hit += (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);
            btnQuickiesvRemove.Hit += (sender, obj) => btnQuickiesvRemove_Hit(sender, obj);
            btnQuickiesvDual.Hit += (sender, obj) => btnQuickiesvDual_Hit(sender, obj);
              }
              catch (Exception ex) { LogError(ex); }
        }
Ejemplo n.º 11
0
        private void RenderHorizontalQuickSlots()
        {
            try{

            if (quickieshHud != null)
            {
                DisposeHorizontalQuickSlots();
            }

            qshswitches = new List<QSControls>();
            quickieshHud = new VirindiViewService.HudView("", 30 + 25*mCharacterSettings.hQuickSlotItems.Count, 40, new ACImage(Color.Transparent),false,"quickieshhud");
            quickieshHud.ShowInBar = false;
            quickieshHud.UserAlphaChangeable = false;
            quickieshHud.Visible = true;
            quickieshHud.UserClickThroughable = false;
            quickieshHud.UserGhostable = true;
            quickieshHud.UserMinimizable = false;
            quickieshHud.UserResizeable = false;
            quickieshHud.LoadUserSettings();

            quickieshTabView = new HudTabView();
            quickieshHud.Controls.HeadControl = quickieshTabView;
            quickieshTabFixedLayout = new HudFixedLayout();

            try
            {
                quickieshTabView.AddTab(quickieshTabFixedLayout, "Horizontal Switchgear");

                btnQuickieshAdd = new VirindiViewService.Controls.HudButton();
                btnQuickieshAdd.Text = "+";
                btnQuickieshAdd.Visible = true;

                btnQuickieshDual = new VirindiViewService.Controls.HudButton();
                btnQuickieshDual.Text = "~";
                btnQuickieshDual.Visible = true;

                btnQuickieshRemove = new VirindiViewService.Controls.HudButton();
                btnQuickieshRemove.Text = "-";
                btnQuickieshRemove.Visible = true;

                quickieshTabFixedLayout.AddControl(btnQuickieshAdd, new Rectangle(0, 0, 12, 12));
                quickieshTabFixedLayout.AddControl(btnQuickieshRemove, new Rectangle(15, 0, 12, 12));
                quickieshTabFixedLayout.AddControl(btnQuickieshDual, new Rectangle(30, 0, 12, 12));
            }
            catch (Exception ex) { LogError(ex); }

            if (mCharacterSettings.hQuickSlotItems.Count > 0)
            {
                for (int i = 0; i < mCharacterSettings.hQuickSlotItems.Count; i++)
                {
                    doCreateNewQuickie(mCharacterSettings.hQuickSlotItems, i);

                    doCreateStack();
                    qshswitches.Add(mQuickieControl);
                    if (mCharacterSettings.hQuickSlotItems.Count == 1) { quickieshTabFixedLayout.AddControl(mQuickieControl.QuickSlotStack, new Rectangle(50 + 20 * i, 0, 50, 20)); }
                    else { quickieshTabFixedLayout.AddControl(mQuickieControl.QuickSlotStack, new Rectangle(50 + 20 * i, 0, 20, 20)); }
                //    quickieshTabFixedLayout.AddControl(mQuickieControl.QuickSlotStack, new Rectangle(50 + 20 * i, 0, 20, 20));
                    mQuickieControl.QuickSlotStack.Hit += (sender, obj) => mhQuickStacks_Hit(sender, obj);
                }
            }
                btnQuickieshAdd.Hit += (sender, obj) => btnQuickieshAdd_Hit(sender, obj);
                btnQuickieshRemove.Hit += (sender, obj) => btnQuickieshRemove_Hit(sender, obj);
                btnQuickieshDual.Hit += (sender, obj) => btnQuickieshDual_Hit(sender, obj);

              }
              catch (Exception ex) { LogError(ex); }
        }
Ejemplo n.º 12
0
        private void DisposeVerticalQuickSlots()
        {
            ClearVariables();
            if (btnQuickiesvAdd != null) {btnQuickiesvAdd.Hit -= (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);btnQuickiesvAdd.Dispose();}
            if (btnQuickiesvRemove != null) { btnQuickiesvRemove.Hit -= (sender, obj) => btnQuickiesvRemove_Hit(sender, obj); btnQuickiesvRemove.Dispose(); }
            if (btnQuickiesvDual != null) { btnQuickiesvDual.Hit -= (sender, obj) => btnQuickiesvDual_Hit(sender, obj); btnQuickiesvDual.Dispose(); }

            quickiesHud = null;
            if (quickiesvTabView != null) { quickiesvTabView.Dispose(); quickiesvTabView = null; }
            if (quickiesvTabFixedLayout != null) { quickiesvTabFixedLayout.Dispose(); quickiesvTabFixedLayout = null; }
            if (quickiesvHud != null) { quickiesvHud.Dispose(); quickiesvHud = null; }
        }
Ejemplo n.º 13
0
        private void DisposeHorizontalQuickSlots()
        {
            try
            {
                ClearVariables();
                if (btnQuickieshAdd != null) { btnQuickieshAdd.Hit -= (sender, obj) => btnQuickieshAdd_Hit(sender, obj); btnQuickieshAdd.Dispose(); }
                if (btnQuickieshRemove != null) { btnQuickieshRemove.Hit -= (sender, obj) => btnQuickieshRemove_Hit(sender, obj); btnQuickieshRemove.Dispose(); }
                if (btnQuickieshDual != null) { btnQuickieshDual.Hit -= (sender, obj) => btnQuickieshDual_Hit(sender, obj); btnQuickieshDual.Dispose(); }

                quickiesHud = null;
                if (quickieshTabView != null) { quickieshTabView.Dispose(); quickieshTabView = null; }
                if (quickieshTabFixedLayout != null) { quickieshTabFixedLayout.Dispose(); quickieshTabFixedLayout = null; }
                if (quickieshHud != null) { quickieshHud.Dispose(); quickieshHud = null; }

                if (btnQuickieshAdd != null) { btnQuickieshAdd.Hit -= (sender, obj) => btnQuickiesvAdd_Hit(sender, obj); btnQuickieshAdd.Dispose(); }
                if (btnQuickieshRemove != null) { btnQuickieshRemove.Hit -= (sender, obj) => btnQuickiesvRemove_Hit(sender, obj); btnQuickieshRemove.Dispose(); }
                if (btnQuickieshDual != null) { btnQuickieshDual.Hit -= (sender, obj) => btnQuickiesvDual_Hit(sender, obj); btnQuickieshDual.Dispose(); }

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

            quickieshHud = null;
        }
Ejemplo n.º 14
0
        private void RenderPortalGearHud()
        {
            try
            {
                if (portalGearHud != null)
                {
                    DisposePortalGearHud();
                }
                if (!File.Exists(portalGearFilename))
                {
                    XDocument tempDoc = new XDocument(new XElement("Portals"));
                    tempDoc.Save(portalGearFilename);
                    tempDoc = null;
                }

                xdocPortalGear = XDocument.Load(portalGearFilename);

                portalGearHud = new VirindiViewService.HudView("", 300, 40, new ACImage(Color.Transparent), false, "PortalGear");
                portalGearHud.ShowInBar = false;
                portalGearHud.UserAlphaChangeable = false;
                portalGearHud.Visible = true;
                portalGearHud.UserClickThroughable = false;
                portalGearHud.UserGhostable = true;
                portalGearHud.UserMinimizable = false;
                portalGearHud.UserResizeable = false;
                portalGearHud.LoadUserSettings();
                portalGear_Head = new HudFixedLayout();
                portalGearHud.Controls.HeadControl = portalGear_Head;
                portalGearTabView = new HudTabView();
                portalGearTabFixedLayout = new HudFixedLayout();
                portalGear_Head.AddControl(portalGearTabView, new Rectangle(0, 0, 300, 40));
                portalGearTabView.AddTab(portalGearTabFixedLayout, "");

                //Clock
                txtPortalGear = new HudStaticText();
                portalGearTabFixedLayout.AddControl(txtPortalGear, new Rectangle(0, 10, 40, 20));
                VirindiViewService.TooltipSystem.AssociateTooltip(txtPortalGear, "Bedtime yet?");

                //Portal Recall
                mPortalGear0 = new HudPictureBox();
                int GR_Recall_Icon = 0x60013AD;
                mPortalGear0.Image = GR_Recall_Icon;
                portalGearTabFixedLayout.AddControl(mPortalGear0, new Rectangle(50, 0, 25, 39));
                VirindiViewService.TooltipSystem.AssociateTooltip(mPortalGear0, "Portal recall");

                mPortalGear0.Hit += (sender, obj) => mPortalGear0_Hit(sender, obj);
              	MasterTimer.Tick += MasterTimer_UpdateClock;
            }
            catch (Exception ex) { LogError(ex); }

            //  Lifestone Recall
            mPortalGear1 = new HudPictureBox();
            int GR_LifestoneRecall_ICON = 0x60024E1;
            mPortalGear1.Image = GR_LifestoneRecall_ICON;
            mPortalGear1.Image = new ACImage(4949);
            portalGearTabFixedLayout.AddControl(mPortalGear1, new Rectangle(80, 2, 25, 39));
            VirindiViewService.TooltipSystem.AssociateTooltip(mPortalGear1, "Lifestone recall");

            mPortalGear1.Hit += (sender, obj) => mPortalGear1_Hit(sender, obj);

            //House Recall
            mPortalGear2 = new HudPictureBox();
            int GR_HouseRecall_ICON = 0x6001A2A;
            mPortalGear2.Image = GR_HouseRecall_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear2, new Rectangle(110, 2, 25, 39));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear2, "House recall");

            mPortalGear2.Hit += (sender, obj) => mPortalGear2_Hit(sender, obj);

            //Mansion Recall
            mPortalGear3 = new HudPictureBox();
            int GR_MansionRecall_ICON = 0x60022DE;
            mPortalGear3.Image = GR_MansionRecall_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear3, new Rectangle(140, 2, 25, 39));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear3, "Mansion recall");

            mPortalGear3.Hit += (sender, obj) => mPortalGear3_Hit(sender, obj);

            //Allegiance Hometown Recall
            mPortalGear4 = new HudPictureBox();
            int GR_AHRecall_ICON = 0x60024DD;
            mPortalGear4.Image = GR_AHRecall_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear4, new Rectangle(170, 2, 25, 29));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear4, "Allegiance Hometown");

            mPortalGear4.Hit += (sender, obj) => mPortalGear4_Hit(sender, obj);

            //Recall Portal I
            mPortalGear5 = new HudPictureBox();
            int GR_RecallI_ICON = 0x60021D6;
            mPortalGear5.Image = GR_RecallI_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear5, new Rectangle(200, 2, 29, 29));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear5, "Portal I recall");

            mPortalGear5.Hit += (sender, obj) => mPortalGear5_Hit(sender, obj);

            //Summon Portal I
            mPortalGear6 = new HudPictureBox();
            int GR_SummonI_ICON = 0x60021DC;
            mPortalGear6.Image = GR_SummonI_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear6, new Rectangle(230, 2, 29, 29));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear6, "Summon Portal I");
            mPortalGear6.Hit += (sender, obj) => mPortalGear6_Hit(sender, obj);

            //Recall Portal II
            mPortalGear7 = new HudPictureBox();
            int GR_RecallII_ICON = 0x60021DA;
            mPortalGear7.Image = GR_RecallII_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear7, new Rectangle(260, 2, 29, 29));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear7, "Recall Portal II");
            mPortalGear7.Hit += (sender, obj) => mPortalGear7_Hit(sender, obj);

            //Summon Portal I
            mPortalGear8 = new HudPictureBox();
            int GR_SummonII_ICON = 0x60021E0;
            mPortalGear8.Image = GR_SummonII_ICON;
            portalGearTabFixedLayout.AddControl(mPortalGear8, new Rectangle(290, 2, 29, 29));
            VirindiViewService.TooltipSystem.AssociateTooltip(mRemoteGear8, "Summon Portal II");
            mPortalGear8.Hit += (sender, obj) => mPortalGear8_Hit(sender, obj);
        }
Ejemplo n.º 15
0
        private void createQuickies(VirindiViewService.HudView hudview)
        {
            try
            {

                if (hudview == quickiesvHud)
                {
                    quickiesvHud = new VirindiViewService.HudView("VQuickie", 25, 300, new ACImage(Color.Transparent), false);
                    //quickiesvHud.Width = 25;
                    //quickiesvHud.Height = 300;
                    //quickiesvHud.Title = "VQuickie";
                    quickiesvHud_Head = new HudFixedLayout();

                    btnQuickiesvAdd = new HudButton();
                    btnQuickiesvRemove = new HudButton();
                    if (vpt.X == 0) { vpt.X = 200; }
                    if (vpt.Y == 0) { vpt.Y = 200; }

                    doCreateHud(quickiesvHud, vpt, quickiesvHud_Head, btnQuickiesvAdd, btnQuickiesvRemove);

                    try
                    {
                        vst.Add(mQuickStackv0);
                        vst.Add(mQuickStackv1);
                        vst.Add(mQuickStackv2);
                        vst.Add(mQuickStackv3);
                        vst.Add(mQuickStackv4);
                        vst.Add(mQuickStackv5);
                        vst.Add(mQuickStackv6);
                        vst.Add(mQuickStackv7);
                        vst.Add(mQuickStackv8);
                        vst.Add(mQuickStackv9);
                        vst.Add(mQuickStackv10);
                        vst.Add(mQuickStackv11);

                        vID.Add(nQuickieIDv0);
                        vID.Add(nQuickieIDv1);
                        vID.Add(nQuickieIDv2);
                        vID.Add(nQuickieIDv3);
                        vID.Add(nQuickieIDv4);
                        vID.Add(nQuickieIDv5);
                        vID.Add(nQuickieIDv6);
                        vID.Add(nQuickieIDv7);
                        vID.Add(nQuickieIDv8);
                        vID.Add(nQuickieIDv9);
                        vID.Add(nQuickieIDv10);
                        vID.Add(nQuickieIDv11);

                        chkQuickiev0 = new HudCheckBox(); vchk.Add(chkQuickiev0);
                        chkQuickiev1 = new HudCheckBox(); vchk.Add(chkQuickiev1);
                        chkQuickiev2 = new HudCheckBox(); vchk.Add(chkQuickiev2);
                        chkQuickiev3 = new HudCheckBox(); vchk.Add(chkQuickiev3);
                        chkQuickiev4 = new HudCheckBox(); vchk.Add(chkQuickiev4);
                        chkQuickiev5 = new HudCheckBox(); vchk.Add(chkQuickiev5);
                        chkQuickiev6 = new HudCheckBox(); vchk.Add(chkQuickiev6);
                        chkQuickiev7 = new HudCheckBox(); vchk.Add(chkQuickiev7);
                        chkQuickiev8 = new HudCheckBox(); vchk.Add(chkQuickiev8);
                        chkQuickiev9 = new HudCheckBox(); vchk.Add(chkQuickiev9);
                        chkQuickiev10 = new HudCheckBox(); vchk.Add(chkQuickiev10);
                        chkQuickiev11 = new HudCheckBox(); vchk.Add(chkQuickiev11);

                        quickiesvHud_Head.AddControl(chkQuickiev0, new Rectangle(0, 15, 10, 10));
                        quickiesvHud_Head.AddControl(chkQuickiev1, new Rectangle(0, 30, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev2, new Rectangle(0, 45, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev3, new Rectangle(0, 60, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev4, new Rectangle(0, 75, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev5, new Rectangle(0, 90, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev6, new Rectangle(0, 105, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev7, new Rectangle(0, 120, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev8, new Rectangle(0, 135, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev9, new Rectangle(0, 150, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev10, new Rectangle(0, 165, 12, 12));
                        quickiesvHud_Head.AddControl(chkQuickiev11, new Rectangle(0, 180, 12, 12));

                        quickiesvHud.Moved += (sender, obj) => quickiesvHud_Moved(sender, obj);
                        btnQuickiesvAdd.Hit += (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);
                        btnQuickiesvRemove.Hit += (sender, obj) => btnQuickiesvRemove_Hit(sender, obj);
                        chkQuickiev0.Change += (sender, obj) => chkQuickiev0_Change(sender, obj);
                        chkQuickiev1.Change += (sender, obj) => chkQuickiev1_Change(sender, obj);
                        chkQuickiev2.Change += (sender, obj) => chkQuickiev2_Change(sender, obj);
                        chkQuickiev3.Change += (sender, obj) => chkQuickiev3_Change(sender, obj);
                        chkQuickiev4.Change += (sender, obj) => chkQuickiev4_Change(sender, obj);
                        chkQuickiev5.Change += (sender, obj) => chkQuickiev5_Change(sender, obj);
                        chkQuickiev6.Change += (sender, obj) => chkQuickiev6_Change(sender, obj);
                        chkQuickiev7.Change += (sender, obj) => chkQuickiev7_Change(sender, obj);
                        chkQuickiev8.Change += (sender, obj) => chkQuickiev8_Change(sender, obj);
                        chkQuickiev9.Change += (sender, obj) => chkQuickiev9_Change(sender, obj);
                        chkQuickiev10.Change += (sender, obj) => chkQuickiev10_Change(sender, obj);
                        chkQuickiev11.Change += (sender, obj) => chkQuickiev11_Change(sender, obj);

                        if (xdocQuickSlotsv.Root.HasElements)
                        {
                            doGetData(xdocQuickSlotsv, quickSlotsvFilename);
                        }
                    }
                    catch (Exception ex) { Mishna.PluginCore.Util.LogError(ex); }

                }
                else if (hudview == quickieshHud)
                {
                   quickieshHud = new VirindiViewService.HudView("HQuickie", 300, 30, new ACImage(Color.Transparent), false);
                    //quickieshHud.Width = 300;
                    //quickieshHud.Height = 25;
                    //quickieshHud.Title = "HQuickie";
                    quickieshHud_Head = new HudFixedLayout();
                     btnQuickieshAdd = new HudButton();
                    btnQuickieshRemove = new HudButton();
                    if (hpt.X == 0) { hpt.X = 240; }
                    if (hpt.Y == 0) { hpt.Y = 300; }

                    doCreateHud(quickieshHud, hpt, quickieshHud_Head, btnQuickieshAdd, btnQuickieshRemove);

                    hst.Add(mQuickStackh0);
                    hst.Add(mQuickStackh1);
                    hst.Add(mQuickStackh2);
                    hst.Add(mQuickStackh3);
                    hst.Add(mQuickStackh4);
                    hst.Add(mQuickStackh5);
                    hst.Add(mQuickStackh6);
                    hst.Add(mQuickStackh7);
                    hst.Add(mQuickStackh8);
                    hst.Add(mQuickStackh9);
                    hst.Add(mQuickStackh10);
                    hst.Add(mQuickStackh11);

                    hID.Add(nQuickieIDh0);
                    hID.Add(nQuickieIDh1);
                    hID.Add(nQuickieIDh2);
                    hID.Add(nQuickieIDh3);
                    hID.Add(nQuickieIDh4);
                    hID.Add(nQuickieIDh5);
                    hID.Add(nQuickieIDh6);
                    hID.Add(nQuickieIDh7);
                    hID.Add(nQuickieIDh8);
                    hID.Add(nQuickieIDh9);
                    hID.Add(nQuickieIDh10);
                    hID.Add(nQuickieIDh11);

                    chkQuickieh0 = new HudCheckBox(); hchk.Add(chkQuickieh0);
                    chkQuickieh1 = new HudCheckBox(); hchk.Add(chkQuickieh1);
                    chkQuickieh2 = new HudCheckBox(); hchk.Add(chkQuickieh2);
                    chkQuickieh3 = new HudCheckBox(); hchk.Add(chkQuickieh3);
                    chkQuickieh4 = new HudCheckBox(); hchk.Add(chkQuickieh4);
                    chkQuickieh5 = new HudCheckBox(); hchk.Add(chkQuickieh5);
                    chkQuickieh6 = new HudCheckBox(); hchk.Add(chkQuickieh6);
                    chkQuickieh7 = new HudCheckBox(); hchk.Add(chkQuickieh7);
                    chkQuickieh8 = new HudCheckBox(); hchk.Add(chkQuickieh8);
                    chkQuickieh9 = new HudCheckBox(); hchk.Add(chkQuickieh9);
                    chkQuickieh10 = new HudCheckBox(); hchk.Add(chkQuickieh10);
                    chkQuickieh11 = new HudCheckBox(); hchk.Add(chkQuickieh11);

                    quickieshHud_Head.AddControl(chkQuickieh0, new Rectangle(30, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh1, new Rectangle(45, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh2, new Rectangle(60, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh3, new Rectangle(75, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh5, new Rectangle(95, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh6, new Rectangle(110, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh7, new Rectangle(125, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh8, new Rectangle(140, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh9, new Rectangle(155, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh10, new Rectangle(170, 15, 12, 12));
                    quickieshHud_Head.AddControl(chkQuickieh11, new Rectangle(185, 15, 12, 12));

                    quickieshHud.Moved += (sender, obj) => quickieshHud_Moved(sender, obj);
                    btnQuickieshAdd.Hit += (sender, obj) => btnQuickieshAdd_Hit(sender, obj);
                    btnQuickieshRemove.Hit += (sender, obj) => btnQuickieshRemove_Hit(sender, obj);
                    chkQuickieh0.Change += (sender, obj) => chkQuickieh0_Change(sender, obj);
                    chkQuickieh1.Change += (sender, obj) => chkQuickieh1_Change(sender, obj);
                    chkQuickieh2.Change += (sender, obj) => chkQuickieh2_Change(sender, obj);
                    chkQuickieh3.Change += (sender, obj) => chkQuickieh3_Change(sender, obj);
                    chkQuickieh4.Change += (sender, obj) => chkQuickieh4_Change(sender, obj);
                    chkQuickieh5.Change += (sender, obj) => chkQuickieh5_Change(sender, obj);
                    chkQuickieh6.Change += (sender, obj) => chkQuickieh6_Change(sender, obj);
                    chkQuickieh7.Change += (sender, obj) => chkQuickieh7_Change(sender, obj);
                    chkQuickieh8.Change += (sender, obj) => chkQuickieh8_Change(sender, obj);
                    chkQuickieh9.Change += (sender, obj) => chkQuickieh9_Change(sender, obj);
                    chkQuickieh10.Change += (sender, obj) => chkQuickieh10_Change(sender, obj);
                    chkQuickieh11.Change += (sender, obj) => chkQuickieh11_Change(sender, obj);

                    if (xdocQuickSlotsh.Root.HasElements)
                    {
                        doGetData(xdocQuickSlotsh, quickSlotshFilename);
                    }

                }

                Decal.Adapter.CoreManager.Current.ItemSelected += new EventHandler<ItemSelectedEventArgs>(Current_ItemSelected);
                CoreManager.Current.RenderFrame += new EventHandler<EventArgs>(Current_RenderFrame);

            }
            catch (Exception ex) { Mishna.PluginCore.Util.LogError(ex); }
        }
Ejemplo n.º 16
0
        public void IDHud()
        {
            try
            {
               VirindiViewService.HudView ID_Hud = new VirindiViewService.HudView(null, 60, 105, new ACImage(Color.Black), false);

               ID_Hud.Visible = true;
               ID_Hud.UserGhostable = false;
               ID_Hud.Ghosted = true;
               ID_Hud.UserMinimizable = false;
               ID_Hud.UserAlphaChangeable = false;
               ID_Hud.ShowIcon = false;
               ID_Hud.ClickThrough = true;
               ID_Hud.Theme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");
               //ViewR.LoadUserSettings();

            //               ViewR_Head = new VirindiViewService.Controls.HudFixedLayout();
            //               ViewR.Controls.HeadControl = ViewR_Head;

            //               int y = 0;
            //
            //               imgTaper = new HudPictureBox();
            //               ViewR_Head.AddControl(imgTaper, new Rectangle(0, y, 0x10, 0x10));
            //               imgTaper.Image = new ACImage(9770);
            //
            //               txtTapers = new HudStaticText();
            //               txtTapers.FontHeight = 9;
            //               txtTapers.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtTapers, new Rectangle(20, y, 40, 0x10));
            //
            //               y += 0x12;
            //
            //               imgManaScarab = new HudPictureBox();
            //               ViewR_Head.AddControl(imgManaScarab, new Rectangle(0, y, 0x10, 0x10));
            //               imgManaScarab.Image = new ACImage(26533);
            //
            //               txtManaScarabs = new HudStaticText();
            //               txtManaScarabs.FontHeight = 9;
            //               txtManaScarabs.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtManaScarabs, new Rectangle(15, y, 18, 0x10));
            //
            //               imgMassiveManaCharge = new HudPictureBox();
            //               ViewR_Head.AddControl(imgMassiveManaCharge, new Rectangle(33, y, 0x10, 0x10));
            //               imgMassiveManaCharge.Image = new ACImage(13107);
            //
            //               txtMassiveManaCharges = new HudStaticText();
            //               txtMassiveManaCharges.FontHeight = 9;
            //               txtMassiveManaCharges.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtMassiveManaCharges, new Rectangle(46, y, 12, 0x10));
            //
            //               y += 0x12;
            //
            //               imgPlatinumScarab = new HudPictureBox();
            //               ViewR_Head.AddControl(imgPlatinumScarab, new Rectangle(0, y, 0x10, 0x10));
            //               imgPlatinumScarab.Image = new ACImage(8033);
            //
            //               txtPlatinumScarabs = new HudStaticText();
            //               txtPlatinumScarabs.FontHeight = 9;
            //               txtPlatinumScarabs.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtPlatinumScarabs, new Rectangle(15, y, 18, 0x10));
            //
            //               imgMajorManaStone = new HudPictureBox();
            //               ViewR_Head.AddControl(imgMajorManaStone, new Rectangle(33, y, 0x10, 0x10));
            //               imgMajorManaStone.Image = new ACImage(13012);
            //
            //               txtManaStones = new HudStaticText();
            //               txtManaStones.FontHeight = 9;
            //               txtManaStones.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtManaStones, new Rectangle(46, y, 12, 0x10));
            //
            //               y += 0x12;
            //
            //               txtHoursLeft = new HudStaticText();
            //               txtHoursLeft.FontHeight = 9;
            //               txtHoursLeft.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtHoursLeft, new Rectangle(0, y, 30, 0x10));
            //
            //               imgTreatedHealingKit = new HudPictureBox();
            //               ViewR_Head.AddControl(imgTreatedHealingKit, new Rectangle(31, y, 0x10, 0x10));
            //               imgTreatedHealingKit.Image = new ACImage(13029);
            //
            //               txtHealingKits = new HudStaticText();
            //               txtHealingKits.FontHeight = 9;
            //               txtHealingKits.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtHealingKits, new Rectangle(46, y, 12, 0x10));
            //
            //               y += 0x12;
            //
            //               imgMMD = new HudPictureBox();
            //               ViewR_Head.AddControl(imgMMD, new Rectangle(0, y, 0x10, 0x10));
            //               imgMMD.Image = new ACImage(10081);
            //
            //               txtMMDs = new HudStaticText();
            //               txtMMDs.FontHeight = 9;
            //               txtMMDs.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtMMDs, new Rectangle(15, y, 18, 0x10));
            //
            //               txtInactiveEquipment = new HudStaticText();
            //               txtInactiveEquipment.FontHeight = 9;
            //               txtInactiveEquipment.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtInactiveEquipment, new Rectangle(46, y, 12, 0x10));
            //
            //               y += 0x12;
            //
            //               imgPeas = new HudPictureBox();
            //               ViewR_Head.AddControl(imgPeas, new Rectangle(0, y, 0x10, 0x10));
            //               imgPeas.Image = new ACImage(7788);
            //
            //               txtPeas = new HudStaticText();
            //               txtPeas.FontHeight = 9;
            //               txtPeas.TextColor = Color.White;
            //               ViewR_Head.AddControl(txtPeas, new Rectangle(15, y, 18, 0x10));
            //
            //               txtFreePackSlots = new HudStaticText();
            //               txtFreePackSlots.FontHeight = 9;
            //	           txtFreePackSlots.TextColor = Color.White;
            //	           ViewR_Head.AddControl(txtFreePackSlots, new Rectangle(46, y, 12, 0x10));

            //	            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 { }
        }
Ejemplo n.º 17
0
        private void doQuickieChkWork(Int32 qid, XDocument xdoc, string filename, Int32 n, VirindiViewService.HudView hud)
        {
            if (bremoveItem)
            {
                try
                {
                    IEnumerable<XElement> elements = xdoc.Element("Objs").Descendants("Obj");

                    xdoc.Descendants("Obj").Where(x => x.Element("QID").Value == qid.ToString()).Remove();
                    xdoc.Save(filename);
                }
                catch (Exception ex) { Mishna.PluginCore.Util.LogError(ex); }
                bremoveItem = false;

                if (filename == quickSlotsvFilename)
                {
                    doClearHud(quickiesvHud, xdocQuickSlotsv, quickSlotsvFilename);
                    hud.Dispose();
                    hud = null;
                    xdocQuickSlotsv = XDocument.Load(quickSlotsvFilename);
                    quickiesvHud = new HudView();
                    hud = quickiesvHud;
                }
                else if (filename == quickSlotshFilename)
                {
                    doClearHud(quickieshHud, xdocQuickSlotsh, quickSlotshFilename);
                    hud.Dispose();
                    hud = null;
                    xdocQuickSlotsh = XDocument.Load(quickSlotshFilename);
                    quickieshHud = new HudView();
                    hud = quickieshHud;
                }

                createQuickies(hud);
                if (xdoc == xdocQuickSlotsv) { doGetData(xdocQuickSlotsv, quickSlotsvFilename); }
                else if (xdoc == xdocQuickSlotsh) { doGetData(xdocQuickSlotsh, quickSlotshFilename); }
            }
            else if (!bremoveItem)
            {

                CoreManager.Current.Actions.UseItem(qid, 0);

            }
        }
Ejemplo n.º 18
0
        private void DisposeHorizontalQuickSlots()
        {
            if (btnQuickieshAdd != null) { btnQuickieshAdd.Hit -= (sender, obj) => btnQuickieshAdd_Hit(sender, obj); btnQuickieshAdd.Dispose(); }
            if (btnQuickieshRemove != null) { btnQuickieshRemove.Hit -= (sender, obj) => btnQuickieshRemove_Hit(sender, obj); btnQuickieshRemove.Dispose(); }
            if (btnQuickieshDual != null) { btnQuickieshDual.Hit -= (sender, obj) => btnQuickieshDual_Hit(sender, obj); btnQuickieshDual.Dispose(); }

            if (mQuickStackh0 != null) { mQuickStackh0.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh0.Dispose(); }
            if (mQuickStackh1 != null) { mQuickStackh1.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh1.Dispose(); }
            if (mQuickStackh2 != null) { mQuickStackh2.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh2.Dispose(); }
            if (mQuickStackh3 != null) { mQuickStackh3.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh3.Dispose(); }
            if (mQuickStackh4 != null) { mQuickStackh4.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh4.Dispose(); }
            if (mQuickStackh5 != null) { mQuickStackh5.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh5.Dispose(); }
            if (mQuickStackh6 != null) { mQuickStackh6.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh6.Dispose(); }
            if (mQuickStackh7 != null) { mQuickStackh7.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh7.Dispose(); }
            if (mQuickStackh8 != null) { mQuickStackh8.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh8.Dispose(); }
            if (mQuickStackh9 != null) { mQuickStackh9.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh9.Dispose(); }
            if (mQuickStackh10 != null) { mQuickStackh10.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh10.Dispose(); }
            if (mQuickStackh11 != null) { mQuickStackh11.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh11.Dispose(); }
            if (mQuickStackh12 != null) { mQuickStackh12.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh12.Dispose(); }
            if (mQuickStackh13 != null) { mQuickStackh13.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh13.Dispose(); }
            if (mQuickStackh14 != null) { mQuickStackh14.Hit -= (sender, obj) => mQuickStackh0_Hit(sender, obj); mQuickStackh14.Dispose(); }

            quickieshTabView.Dispose();
            quickieshHud.Dispose();

             nquickieh = 0;
              try
                    {
                        for (int i = 0; i < hst.Count; i++)
                        { hst[i] = null; }
                    }
               catch (Exception ex) { LogError(ex); }

               try
                    {
                        for (int i = 0; i < hID.Count; i++)
                        { hID[i] = 0; }
                    }

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

            quickieshHud = null;
        }
        private void RenderHorizontalQuickSlots()
        {
            WriteToChat("I am in the function to render horizontal quickslots");

            if (quickieshHud != null)
            {
                DisposeHorizontalQuickSlots();
            }

             if (!File.Exists(quickSlotshFilename))
                {
                    XDocument tempDoc = new XDocument(new XElement("Objs"));
                    tempDoc.Save(quickSlotshFilename);
                    tempDoc = null;
                }

                xdocQuickSlotsh = XDocument.Load(quickSlotshFilename);

                if (hpt.X == 0) { hpt.X = 200; }
                if (hpt.Y == 0) { hpt.Y = 200; }

            quickieshHud = new VirindiViewService.HudView("", 340, 30, new ACImage(Color.Transparent));
            quickieshHud.ShowInBar = false;
            quickieshHud.UserAlphaChangeable = false;
            quickieshHud.Visible = true;
            quickieshHud.UserGhostable = true;
            quickieshHud.UserMinimizable = false;
            quickieshHud.UserResizeable = false;
            quickieshHud.Location = hpt;
            //if (mhtheme == null)
            //    mhtheme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");
            //quickieshHud.Theme = mhtheme;

            //  quickieshHud.Theme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");

            quickieshHud_Head = new HudFixedLayout();
            quickieshHud.Controls.HeadControl = quickieshHud_Head;

            btnQuickieshAdd = new VirindiViewService.Controls.HudButton();
            btnQuickieshAdd.Text = "+";
            btnQuickieshAdd.Visible = true;

            btnQuickieshRemove = new VirindiViewService.Controls.HudButton();
            btnQuickieshRemove.Text = "-";
            btnQuickieshRemove.Visible = true;

            quickieshHud_Head.AddControl(btnQuickieshAdd, new Rectangle(0, 0, 12, 12));
            quickieshHud_Head.AddControl(btnQuickieshRemove, new Rectangle(15, 0, 12, 12));

            mQuickStackh0 = new HudImageStack();
            mQuickStackh1 = new HudImageStack();
            mQuickStackh2 = new HudImageStack();
            mQuickStackh3 = new HudImageStack();
            mQuickStackh4 = new HudImageStack();
            mQuickStackh5 = new HudImageStack();
            mQuickStackh6 = new HudImageStack();
            mQuickStackh7 = new HudImageStack();
            mQuickStackh8 = new HudImageStack();
            mQuickStackh9 = new HudImageStack();
            mQuickStackh10 = new HudImageStack();
            mQuickStackh11 = new HudImageStack();
            mQuickStackh12 = new HudImageStack();
            mQuickStackh13 = new HudImageStack();
            mQuickStackh14 = new HudImageStack();

            chkQuickieh0 = new HudCheckBox();
            chkQuickieh1 = new HudCheckBox();
            chkQuickieh2 = new HudCheckBox();
            chkQuickieh3 = new HudCheckBox();
            chkQuickieh4 = new HudCheckBox();
            chkQuickieh5 = new HudCheckBox();
            chkQuickieh6 = new HudCheckBox();
            chkQuickieh7 = new HudCheckBox();
            chkQuickieh8 = new HudCheckBox();
            chkQuickieh9 = new HudCheckBox();
            chkQuickieh10 = new HudCheckBox();
            chkQuickieh11 = new HudCheckBox();
            chkQuickieh12 = new HudCheckBox();
            chkQuickieh13 = new HudCheckBox();
            chkQuickieh14 = new HudCheckBox();

            hst.Add(mQuickStackh0);
            hst.Add(mQuickStackh1);
            hst.Add(mQuickStackh2);
            hst.Add(mQuickStackh3);
            hst.Add(mQuickStackh4);
            hst.Add(mQuickStackh5);
            hst.Add(mQuickStackh6);
            hst.Add(mQuickStackh7);
            hst.Add(mQuickStackh8);
            hst.Add(mQuickStackh9);
            hst.Add(mQuickStackh10);
            hst.Add(mQuickStackh11);
            hst.Add(mQuickStackh12);
            hst.Add(mQuickStackh13);
            hst.Add(mQuickStackh14);

            hID.Add(nQuickieIDh0);
            hID.Add(nQuickieIDh1);
            hID.Add(nQuickieIDh2);
            hID.Add(nQuickieIDh3);
            hID.Add(nQuickieIDh4);
            hID.Add(nQuickieIDh5);
            hID.Add(nQuickieIDh6);
            hID.Add(nQuickieIDh7);
            hID.Add(nQuickieIDh8);
            hID.Add(nQuickieIDh9);
            hID.Add(nQuickieIDh10);
            hID.Add(nQuickieIDh11);
            hID.Add(nQuickieIDh12);
            hID.Add(nQuickieIDh13);
            hID.Add(nQuickieIDh14);

            chkQuickieh0 = new HudCheckBox(); hchk.Add(chkQuickieh0);
            chkQuickieh1 = new HudCheckBox(); hchk.Add(chkQuickieh1);
            chkQuickieh2 = new HudCheckBox(); hchk.Add(chkQuickieh2);
            chkQuickieh3 = new HudCheckBox(); hchk.Add(chkQuickieh3);
            chkQuickieh4 = new HudCheckBox(); hchk.Add(chkQuickieh4);
            chkQuickieh5 = new HudCheckBox(); hchk.Add(chkQuickieh5);
            chkQuickieh6 = new HudCheckBox(); hchk.Add(chkQuickieh6);
            chkQuickieh7 = new HudCheckBox(); hchk.Add(chkQuickieh7);
            chkQuickieh8 = new HudCheckBox(); hchk.Add(chkQuickieh8);
            chkQuickieh9 = new HudCheckBox(); hchk.Add(chkQuickieh9);
            chkQuickieh10 = new HudCheckBox(); hchk.Add(chkQuickieh10);
            chkQuickieh11 = new HudCheckBox(); hchk.Add(chkQuickieh11);
            chkQuickieh12= new HudCheckBox(); hchk.Add(chkQuickieh12);
            chkQuickieh13 = new HudCheckBox(); hchk.Add(chkQuickieh13);
            chkQuickieh14 = new HudCheckBox(); hchk.Add(chkQuickieh14);

            quickieshHud_Head.AddControl(chkQuickieh0, new Rectangle(30, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh1, new Rectangle(50, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh2, new Rectangle(70, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh3, new Rectangle(90, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh4, new Rectangle(110, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh5, new Rectangle(130, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh6, new Rectangle(150, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh7, new Rectangle(170, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh8, new Rectangle(190, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh9, new Rectangle(210, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh10, new Rectangle(230, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh11, new Rectangle(250, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh12, new Rectangle(270, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh13, new Rectangle(290, 20, 20, 10));
            quickieshHud_Head.AddControl(chkQuickieh14, new Rectangle(310, 20, 20, 10));

            quickieshHud.ThemeChanged += (sender, obj) => quickieshHud_ThemeChanged(sender, obj);
            quickieshHud.Moved += (sender, obj) => quickieshHud_Moved(sender, obj);
            btnQuickieshAdd.Hit += (sender, obj) => btnQuickieshAdd_Hit(sender, obj);
            btnQuickieshRemove.Hit += (sender, obj) => btnQuickieshRemove_Hit(sender, obj);
            chkQuickieh0.Change += (sender, obj) => chkQuickieh0_Change(sender, obj);
            chkQuickieh1.Change += (sender, obj) => chkQuickieh1_Change(sender, obj);
            chkQuickieh2.Change += (sender, obj) => chkQuickieh2_Change(sender, obj);
            chkQuickieh3.Change += (sender, obj) => chkQuickieh3_Change(sender, obj);
            chkQuickieh4.Change += (sender, obj) => chkQuickieh4_Change(sender, obj);
            chkQuickieh5.Change += (sender, obj) => chkQuickieh5_Change(sender, obj);
            chkQuickieh6.Change += (sender, obj) => chkQuickieh6_Change(sender, obj);
            chkQuickieh7.Change += (sender, obj) => chkQuickieh7_Change(sender, obj);
            chkQuickieh8.Change += (sender, obj) => chkQuickieh8_Change(sender, obj);
            chkQuickieh9.Change += (sender, obj) => chkQuickieh9_Change(sender, obj);
            chkQuickieh10.Change += (sender, obj) => chkQuickieh10_Change(sender, obj);
            chkQuickieh11.Change += (sender, obj) => chkQuickieh11_Change(sender, obj);
            chkQuickieh12.Change += (sender, obj) => chkQuickieh12_Change(sender, obj);
            chkQuickieh13.Change += (sender, obj) => chkQuickieh13_Change(sender, obj);
            chkQuickieh14.Change += (sender, obj) => chkQuickieh14_Change(sender, obj);

            if (xdocQuickSlotsh.Root.HasElements)
            {
                doGetData(xdocQuickSlotsh, quickSlotshFilename);
            }
        }
Ejemplo n.º 20
0
        private void RenderHorizontalQuickSlots()
        {
            if (quickieshHud != null)
            {
                DisposeHorizontalQuickSlots();
            }

             if (!File.Exists(quickSlotshFilename))
                {
                    XDocument tempQuickDoc = new XDocument(new XElement("Objs"));
                    tempQuickDoc.Save(quickSlotshFilename);
                    tempQuickDoc = null;
                }

                xdocQuickSlotsh = XDocument.Load(quickSlotshFilename);
                nCountH = xdocQuickSlotsh.Root.Descendants().Count();
                nCountH = nCountH / 5;

                quickieshHud = new VirindiViewService.HudView("", 30 + 25*nCountH, 40, new ACImage(Color.Transparent),false,"quickieshhud");
                quickieshHud.ShowInBar = false;
                quickieshHud.UserAlphaChangeable = false;
                quickieshHud.Visible = true;
                quickieshHud.UserGhostable = true;
                quickieshHud.UserMinimizable = false;
                 quickieshHud.UserClickThroughable = false;
                quickieshHud.UserResizeable = false;
                quickieshHud.LoadUserSettings();

                quickieshTabView = new HudTabView();
                quickieshHud.Controls.HeadControl = quickieshTabView;
                quickieshTabFixedLayout = new HudFixedLayout();

                quickieshTabView.AddTab(quickieshTabFixedLayout, "Horizontal Switchgear");

                btnQuickieshAdd = new VirindiViewService.Controls.HudButton();
                btnQuickieshAdd.Text = "+";
                btnQuickieshAdd.Visible = true;

                btnQuickieshDual = new VirindiViewService.Controls.HudButton();
                btnQuickieshDual.Text = "~";
                btnQuickieshDual.Visible = true;

                btnQuickieshRemove = new VirindiViewService.Controls.HudButton();
                btnQuickieshRemove.Text = "-";
                btnQuickieshRemove.Visible = true;

            quickieshTabFixedLayout.AddControl(btnQuickieshAdd, new Rectangle(0, 0, 12, 12));
            quickieshTabFixedLayout.AddControl(btnQuickieshRemove, new Rectangle(15, 0, 12, 12));
            quickieshTabFixedLayout.AddControl(btnQuickieshDual, new Rectangle(30, 0, 12, 12));

            mQuickStackh0 = new HudImageStack();
            mQuickStackh1 = new HudImageStack();
            mQuickStackh2 = new HudImageStack();
            mQuickStackh3 = new HudImageStack();
            mQuickStackh4 = new HudImageStack();
            mQuickStackh5 = new HudImageStack();
            mQuickStackh6 = new HudImageStack();
            mQuickStackh7 = new HudImageStack();
            mQuickStackh8 = new HudImageStack();
            mQuickStackh9 = new HudImageStack();
            mQuickStackh10 = new HudImageStack();
            mQuickStackh11 = new HudImageStack();
            mQuickStackh12 = new HudImageStack();
            mQuickStackh13 = new HudImageStack();
            mQuickStackh14 = new HudImageStack();

             hst.Add(mQuickStackh0);
            hst.Add(mQuickStackh1);
            hst.Add(mQuickStackh2);
            hst.Add(mQuickStackh3);
            hst.Add(mQuickStackh4);
            hst.Add(mQuickStackh5);
            hst.Add(mQuickStackh6);
            hst.Add(mQuickStackh7);
            hst.Add(mQuickStackh8);
            hst.Add(mQuickStackh9);
            hst.Add(mQuickStackh10);
            hst.Add(mQuickStackh11);
            hst.Add(mQuickStackh12);
            hst.Add(mQuickStackh13);
            hst.Add(mQuickStackh14);

            hID.Add(nQuickieIDh0);
            hID.Add(nQuickieIDh1);
            hID.Add(nQuickieIDh2);
            hID.Add(nQuickieIDh3);
            hID.Add(nQuickieIDh4);
            hID.Add(nQuickieIDh5);
            hID.Add(nQuickieIDh6);
            hID.Add(nQuickieIDh7);
            hID.Add(nQuickieIDh8);
            hID.Add(nQuickieIDh9);
            hID.Add(nQuickieIDh10);
            hID.Add(nQuickieIDh11);
            hID.Add(nQuickieIDh12);
            hID.Add(nQuickieIDh13);
            hID.Add(nQuickieIDh14);

            btnQuickieshAdd.Hit += (sender, obj) => btnQuickieshAdd_Hit(sender, obj);
            btnQuickieshRemove.Hit += (sender, obj) => btnQuickieshRemove_Hit(sender, obj);
            btnQuickieshDual.Hit += (sender, obj) => btnQuickieshDual_Hit(sender, obj);

            if (xdocQuickSlotsh.Root.HasElements)
            {
                doGetData(xdocQuickSlotsh, quickSlotshFilename);
            }
        }
        private void RenderVerticalQuickSlots()
        {
            WriteToChat("I am in the function to render vertical quickslots");

            if (quickiesvHud != null)
            {
                DisposeVerticalQuickSlots();
            }
            if (!File.Exists(quickSlotsvFilename))
            {
                XDocument tempDoc = new XDocument(new XElement("Objs"));
                tempDoc.Save(quickSlotsvFilename);
                tempDoc = null;
            }

            xdocQuickSlotsv = XDocument.Load(quickSlotsvFilename);

            if (vpt.X == 0) { vpt.X = 200; }
            if (vpt.Y == 0) { vpt.Y = 200; }

            quickiesvHud = new VirindiViewService.HudView("", 30, 340, new ACImage(Color.Transparent));
            quickiesvHud.ShowInBar = false;
            quickiesvHud.UserAlphaChangeable = false;
            quickiesvHud.Visible = true;
            quickiesvHud.UserGhostable = true;
            quickiesvHud.UserMinimizable = false;
            quickiesvHud.UserResizeable = false;
            quickiesvHud.Location = vpt;
            //if (mvtheme == null)
            //    mvtheme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");
            //quickieshHud.Theme = mvtheme;
            quickiesvHud_Head = new HudFixedLayout();
            quickiesvHud.Controls.HeadControl = quickiesvHud_Head;

            btnQuickiesvAdd = new VirindiViewService.Controls.HudButton();
            btnQuickiesvAdd.Text = "+";
            btnQuickiesvAdd.Visible = true;

            btnQuickiesvRemove = new VirindiViewService.Controls.HudButton();
            btnQuickiesvRemove.Text = "-";
            btnQuickiesvRemove.Visible = true;

            quickiesvHud_Head.AddControl(btnQuickiesvAdd, new Rectangle(0, 0, 12, 12));
            quickiesvHud_Head.AddControl(btnQuickiesvRemove, new Rectangle(15, 0, 12, 12));

            mQuickStackv0 = new HudImageStack();
            mQuickStackv1 = new HudImageStack();
            mQuickStackv2 = new HudImageStack();
            mQuickStackv3 = new HudImageStack();
            mQuickStackv4 = new HudImageStack();
            mQuickStackv5 = new HudImageStack();
            mQuickStackv6 = new HudImageStack();
            mQuickStackv7 = new HudImageStack();
            mQuickStackv8 = new HudImageStack();
            mQuickStackv9 = new HudImageStack();
            mQuickStackv10 = new HudImageStack();
            mQuickStackv11 = new HudImageStack();
            mQuickStackv12 = new HudImageStack();
            mQuickStackv13 = new HudImageStack();
            mQuickStackv14 = new HudImageStack();

            //vst.Add(mQuickStackv0);
            //vst.Add(mQuickStackv1);
            //vst.Add(mQuickStackv2);
            //vst.Add(mQuickStackv3);
            //vst.Add(mQuickStackv4);
            //vst.Add(mQuickStackv5);
            //vst.Add(mQuickStackv6);
            //vst.Add(mQuickStackv7);
            //vst.Add(mQuickStackv8);
            //vst.Add(mQuickStackv9);
            //vst.Add(mQuickStackv10);
            //vst.Add(mQuickStackv11);
            //vst.Add(mQuickStackv12);
            //vst.Add(mQuickStackv13);
            //vst.Add(mQuickStackv14);

            //vID.Add(nQuickieIDv0);
            //vID.Add(nQuickieIDv1);
            //vID.Add(nQuickieIDv2);
            //vID.Add(nQuickieIDv3);
            //vID.Add(nQuickieIDv4);
            //vID.Add(nQuickieIDv5);
            //vID.Add(nQuickieIDv6);
            //vID.Add(nQuickieIDv7);
            //vID.Add(nQuickieIDv8);
            //vID.Add(nQuickieIDv9);
            //vID.Add(nQuickieIDv10);
            //vID.Add(nQuickieIDv11);
            //vID.Add(nQuickieIDv12);
            //vID.Add(nQuickieIDv13);
            //vID.Add(nQuickieIDv14);

            //quickiesvHud.ThemeChanged += (sender, obj) => quickiesvHud_ThemeChanged(sender, obj);
            //quickiesvHud.Moved += (sender, obj) => quickiesvHud_Moved(sender, obj);
            btnQuickiesvAdd.Hit += (sender, obj) => btnQuickiesvAdd_Hit(sender, obj);
            btnQuickiesvRemove.Hit += (sender, obj) => btnQuickiesvRemove_Hit(sender, obj);
            mQuickStackv0.Hit += (sender, obj) => mQuickStackv0_Hit(sender, obj);
            //   mQuickStackv0.GotFocus += (sender, e) => mQuickStackv0_GotFocus(sender, e);

            if (xdocQuickSlotsv.Root.HasElements)
            {
                doGetData(xdocQuickSlotsv, quickSlotsvFilename);
            }
        }