internal void StartZoom()
 {
     try
     {
         if (zoomObj == null)
         {
             zoomObj = new ChartZoom(chartVu, pPolarTransform, true);
             zoomObj.SetButtonMask(MouseButtons.Left);
             zoomObj.SetZoomYEnable(true);
             zoomObj.SetZoomXEnable(true);
             zoomObj.SetZoomXRoundMode(ChartObj.AUTOAXES_EXACT);
             zoomObj.SetZoomYRoundMode(ChartObj.AUTOAXES_EXACT);
             zoomObj.InternalZoomStackProcesssing = true;
             zoomObj.SetEnable(true);
             thePlot2.SetShowDatapointValue(true);
             NumericLabel modellabel = new NumericLabel();
             modellabel.SetXJust(ChartObj.JUSTIFY_MIN);
             modellabel.SetYJust(ChartObj.JUSTIFY_CENTER);
             Font modellabelfont = new Font("Arial", 8, FontStyle.Regular);
             modellabel.SetTextFont(modellabelfont);
             modellabel.DecimalPos = 2;
             modellabel.SetTextNudge(0, 5);
             thePlot2.SetPlotLabelTemplate(modellabel);
         }
         chartVu.SetCurrentMouseListener(zoomObj);
         chartVu.UpdateDraw();
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #2
0
        protected void groupList_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            //TagGroupCounterView group = e.Item.DataItem as TagGroupCounterView;
            HostCountByGroup group = e.Item.DataItem as HostCountByGroup;

            if (group != null)
            {
                Anchor groupName = e.Item.FindControl("groupName") as Anchor;
                groupName.Text = group.GroupName;
                groupName.Href = PathUtil.ResolveUrl("Organize/TagGroup.aspx?id=" + group.Id);
                groupName.Attributes.Add("id", "g_" + group.Id);

                NumericLabel tagCount = e.Item.FindControl("tagCount") as NumericLabel;
                tagCount.Value = group.TagCount;

                SmartLabel groupDescription = e.Item.FindControl("groupDescription") as SmartLabel;
                groupDescription.Text = Strings.MonospacedLeft(group.GroupDescription, 50);

                Anchor detail = e.Item.FindControl("detail") as Anchor;
                detail.Href = groupName.Href;

                //不能删除根级组
                int    idelgroupid = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["DelFootGroup"]);
                int    parentid    = HostGroupInfo.GetById(group.Id).ParentGroupId;
                Anchor deleteLink  = e.Item.FindControl("delete") as Anchor;
                if (parentid > 0 || idelgroupid > 0)
                {
                    deleteLink.Href = "javascript:deleteTagGroup(" + group.Id + ");";
                }
                else
                {
                    groupName.Href     = "";
                    deleteLink.Href    = "";
                    deleteLink.ToolTip = "一级组不能删除";
                    detail.ToolTip     = "一级组不能编辑";
                    groupName.ToolTip  = "一级组不能编辑";
                    detail.Href        = "";
                    //deleteLink.Text = "";
                }
            }
        }
 protected void list_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Footer)
     {
         int c0 = 0, c1 = 0, c2 = 0;
         for (int i = 0; i < list.Items.Count; i++)
         {
             NumericLabel n0 = list.Items[i].FindControl("quota") as NumericLabel;
             NumericLabel n1 = list.Items[i].FindControl("bindingCount") as NumericLabel;
             NumericLabel n2 = list.Items[i].FindControl("currentCount") as NumericLabel;
             c0 += Convert.ToInt32(n0.Value);
             c1 += Convert.ToInt32(n1.Value);
             c2 += Convert.ToInt32(n2.Value);
         }
         NumericLabel nn0 = e.Item.FindControl("quota0") as NumericLabel;
         NumericLabel nn1 = e.Item.FindControl("bindingCount0") as NumericLabel;
         NumericLabel nn2 = e.Item.FindControl("currentCount0") as NumericLabel;
         nn0.Value = c0;
         nn1.Value = c1;
         nn2.Value = c2;
     }
 }
        protected void list_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            MapArea area = e.Item.DataItem as MapArea;

            if (area != null)
            {
                SmartLabel areaName = (SmartLabel)e.Item.FindControl("areaName");
                areaName.Text = area.AreaName;

                NumericLabel quota = (NumericLabel)e.Item.FindControl("quota");
                quota.Value = CulpritRoomReference.All.Count(x => x.JailRoomId == area.Id);

                NumericLabel bindingCount = (NumericLabel)e.Item.FindControl("bindingCount");

                NumericLabel currentCount  = (NumericLabel)e.Item.FindControl("currentCount");
                SmartLabel   expectedNames = (SmartLabel)e.Item.FindControl("expectedNames");
                SmartLabel   illedNames    = (SmartLabel)e.Item.FindControl("illedNames");

                var coordinates = MapAreaCoverage.All.Where(x => x.AreaId == area.Id).Select(x => x.CoordinatesId).ToArray();
                IList <TagStatusView> nowUsers = new List <TagStatusView>();
                foreach (var item in FullTagStatusView)
                {
                    if (coordinates.Contains(item.CoordinatesId) && HostTag.GetHostGroup(item.HostTag.HostId).Contains((int)TagUserType.Culprit) && item.AbsenceStatus != EventStatus.Occurring)
                    {
                        currentCount.Value++;
                        nowUsers.Add(item);
                    }
                }
                if (currentCount.Value != quota.Value)
                {
                    currentCount.CssClass = "t2";
                }
                IList <HostTag> shouldUsers = HostTag.AllActive
                                              .Where(x => CulpritRoomReference.All.Where(r => r.JailRoomId == area.Id).Select(r => r.CulpritId).Contains(x.HostId))
                                              .ToList();

                bindingCount.Value = shouldUsers.Count;

                IList <string> arr1 = new List <string>();
                //foreach (var item in nowUsers)
                //{
                //    if (shouldUsers.Any(x => x.TagId == item.TagId) == false)
                //    {
                //        arr1.Add("<a href='../Objects/Tag.aspx?id=" + item.TagId + "' target='_blank'>" + item.TagName + "</a>");
                //    }
                //}
                //extraNames.Text = string.Join(", ", arr1.ToArray());

                IList <string> arr2 = new List <string>();
                foreach (var item in shouldUsers)
                {
                    TagStatusView tagStatusView = LocatingServiceUtil.Instance <IServiceApi>().SelectTagStatus(item.TagId);

                    if (nowUsers.Any(x => x.TagId == item.TagId) == false)
                    {
                        int hostType = HostTagView.GetHostView(item.TagId).HostGroupId.Contains(1) ? 1 : 2;
                        arr2.Add("<a href='../TagUsers/TagUser.aspx?type=" + hostType + "&id=" + item.HostId + "' target='_blank'>" + item.HostName + "</a> : " + tagStatusView.CoordinatesName);
                    }

                    if (tagStatusView.HostTag.HostGroupId.Contains((int)TagUserType.IlledPrisoner))
                    {
                        arr1.Add("<a href='../TagUsers/TagUser.aspx?type=" + (int)TagUserType.Culprit + "&id=" + item.HostId + "' target='_blank'>" + item.HostName + "</a>");
                    }
                }
                expectedNames.Text = string.Join("<br>", arr2.ToArray());
                illedNames.Text    = string.Join(", ", arr1.ToArray());
            }
        }