/// <summary>
 /// Initialize a new instance of the DockspaceSeparatorResizeEventArgs class.
 /// </summary>
 /// <param name="separator">Reference to separator control instance.</param>
 /// <param name="element">Reference to dockspace docking element that is managing the separator.</param>
 /// <param name="resizeRect">Initial resizing rectangle.</param>
 public DockspaceSeparatorResizeEventArgs(KryptonSeparator separator,
                                          KryptonDockingDockspace element,
                                          Rectangle resizeRect)
     : base(separator, element)
 {
     ResizeRect = resizeRect;
 }
        /// <summary>
        /// Initialize a new instance of the KryptonSeparatorActionList class.
        /// </summary>
        /// <param name="owner">Designer that owns this action list instance.</param>
        public KryptonSeparatorActionList(KryptonSeparatorDesigner owner)
            : base(owner.Component)
        {
            // Remember the link label instance
            _separator = owner.Component as KryptonSeparator;

            // Cache service used to notify when a property has changed
            _service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
        }
示例#3
0
 /// <summary>
 /// Initialize a new instance of the AutoHiddenSeparatorResizeEventArgs class.
 /// </summary>
 /// <param name="separator">Reference to separator control instance.</param>
 /// <param name="dockspace">Reference to dockspace control instance.</param>
 /// <param name="page">Reference to page contained in the dockspace.</param>
 /// <param name="resizeRect">Initial resizing rectangle.</param>
 public AutoHiddenSeparatorResizeEventArgs(KryptonSeparator separator,
                                           KryptonDockspace dockspace,
                                           KryptonPage page,
                                           Rectangle resizeRect)
 {
     SeparatorControl = separator;
     DockspaceControl = dockspace;
     Page             = page;
     ResizeRect       = resizeRect;
 }
示例#4
0
 /// <summary>
 /// Initialize a new instance of the AutoHiddenSeparatorResizeEventArgs class.
 /// </summary>
 /// <param name="separator">Reference to separator control instance.</param>
 /// <param name="dockspace">Reference to dockspace control instance.</param>
 /// <param name="page">Reference to page contained in the dockspace.</param>
 /// <param name="resizeRect">Initial resizing rectangle.</param>
 public AutoHiddenSeparatorResizeEventArgs(KryptonSeparator separator,
                                           KryptonDockspace dockspace,
                                           KryptonPage page,
                                           Rectangle resizeRect)
 {
     _separator  = separator;
     _dockspace  = dockspace;
     _page       = page;
     _resizeRect = resizeRect;
 }
示例#5
0
 public KryptonSeparatorProxy(KryptonSeparator separator)
 {
     _separator = separator;
 }
 /// <summary>
 /// Initialize a new instance of the DockspaceSeparatorEventArgs class.
 /// </summary>
 /// <param name="separator">Reference to separator control instance.</param>
 /// <param name="element">Reference to dockspace docking element that is managing the separator.</param>
 public DockspaceSeparatorEventArgs(KryptonSeparator separator,
                                    KryptonDockingDockspace element)
 {
     SeparatorControl = separator;
     DockspaceElement = element;
 }
 /// <summary>
 /// Initialize a new instance of the DockspaceSeparatorEventArgs class.
 /// </summary>
 /// <param name="separator">Reference to separator control instance.</param>
 /// <param name="element">Reference to dockspace docking element that is managing the separator.</param>
 public DockspaceSeparatorEventArgs(KryptonSeparator separator,
                                    KryptonDockingDockspace element)
 {
     _separator = separator;
     _element   = element;
 }
