示例#1
0
        private static void SBO_Application_PrintEvent(ref SAPbouiCOM.PrintEventInfo oPrinteventInfo, out bool bBubbleEvent)
        {
            bBubbleEvent = true;

            try
            {
                foreach (var assembly in CommonFunctions.GetAssemblies(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins")))
                {
                    foreach (Type type in Assembly.LoadFrom(assembly.FullName).GetTypes().Where(i => i.GetInterface("ISAPBusinessOne") != null))
                    {
                        try
                        {
                            ISAPBusinessOne pluginclass = (ISAPBusinessOne)Activator.CreateInstance(type);
                            pluginclass.SBO_Application_PrintEvent(ref oPrinteventInfo, sbo_company, ref sbo_application, out bBubbleEvent);
                            if (!bBubbleEvent)
                            {
                                return;
                            }
                        }
                        catch (Exception ex)
                        {
                            CommonFunctions.LogFile(LogFile, ex.ToString());
                            sbo_application.MessageBox(ex.Message);
                            //sbo_application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                sbo_application.MessageBox(ex.Message);
            }
        }
示例#2
0
 void m_SAPApplication_PrintEvent(ref SAPbouiCOM.PrintEventInfo eventInfo, out bool BubbleEvent)
 {
     //throw new NotImplementedException();
     BubbleEvent = true;
 }