Exemplo n.º 1
0
        private void SetView(PageGroupInfo groupInfo, TreeNode parentNode)
        {
            if (groupInfo == null)
            {
                return;
            }

            TreeNode node = this.CreateGroupNode(groupInfo);

            foreach (PageGroupInfo subGroupInfo in groupInfo.SubPageGroupInfos)
            {
                this.SetView(subGroupInfo, node);
            }

            if (parentNode == null)
            {
                this.C_GroupInfoTree.Nodes.Clear();

                this.C_GroupInfoTree.Nodes.Add(node);
            }
            else
            {
                parentNode.Nodes.Add(node);
            }
        }
Exemplo n.º 2
0
        public void SetView(PageGroupInfo groupInfo)
        {
            this.C_GroupInfoTree.Nodes.Clear();

            this.SetView(groupInfo, null);

            if (this.C_GroupInfoTree.Nodes.Count > 0)
            {
                this.C_PropertyGrid.SelectedObject = this.C_GroupInfoTree.Nodes[0].Tag;
            }
        }
Exemplo n.º 3
0
        private TreeNode CreateGroupNode(PageGroupInfo groupInfo)
        {
            TreeNode node = new TreeNode(groupInfo.ToString());

            node.Tag = groupInfo.Copy();

            node.ImageIndex = 0;

            node.SelectedImageIndex = 1;

            return(node);
        }
Exemplo n.º 4
0
        public void UpdateView()
        {
            if (this.C_GroupInfoTree.Nodes.Count <= 0)
            {
                return;
            }

            this.rootPageGroup = this.C_GroupInfoTree.Nodes[0].Tag as PageGroupInfo;

            rootPageGroup.Repeat = this.ChkRepeat.Checked;

            this.UpdateView(rootPageGroup, this.C_GroupInfoTree.Nodes[0]);
        }
Exemplo n.º 5
0
        private void UpdateView(PageGroupInfo groupInfo, TreeNode node)
        {
            if (groupInfo == null || node == null)
            {
                return;
            }

            groupInfo.SubPageGroupInfos.Clear();

            for (int index = 0; index < node.Nodes.Count; index++)
            {
                TreeNode subNode = node.Nodes[index];

                if (subNode.Tag is PageGroupInfo)
                {
                    groupInfo.SubPageGroupInfos.Add(subNode.Tag as PageGroupInfo);

                    this.UpdateView(subNode.Tag as PageGroupInfo, subNode);
                }
            }
        }
Exemplo n.º 6
0
        public PageGroupEditorForm(object value)
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            PageGroupInfo groupInfo = value as PageGroupInfo;

            this.rootPageGroup = groupInfo;

            this.ChkRepeat.Checked = groupInfo.Repeat;

            this.ChkRepeat.Text = groupInfo.RepeatTitle;

            if (groupInfo.RepeatTitle == "RepeatControls")
            {
                ChkRepeat.Visible = false;
            }

            this.SetView(groupInfo);

            this.Text = groupInfo.RepeatTitle + " Setting";
        }
Exemplo n.º 7
0
 public RepeatControlView(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     try
     {
         _AfterLast = info.GetBoolean("_AfterLast");
     }
     catch
     {
         _AfterLast = false;
     }
     try
     {
         _RepeatSetting = (Webb.Reports.PageGroupInfo)info.GetValue("_RepeatSetting", typeof(Webb.Reports.PageGroupInfo));
     }
     catch
     {
         _RepeatSetting = new PageFieldInfo("");
     }
     try
     {
         _RepeatedWidth = info.GetSingle("_RepeatedWidth");
     }
     catch
     {
         _RepeatedWidth = 240f;
     }
     try
     {
         _RepeatedHeight = info.GetSingle("_RepeatedHeight");
     }
     catch
     {
         _RepeatedHeight = 240f;
     }
     try
     {
         _RepeatedCount = info.GetInt32("_RepeatedCount");
     }
     catch
     {
         _RepeatedCount = 3;
     }
     try
     {
         _RepeatedVerticalCount = info.GetInt32("_RepeatedVerticalCount");
     }
     catch
     {
         _RepeatedVerticalCount = 3;
     }
     try
     {
         _RepeatTopCount = info.GetInt32("_RepeatTopCount");
     }
     catch
     {
         _RepeatTopCount = 0;
     }
     try
     {
         _ChartColorWhenMax = (System.Drawing.Color)info.GetValue("_ChartColorWhenMax", typeof(System.Drawing.Color));
     }
     catch
     {
         _ChartColorWhenMax = Color.Empty;
     }
 }