示例#8
0
        public async void JsonParser()
        {
            try
            {
                //Clear all
                Invoke(new Action(() => { flowLayoutPanel1.Controls.Clear(); }));
                await Task.Delay(100);

                //Setting Control Count
                int n = 30;
                KryptonLinkLabel[] links      = new KryptonLinkLabel[n];
                KryptonLabel[]     labeldesc  = new KryptonLabel[n];
                KryptonLabel[]     stargazers = new KryptonLabel[n];
                KryptonLabel[]     openissues = new KryptonLabel[n];
                PictureBox[]       avatar     = new PictureBox[n];
                KryptonLabel[]     username   = new KryptonLabel[n];
                var jObject = Newtonsoft.Json.Linq.JObject.Parse(_repostr);
                for (int i = 0; i <= 29; i++)
                {
                    RepoName      = (string)jObject["items"][i]["full_name"];
                    RepoDesc      = (string)jObject["items"][i]["description"];
                    RepoDesc      = RepoDesc == null ? string.Empty : RepoDesc.Substring(0, Math.Min(40, RepoDesc.Length)) + " ...";
                    RepoStar      = (string)jObject["items"][i]["stargazers_count"];
                    RepoIssue     = (string)jObject["items"][i]["open_issues_count"];
                    RepoAvatar    = (string)jObject["items"][i]["owner"]["avatar_url"];
                    RepoUserN     = (string)jObject["items"][i]["owner"]["login"];
                    RepoURL       = (string)jObject["items"][i]["owner"]["html_url"];
                    links[i]      = new KryptonLinkLabel();
                    labeldesc[i]  = new KryptonLabel();
                    stargazers[i] = new KryptonLabel();
                    openissues[i] = new KryptonLabel();
                    avatar[i]     = new PictureBox();
                    username[i]   = new KryptonLabel();
                    Invoke(new Action(() =>
                    {
                        //Repo Title
                        links[i].Text   = RepoName;
                        links[i].Click += new EventHandler(button_Click);
                        links[i].StateCommon.ShortText.Font   = new Font(links[i].Font, FontStyle.Bold);
                        links[i].StateNormal.ShortText.Font   = new Font(links[i].Font, FontStyle.Bold);
                        links[i].StateNormal.ShortText.Color1 = Color.Blue;
                        FontFamily fontFamily = new FontFamily("Arial");
                        Font font             = new Font(fontFamily, 20, FontStyle.Regular, GraphicsUnit.Pixel);
                        links[i].StateNormal.ShortText.Font = font;
                        links[i].StateCommon.ShortText.Font = font;
                        //Repo Description
                        labeldesc[i].Text = RepoDesc;
                        labeldesc[i].StateNormal.ShortText.Color1 = Color.Black;
                        //Icon + Repo Stars
                        PictureBox starico = new PictureBox();
                        starico.Size       = new System.Drawing.Size(16, 16);
                        starico.Image      = MSGitRepos.Properties.Resources.starico;
                        starico.SizeMode   = PictureBoxSizeMode.StretchImage;

                        stargazers[i].Text = RepoStar;
                        //Icon + Repo Issues
                        PictureBox issueico = new PictureBox();
                        issueico.Size       = new System.Drawing.Size(16, 16);
                        issueico.Image      = MSGitRepos.Properties.Resources.issue;
                        issueico.SizeMode   = PictureBoxSizeMode.StretchImage;

                        openissues[i].Text = RepoIssue;
                        //Username & Avatar
                        KryptonLabel bydev = new KryptonLabel();
                        bydev.Text         = "Built by";

                        avatar[i].Size          = new System.Drawing.Size(16, 16);
                        avatar[i].ImageLocation = RepoAvatar;
                        avatar[i].SizeMode      = PictureBoxSizeMode.StretchImage;

                        username[i].Text = RepoUserN;
                        //Merge Controls

                        flowLayoutPanel1.SetFlowBreak(links[i], true);
                        flowLayoutPanel1.Controls.Add(links[i]);


                        flowLayoutPanel1.SetFlowBreak(labeldesc[i], true);
                        flowLayoutPanel1.Controls.Add(labeldesc[i]);

                        flowLayoutPanel1.Controls.Add(starico);
                        flowLayoutPanel1.Controls.Add(stargazers[i]);

                        flowLayoutPanel1.Controls.Add(issueico);
                        flowLayoutPanel1.Controls.Add(openissues[i]);

                        flowLayoutPanel1.Controls.Add(bydev);
                        flowLayoutPanel1.Controls.Add(avatar[i]);

                        flowLayoutPanel1.SetFlowBreak(username[i], true);
                        flowLayoutPanel1.Controls.Add(username[i]);
                    }));


                    if (i == 29)
                    {
                        KryptonSeparator splitter = new KryptonSeparator();
                        Invoke(new Action(() => { flowLayoutPanel1.Controls.Add(splitter); }));
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                //Nothing
            }
        }