38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using Eto.Drawing;
|
|
using Eto.Forms;
|
|
using UpToolEto.Controls;
|
|
using UpToolLib;
|
|
using UpToolLib.DataStructures;
|
|
using UpToolLib.v2.TaskQueue;
|
|
|
|
namespace UpToolEto.Forms
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
private readonly AppPanel _appPanel;
|
|
private readonly IList<AppTask> _tasks;
|
|
public MainForm(InitScreen init, UpToolLibMain lib, IExternalFunctionality platform, bool online)
|
|
{
|
|
_tasks = new List<AppTask>();
|
|
Title = "UpTool2";
|
|
MinimumSize = new Size(600, 100);
|
|
AppList appList = new(lib.V1.AppExtras, (_, app) => _appPanel.SetApp(app), online, lib.V2.TaskFactory, _tasks);
|
|
_appPanel = new AppPanel(lib.V2.TaskFactory, lib.V1.AppExtras, _tasks, platform, appList.Update);
|
|
|
|
Content = new StackLayout
|
|
{
|
|
Padding = 10,
|
|
Items =
|
|
{
|
|
new StackLayoutItem(appList, VerticalAlignment.Stretch),
|
|
new StackLayoutItem(_appPanel, VerticalAlignment.Stretch, true)
|
|
},
|
|
Orientation = Orientation.Horizontal
|
|
};
|
|
Menu = new UTMenuBar(this, lib.V2.RepoManagement, lib.V2.TaskFactory, _tasks, appList, platform);
|
|
Shown += (_, _) => init.Close();
|
|
}
|
|
}
|
|
}
|