public LogTextBoxController AddLog(LogInfo info, int maxLength)
 {
     if (controller == null)
     {
         controller = new LogTextBoxController(TbLog, info.Tag);
         controller.SetMaxLength(maxLength);
         controller.AddLog(info);
     }
     return(controller);
 }
        private void DbBrowserWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            Type type = typeof(LocationDb);
            var  ps   = type.GetProperties().Where(i => i.PropertyType.Name.Contains("DbSet"));

            ListBox1.ItemsSource       = ps;
            ListBox1.DisplayMemberPath = "Name";
            ListBox1.SelectionChanged += ListBox1_SelectionChanged;

            controller = new LogTextBoxController(TbLogs, LogTags.DbInfo);
        }
示例#3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            strIp                = AppContext.DatacaseWebApiUrl;
            port                 = AppContext.DatacaseWebApiPort;
            trackClient          = new InspectionTrackClient(strIp, port);
            trackClient.ListGot += (TrackList) =>
            {
                InspectionTrackHub.SendInspectionTracks(TrackList.ToTModel());//发送给客户端
            };

            controller = new LogTextBoxController(TbLogs, LogTags.Inspection);
            var now = DateTime.Now;

            StartTime.SelectedDate = new DateTime(now.Year, 1, 1, 0, 0, 0);
            EndTime.SelectedDate   = now;
        }
示例#4
0
 private void CameraAlarmManagerWindow_OnLoaded(object sender, RoutedEventArgs e)
 {
     controller = new LogTextBoxController(TbLog, LogTags.ExtremeVision);
 }