SCCManager/Remontor/FlowContainer.cs

57 lines
1.3 KiB
C#

using Remontor.History;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Remontor
{
internal partial class FlowContainer : UserControl
{
private bool Showed = true;
private Size NormalSize;
public FlowContainer()
{
InitializeComponent();
NormalSize = this.Size;
HistoryList.Update += UpdateHistory;
}
public bool HideBar(BarShow barShow)
{
if (barShow == BarShow.ShowHistory)
{
this.Visible = true;
}
else
{
this.Visible = false;
}
return this.Visible;
}
public void UpdateHistory(List<HistoryItem> items)
{
HistoryPanel.Controls.Clear();
foreach(HistoryItem item in items)
{
HistoryControl HistoryItem = new HistoryControl(item);
HistoryPanel.Controls.Add(HistoryItem);
}
}
private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
}
}