public static void CreateApplicationObjectForCrossTarget() { if (currApp == null) { currApp = (c__weather)Sybase.PowerBuilder.WPF.PBSession.CurrentSession.CreateInstance(typeof(c__weather), 0); currApp.weather = currApp; } }
public static c__weather GetCurrentApplication() { if (currApp == null) { currApp = Sybase.PowerBuilder.PBApplication.CurrentApplication as c__weather; if ((currApp != null )&&(currApp.weather == null)) { currApp.weather = currApp; } } return currApp; }