2015-01-03 07:20:34 +00:00
|
|
|
|
using System.Collections.Generic;
|
2022-12-09 08:46:11 +00:00
|
|
|
|
using System.Windows;
|
2015-01-03 07:20:34 +00:00
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.Sys
|
2015-01-09 01:44:03 +00:00
|
|
|
|
{
|
|
|
|
|
|
public partial class SysSettings : UserControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public SysSettings(List<Result> Results)
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
2015-01-03 07:20:34 +00:00
|
|
|
|
|
2015-01-09 01:44:03 +00:00
|
|
|
|
foreach (var Result in Results)
|
|
|
|
|
|
{
|
2016-01-06 21:34:42 +00:00
|
|
|
|
lbxCommands.Items.Add(Result);
|
2015-01-09 01:44:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-12-09 08:46:11 +00:00
|
|
|
|
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
ListView listView = sender as ListView;
|
|
|
|
|
|
GridView gView = listView.View as GridView;
|
|
|
|
|
|
|
|
|
|
|
|
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
|
|
|
|
|
|
var col1 = 0.3;
|
|
|
|
|
|
var col2 = 0.7;
|
|
|
|
|
|
|
|
|
|
|
|
gView.Columns[0].Width = workingWidth * col1;
|
|
|
|
|
|
gView.Columns[1].Width = workingWidth * col2;
|
|
|
|
|
|
}
|
2015-01-09 01:44:03 +00:00
|
|
|
|
}
|
2015-01-03 07:20:34 +00:00
|
|
|
|
}
|