private void AddArrestReportsTab()
 {
     if (DetailedEntity.Arrests == null)
     {
         return;
     }
     lock (DetailedEntity.Arrests)
     {
         if (DetailedEntity.Arrests.Count > 0)
         {
             if (arrestsContainer.Children.Count == 0)
             {
                 arrestsContainer.Dock           = Pos.Fill;
                 arrestsContainer.LeftDock.Width = 300;
                 arrestReportList = new ArrestReportList(arrestsContainer.LeftDock, DetailedEntity.Arrests, ChangeArrestReportDetailView, RenderArrestReportListBoxRow)
                 {
                     ListClickStyle = ArrestReportList.ListItemClickType.DOUBLE
                 };
                 arrestReportView      = new ArrestReportView(arrestsContainer, DetailedEntity.Arrests[0]);
                 arrestsContainer.Name = String.Empty;
                 arrestReportList.Dock = Pos.Fill;
                 arrestReportView.Dock = Pos.Fill;
                 arrestsContainer.Show();
                 var page = tabcontrol_details.AddPage("Arrests", arrestsContainer);
                 page.UserData = Page.PED_ARRESTS;
                 page.Clicked += PageTabClicked;
             }
             else
             {
                 arrestReportList.ChangeReports(DetailedEntity.Arrests);
                 arrestReportView.ChangeReport(DetailedEntity.Arrests[0]);
             }
         }
     }
 }
示例#2
0
        private void AddArrestReportsTab()
        {
            if (Arrests == null)
            {
                return;
            }
            lock (Arrests)
            {
                if (Arrests.Count > 0)
                {
                    if (arrestsContainer.Children.Count == 0)
                    {
                        //Function.Log("AddArrestReportsTab with " + Arrests.Length.ToString());

                        arrestsContainer.Dock            = Pos.Fill;
                        arrestsContainer.LeftDock.Width  = 200;
                        arrestsContainer.RightDock.Width = arrestsContainer.Width - arrestsContainer.LeftDock.Width;
                        arrestReportList      = new ArrestReportList(arrestsContainer.LeftDock, Arrests, ChangeArrestReportDetailView, RenderArrestReportListBoxRow);
                        arrestReportView      = new ArrestReportView(arrestsContainer, Arrests[0]);
                        arrestsContainer.Name = String.Empty;
                        arrestReportList.Dock = Pos.Fill;
                        arrestReportView.Dock = Pos.Fill;
                        //arrestReportView.SizeFull();
                        arrestsContainer.Show();
                        var page = tabcontrol_details.AddPage("Arrests", arrestsContainer);
                        page.UserData = Page.ARRESTS;
                        page.Clicked += PageTabClicked;
                    }
                    else
                    {
                        arrestReportList.ChangeReports(Arrests);
                        arrestReportView.ChangeReport(Arrests[0]);
                    }
                }
            }
        }