Emveepee.Widgets.StartPage.Layout C# (CSharp) Method

Layout() private method

private Layout ( ) : void
return void
        void Layout()
        {
            if (banner == null)
                banner = new BannerItem (this);

            items.Clear ();
            items.Add (banner);
            Item item = new LabelItem (this, "Common Actions:", 0, banner.Bounds.Bottom + 3 * padding);
            items.Add (item);
            item = new LinkItem (this, "Create New Profile", StartEventType.Create, null, 0, item.Bounds.Bottom + text_padding);
            items.Add (item);
            item = new LinkItem (this, "Open Profile Log File", StartEventType.Open, null, 0, item.Bounds.Bottom);
            items.Add (item);

            int y = item.Bounds.Bottom + 3 * padding;
            if (history.LogFiles.Count > 0) {
                item = new LabelItem (this, "Recent Logs:", 0, y);
                y = item.Bounds.Bottom + text_padding;
                items.Add (item);
                foreach (LogInfo info in history.LogFiles) {
                    item = new LinkItem (this, info.Caption, info.Detail, StartEventType.Open, info.Filename, 0, y);
                    items.Add (item);
                    y = item.Bounds.Bottom;
                }
            }

            int x = Allocation.Width / 2;
            if (history.Configs.Count > 0) {
                item = new LabelItem (this, "Quick Sessions:", x, banner.Bounds.Bottom + 3 * padding);
                items.Add (item);
                y = item.Bounds.Bottom + text_padding;
                foreach (ProfileConfiguration config in history.Configs) {
                    string text = config.ToString ();
                    int idx = text.IndexOf (":");
                    item = new QuickStartItem (this, config, text.Substring (0, idx), text.Substring (idx + 1), x, y);
                    items.Add (item);
                    y = item.Bounds.Bottom;
                }
            }
        }