private void OnCheckClick(object sender, RoutedEventArgs e) { ConvertDialog dlg = new ConvertDialog(); dlg.Owner = this; dlg.OnClosedEvent += Utils.CleanConvert; dlg.Show(); ServerLogChecker.ParseServerLog(); if (ServerLogChecker.errorBinName != "") { ServerLogChecker.AddErrorBin(ServerLogChecker.binExcelMap[ServerLogChecker.errorBinName], ref _rootNode); } }
private void OnWindowLoaded(object sender, RoutedEventArgs e) { Utils.InitWorkingPath(); ServerLogChecker.InitServerLogPath(); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);//注册Nuget包System.Text.Encoding.CodePages中的编码到.NET Core ServerLogChecker.InitBinExcelMap(); LoadExcelTree(); LoadFavList(); InitComboBox(); _timer = new System.Windows.Threading.DispatcherTimer(); _timer.Interval = TimeSpan.FromMilliseconds(1); // Set the callback to just show the time ticking away // NOTE: We are using a control so this has to run on // the UI thread _timer.Tick += new EventHandler(TimerTick); _timer.Start(); InitEvent(); LocationChanged += SyncPopupPosition; }