/// <summary> /// Registers the listening methods for LoaderControlSystem /// This is called from Program class /// </summary> /// <param name="lcs">Lcs.</param> public void RegisterLoadingListener(LoaderControlSystem lcs) { this.m_lcs = lcs; this.m_lcs.RaiseLoadingPercentage += Lcs_RaiseLoadingPercentage; this.m_lcs.RaiseNewProduct += Lcs_RaiseNewProduct; this.m_lcs.RaiseMinAmountEventLoaded += Lcs_RaiseMinAmountEventLoaded; this.m_lcs.RaiseDuplicate += Lcs_RaiseDuplicate; }
// Listener for the UIController to propagate the event. private void UiAction_RaiseStartProcess(object sender, PathEventArg e) { string path = e.path; // IFileProcess parses the json IFileProcess fileProcess = new FileProcess(path); // Parse the json into actual data LoaderControlSystem lcs = new LoaderControlSystem(this, path, fileProcess, 1000); this.m_uiCtrl.RegisterLoadingListener(lcs); }