Bug fix where ActiveGameIndex is not set correctly on program Startup
Hey good, I hope you are well. After a lot of time coding and very little because university things I started adding functionalities for ASC 3.0 after my new interface was finished.
I have a problem with the combobox that we used to set the active splitter did'nt set on Startup,
BEFORE HCM INTERFACE IMPLEMENT
LoadAutoSplitterSettings.Invoke(AutoSplitterInstance, [profCtrl, this]);
List<string> GameList = (List<string>)GetGames.Invoke(AutoSplitterInstance, null);
foreach (string i in GameList) comboBoxGame.Items.Add(i);
comboBoxGame.SelectedIndex = (int)GetSplitterEnable.Invoke(AutoSplitterInstance, null);
PracticeModeCheck.Checked = (bool)GetPracticeMode.Invoke(AutoSplitterInstance, null);
AFTER HCM INTERFACE IMPLEMENT
AutoSplitterCoreModule.AutoSplitterRegisterInterface(InterfaceASC);
comboBoxGame.Items.Clear();
foreach (string game in InterfaceASC.GameList)
{
comboBoxGame.Items.Add(game);
}
LoadAutoSplitterHotKeys();
You added
interfaceASC.ActiveGameIndex = GetSplitterEnable(); on ASC in RegisterHitCounterManagerInterface() Function
but the problem for manage this by the function is that called before fill ComboBox on HCM, then this raises an OutOfRange exception in the comboBox, to fix this im added GetActiveGameIndexMethod Function.
Remember that now ASC Fill ObservableCollection
I dont know why PracticeMode still working but if it works that's enough, maybe is manage by other function.
I have the solution for V2.X but i cant do a PR because There is a commits before or affter in the current branch so I can't do it without breaking everything
Im attach the files that i change HitCounterManagerV2-Fix.zip