|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
本帖最后由 cpmodel 于 2013-3-6 10:11 编辑
位于C:\U8SOFT\Portal\USNPASink.dll中,EnterprisePortal.exe调用USNPASink中NPASink类的Startup方法!至于如何调用的,因为
EnterprisePortal.exe是VB写的,好像目前没有工具可以把VB的代码反编译!- public bool Startup(IntPtr owner)
- {
- AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(NPASink.CurrentDomain_UnhandledException);
- Application.ThreadException += new ThreadExceptionEventHandler(NPASink.Application_ThreadException);
- int hMutex = JOI.EnterInst();
- if (hMutex == 0)
- {
- if (MessageBox.Show(SR.GetString("s.singleinst"), SR.GetString("s.portal"), MessageBoxButtons.YesNo) == DialogResult.No)
- {
- goto Label_0242;
- }
- SR.Reset();
- ProcessUtils.TerminateProcess("EnterprisePortal");
- }
- ProcessUtils.TerminateProcess(new string[] { "EnterprisePortal" });
- IWin32Window splashWindow = null;
- try
- {
- string str;
- try
- {
- Application.SetCompatibleTextRenderingDefault(false);
- }
- catch (Exception exception)
- {
- DBG.DbgTrace(exception.ToString(), new object[0]);
- }
- this.mfa = new EplAdvisor(owner, hMutex);
- this.mfa.ApplicationSwitch.Parse(Environment.GetCommandLineArgs());
- PortalActionFactory.PortalAdvisor = this.mfa;
- DBG.DbgTrace("Begin login...", new object[0]);
- if (!PortalActionFactory.login(this.mfa, out str))
- {
- goto Label_0242;
- }
- Application.Idle += new EventHandler(this.Application_Idle);
- DBG.DbgTrace("login succeeded!", new object[0]);
- this.splash = new SplashScreen();
- this.splash.ShowSplach(true);
- splashWindow = this.splash.SplashWindow;
- this.mfa.InitBarAdvisors();
- Form mainForm = PlatformUI.CreateMainFrame(this.mfa).Form;
- mainForm.Shown += new EventHandler(this.mainForm_Shown);
- PortalActionFactory.InitScenarioActions(this.mfa);
- this.mfa.FireInitialized();
- PortalActionFactory.loginvbcontext(this.mfa.Login);
- PortalActionFactory.DisplayDefaultShowScenario(this.mfa);
- PortalActionFactory.TaskManagerInit(this.mfa);
- if (owner == IntPtr.Zero)
- {
- Application.Run(mainForm);
- }
- else
- {
- WindowWrap wrap = new WindowWrap(owner);
- mainForm.Show(wrap);
- }
- }
- catch (DACException exception2)
- {
- MessageBox.Show(splashWindow, exception2.Message, SR.GetString("s.infoPromptingDialogue"), MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- goto Label_0242;
- }
- catch (Exception exception3)
- {
- MessageBox.Show(exception3.ToString(), "UFIDA ERP-U8");
- goto Label_0242;
- }
- return true;
- Label_0242:
- NativeMethods.PostMessage(owner, 0x10, 0L, 0L);
- return false;
- }
复制代码 调用登录界面!- if (!PortalActionFactory.login(this.mfa, out str))
- {
- goto Label_0242;
- }
复制代码 这个闪屏界面- this.splash = new SplashScreen();
- this.splash.ShowSplach(true);
- splashWindow = this.splash.SplashWindow;
复制代码 下面几句是生成主界面以及工具栏,菜单栏。- Form mainForm = PlatformUI.CreateMainFrame(this.mfa).Form;
- mainForm.Shown += new EventHandler(this.mainForm_Shown);
- PortalActionFactory.InitScenarioActions(this.mfa);
- this.mfa.FireInitialized();
复制代码 这句代码是生成业务导航视图和信息中心,关键代码啊- PortalActionFactory.DisplayDefaultShowScenario(this.mfa);
复制代码 工具有:Reflector,FileDisassembler插件,VS2005.
用Reflector反编译那些DLL文件,用FileDisassembler插件生成源代码,再用VS2005添加这些源代码修改代码后,再重新编译成DLL文件放到原先的地方!这样你就可以看到修改后的效果了!
|
|