//public RiChengRect RechengREct
        //{
        //    get
        //    {
        //        return this.riChengRect1;
        //    }
        //    set
        //    {
        //        this.riChengRect1 = value;
        //        this.Height = value.Height;
        //        if(this.Height > 454)
        //        {
        //            this.Height = 454;
        //        }
        //    }
        //}
        public void SetRechengREct(RiChengRect rechengREct)
        {
            string str = rechengREct.ContentText;
            if(rechengREct.ContentText.Length > 300)
                str = rechengREct.ContentText.Substring(0,300)+"……";

            int contentheight = ((str.Length / 20) + 1) * 16;
            Content.Height = contentheight;
            this.ContentBg.Height = Content.Location.Y + contentheight + 20;
            this.Content.Text = str;
            this.Height = this.ContentBg.Location.Y + this.ContentBg.Height + 20;
            if (this.Height > 454)
                this.Height = 454;
        }
Beispiel #2
0
        //public RiChengRect RechengREct
        //{
        //    get
        //    {
        //        return this.riChengRect1;
        //    }
        //    set
        //    {
        //        this.riChengRect1 = value;
        //        this.Height = value.Height;
        //        if(this.Height > 454)
        //        {
        //            this.Height = 454;
        //        }
        //    }
        //}
        public void SetRechengREct(RiChengRect rechengREct)
        {
            string str = rechengREct.ContentText;

            if (rechengREct.ContentText.Length > 300)
            {
                str = rechengREct.ContentText.Substring(0, 300) + "……";
            }

            int contentheight = ((str.Length / 20) + 1) * 16;

            Content.Height        = contentheight;
            this.ContentBg.Height = Content.Location.Y + contentheight + 20;
            this.Content.Text     = str;
            this.Height           = this.ContentBg.Location.Y + this.ContentBg.Height + 20;
            if (this.Height > 454)
            {
                this.Height = 454;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 把日程附加到panel中
        /// </summary>
        /// <param name="rcList"></param>
        private void creat_ri_cheng_Panel(IList rcList)
        {
            rc_flowLayoutPanel.Controls.Clear();
            if (rcList != null && rcList.Count > 0)
            {

                foreach (StaffSchedule ss in rcList)
                {
                    RiChengRect r1 = new RiChengRect();
                    r1.HeaderId = int.Parse(ss.ArrangeMan.Id.ToString());
                    r1.ArrangePersonNameText = ss.ArrangeMan.KuName.Trim();
                    r1.SubTitleText = ss.Subject.ToString();
                    r1.TimeText = new DateTime(ss.ScheduleTime).ToString("yyyy-MM-dd HH:mm");
                    if (ss.Content.Length > 140)
                    {
                        r1.ContentText = ss.Content.Substring(0, 140) + "……";
                        r1.ContentClicked += r1_ContentClicked;
                        r1.Tag = ss;
                    }
                    else
                    {
                        r1.ContentText = ss.Content;
                    }
                    r1.Parent = rc_flowLayoutPanel;
                }

            }
        }
Beispiel #4
0
        void r1_ContentClicked(object sender, EventArgs e)
        {
            this.panelOfRIchengAllInfo1.Visible = true;
            //if (this.panelOfRIchengAllInfo1.RechengREct != null)
            //{
                //this.panelOfRIchengAllInfo1.RechengREct = null;
            //}
            Label l = (Label)sender;
            StaffSchedule ss = l.Parent.Parent.Tag as StaffSchedule;
            RiChengRect r1 = new RiChengRect();
            r1.HeaderId = int.Parse(ss.ArrangeMan.Id.ToString());
            r1.ArrangePersonNameText = ss.ArrangeMan.KuName.Trim();
            r1.SubTitleText = ss.Subject.ToString();
            r1.TimeText = new DateTime(ss.ScheduleTime).ToString("yyyy-MM-dd HH:mm");
            r1.ContentText = ss.Content;

            this.panelOfRIchengAllInfo1.SetRechengREct(r1);
        }