using LRH; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Threading; namespace LRH { /// /// App.xaml 的交互逻辑 /// public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { //1、将动图编译成splashScreen //2、将动图编译成资源进行如下代码操作 SplashScreen s = new SplashScreen("Screen.gif"); s.Show(true); var items = RevitManager.GetRevitItems(); //DispatcherPriority.Loaded优先级,在窗体加载完成时才进行执行。通过优先级去控制顺序 //Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Loaded, new DispatcherOperationCallback(ex=>MessageBox.Show(ex.ToString())), this); base.OnStartup(e); } //[STAThread] //public static void Main() //{//此方法和app.xaml冲突 // App app = new App(); // app.Run(); //} } }