public override bool OnConnect() { try { AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; m_Container = new ServicesContainer(App); m_UserSettings = m_Container.GetService <IUserSettingsService>(); m_Controller = m_Container.GetService <RoundStockController>(); m_Controller.FeatureInsertionCompleted += OnFeatureInsertionCompleted; AddCommandGroup <Commands_e>(OnCommandClick); return(true); } catch (Exception ex) { try { m_Container.GetService <ILogService>().LogException(ex); } catch { } App.SendMsgToUser2($"Failed to load {Resources.AppTitle}. Please see log for more details", (int)swMessageBoxIcon_e.swMbStop, (int)swMessageBoxBtn_e.swMbOk); return(false); } }
public RoundStockMacroFeature() : base() { m_StockModel = ServicesContainer.Instance.GetService <RoundStockModel>(); m_Controller = ServicesContainer.Instance.GetService <RoundStockController>(); m_Controller.FeatureEditingCompleted += OnFeatureEditingCompleted; }