示例#1
0
        public void RefreshCharacterValues()
        {
            string previousName = CharacterName;

            CharacterName = ProcessHandler.ReadStringAddress(ClientProcess, Variables.Addresses.characterName); //Listview will ignore \0, so no need to replace
            if (previousName != null && !previousName.Equals(CharacterName))
            {
                //Means the user restarted the client and logged in to a different client.
                DefaultValues();
            }
        }
示例#2
0
 private void RefreshListView() //The method which thread executes, so value this.
 {
     //TODO : There could be a better way. Now it works.
     if (listView_Characters.InvokeRequired)
     {
         listView_Characters.Invoke((MethodInvoker) delegate()
         {
             RefreshListView();
         });
     }
     else
     {
         bool didProcessChange = characterHelper.RenewAndCheckForChange(ProcessHandler.GetRelativeProcesses());
         if (didProcessChange)
         {
             listView_Characters.Items.Clear(); //My way of refreshing.
             AddRowsToList();
         }
         else
         {
             //Seems nothing has been changed.
         }
     }
 }
示例#3
0
 public void HideClient()
 {
     ProcessHandler.ChangeProcessState(ClientProcess.MainWindowHandle, Variables.WindowHandles.hide);
     HiddenState = true;
 }
示例#4
0
 public void ShowClient()
 {
     ProcessHandler.ChangeProcessState(ClientProcess.MainWindowHandle, Variables.WindowHandles.show);
     HiddenState = false;
 }