Archived
Changed: new light theme
This commit is contained in:
1 parent
19ea78868b
commit
c90d846f2e
25 files changed
+165
-543
No files matched your search
@@ -6,7 +6,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public class AddListTileForm : TDialogForm
|
||||
{
|
||||
public static void ShowDialog(TilePanelLayout panel)
|
||||
public static void ShowDialog(TTilePanelLayout panel)
|
||||
{
|
||||
AddListTileForm form = new AddListTileForm(panel);
|
||||
form.ShowDialog();
|
||||
@@ -16,14 +16,14 @@ namespace AppLauncher.Windows.Forms
|
||||
private TButton button1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator1;
|
||||
private TTextBox textBox1;
|
||||
protected TilePanelLayout parentPanel = null;
|
||||
protected TTilePanelLayout parentPanel = null;
|
||||
|
||||
public AddListTileForm() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public AddListTileForm(TilePanelLayout panel) : base()
|
||||
public AddListTileForm(TTilePanelLayout panel) : base()
|
||||
{
|
||||
parentPanel = panel;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public class AddTileForm : TDialogForm
|
||||
{
|
||||
public static void ShowDialog(TilePanelLayout panel)
|
||||
public static void ShowDialog(TTilePanelLayout panel)
|
||||
{
|
||||
AddTileForm form = new AddTileForm(panel);
|
||||
form.ShowDialog();
|
||||
@@ -32,7 +32,7 @@ namespace AppLauncher.Windows.Forms
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator2;
|
||||
private TTextBox textBox1;
|
||||
protected TilePanelLayout parentPanel = null;
|
||||
protected TTilePanelLayout parentPanel = null;
|
||||
|
||||
public AddTileForm() : base()
|
||||
{
|
||||
@@ -40,7 +40,7 @@ namespace AppLauncher.Windows.Forms
|
||||
initialiseComponents2();
|
||||
}
|
||||
|
||||
public AddTileForm(TilePanelLayout panel) : base()
|
||||
public AddTileForm(TTilePanelLayout panel) : base()
|
||||
{
|
||||
parentPanel = panel;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace AppLauncher.Windows.Forms
|
||||
private TButton button1;
|
||||
private TPickerBox pickerBox1;
|
||||
private TTextBox textBox1;
|
||||
protected TilePanelLayout parentContainer = null;
|
||||
protected TTilePanelLayout parentContainer = null;
|
||||
|
||||
public EditGroupForm() : base()
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace AppLauncher.Windows.Forms
|
||||
initialiseComponents2();
|
||||
}
|
||||
|
||||
public EditGroupForm(TilePanelLayout container) : base()
|
||||
public EditGroupForm(TTilePanelLayout container) : base()
|
||||
{
|
||||
parentContainer = container;
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace AppLauncher.Windows.Forms
|
||||
model.Title = textBox1.Text?.Trim();
|
||||
model.IsExclusive = (pickerBox1.ComboBox.SelectedIndex == 1);
|
||||
|
||||
parentContainer.LoadModel(model, false);
|
||||
parentContainer.UpdateModel(model);
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public class EditListTileForm : TDialogForm
|
||||
{
|
||||
public static void ShowDialog(TilePanel panel)
|
||||
public static void ShowDialog(TTilePanel panel)
|
||||
{
|
||||
EditListTileForm form = new EditListTileForm(panel);
|
||||
form.ShowDialog();
|
||||
@@ -22,14 +22,14 @@ namespace AppLauncher.Windows.Forms
|
||||
private TButton tButton2;
|
||||
private TButton tButton3;
|
||||
private TButton tButton4;
|
||||
protected TilePanel parentPanel = null;
|
||||
protected TTilePanel parentPanel = null;
|
||||
|
||||
public EditListTileForm() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public EditListTileForm(TilePanel panel) : base()
|
||||
public EditListTileForm(TTilePanel panel) : base()
|
||||
{
|
||||
parentPanel = panel;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public class EditTileForm : TDialogForm
|
||||
{
|
||||
public static void ShowDialog(TilePanel panel)
|
||||
public static void ShowDialog(TTilePanel panel)
|
||||
{
|
||||
EditTileForm form = new EditTileForm(panel);
|
||||
form.ShowDialog();
|
||||
@@ -28,7 +28,7 @@ namespace AppLauncher.Windows.Forms
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator2;
|
||||
private TTextBox textBox1;
|
||||
protected TilePanel parentPanel = null;
|
||||
protected TTilePanel parentPanel = null;
|
||||
|
||||
public EditTileForm() : base()
|
||||
{
|
||||
@@ -36,7 +36,7 @@ namespace AppLauncher.Windows.Forms
|
||||
initialiseComponents2();
|
||||
}
|
||||
|
||||
public EditTileForm(TilePanel panel) : base()
|
||||
public EditTileForm(TTilePanel panel) : base()
|
||||
{
|
||||
parentPanel = panel;
|
||||
|
||||
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
partial class TilePanel
|
||||
partial class TTilePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -96,7 +96,6 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234)))));
|
||||
@@ -8,19 +8,23 @@ using System.Windows.Forms;
|
||||
|
||||
namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public partial class TilePanel : AUserControl
|
||||
public partial class TTilePanel : AUserControl
|
||||
{
|
||||
protected bool isDragging = false;
|
||||
protected Point startPosition = new Point();
|
||||
|
||||
protected TileModel modelInfo = new TileModel();
|
||||
|
||||
public TilePanel() : base()
|
||||
public TTilePanel() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.BackColor = Color.FromArgb(250, 250, 250);
|
||||
this.ContextMenuStrip = contextMenuStrip1;
|
||||
|
||||
label1.ForeColor = Color.FromArgb(99, 105, 119);
|
||||
label1.Font = new Font(this.Font.FontFamily, 8.25F);
|
||||
|
||||
this.MouseDown += panel_MouseDown;
|
||||
this.MouseUp += panel_MouseUp;
|
||||
this.MouseMove += panel_MouseMove;
|
||||
@@ -32,6 +36,16 @@ namespace AppLauncher.Windows.Forms
|
||||
label1.MouseMove += panel_MouseMove;
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
g.DrawRectangle(new Pen(Color.FromArgb(204, 206, 218), 1), new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, (this.DisplayRectangle.Width - 1), (this.DisplayRectangle.Height - 1)));
|
||||
|
||||
}
|
||||
|
||||
[Category("Appearance"), Browsable(true)]
|
||||
public string Title { get => label1.Text; protected set => label1.Text = value; }
|
||||
|
||||
@@ -41,7 +55,7 @@ namespace AppLauncher.Windows.Forms
|
||||
[Browsable(false)]
|
||||
public TileModel ModelInfo => modelInfo;
|
||||
|
||||
public TilePanelLayout PanelContainer
|
||||
public TTilePanelLayout PanelContainer
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -50,12 +64,12 @@ namespace AppLauncher.Windows.Forms
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.Parent.GetType() != typeof(TilePanelLayout))
|
||||
if (this.Parent.GetType() != typeof(TTilePanelLayout))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return (TilePanelLayout)this.Parent;
|
||||
return (TTilePanelLayout)this.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +81,7 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
if (this.modelInfo.IsGroup)
|
||||
{
|
||||
this.Image = Properties.Resources.folder_ea_32;
|
||||
this.Image = Properties.Resources.folder_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -96,7 +110,7 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
private void panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
TilePanelLayout container = this.PanelContainer;
|
||||
TTilePanelLayout container = this.PanelContainer;
|
||||
if (container == null)
|
||||
{
|
||||
return;
|
||||
@@ -122,7 +136,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
if (isDragging)
|
||||
{
|
||||
TilePanelLayout layoutPanel = this.PanelContainer;
|
||||
TTilePanelLayout layoutPanel = this.PanelContainer;
|
||||
if (layoutPanel == null)
|
||||
{
|
||||
return;
|
||||
File renamed without changes.
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
partial class TilePanelLayout
|
||||
partial class TTilePanelLayout
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -13,11 +13,11 @@ using System.Windows.Forms;
|
||||
|
||||
namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public partial class TilePanelLayout : AUserControl
|
||||
public partial class TTilePanelLayout : AUserControl
|
||||
{
|
||||
public class Item
|
||||
{
|
||||
public TilePanel Tile { get; set; }
|
||||
public TTilePanel Tile { get; set; }
|
||||
public Point Coord { get; set; } = new Point(0, 0);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace AppLauncher.Windows.Forms
|
||||
protected bool isAnimating = false;
|
||||
protected bool isChecked = true;
|
||||
|
||||
public TilePanelLayout(TileGroupModel model) : base()
|
||||
public TTilePanelLayout(TileGroupModel model) : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -44,8 +44,6 @@ namespace AppLauncher.Windows.Forms
|
||||
this.BackColor = Color.Transparent;
|
||||
|
||||
this.LoadModel(model);
|
||||
|
||||
//panel1.Resize += panel1_Resize;
|
||||
}
|
||||
|
||||
protected override void OnDragDrop(DragEventArgs e)
|
||||
@@ -172,8 +170,6 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e) => base.OnMouseClick(e);
|
||||
|
||||
//private async void panel1_Resize(object sender, EventArgs e) => await this.InvalidateContainer();
|
||||
|
||||
public Point GridSize
|
||||
{
|
||||
get
|
||||
@@ -189,10 +185,6 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
public int ExpandedHeight => expandedHeight + this.Padding.Bottom;
|
||||
|
||||
//public int CollapseHeight => labelHeight + collapseHeight panel1.CollapseHeight;
|
||||
|
||||
//public int ExpandedHeight => labelHeight + panel1.ExpandedHeight + this.Padding.Top + this.Padding.Bottom;
|
||||
|
||||
public TileGroupModel Model
|
||||
{
|
||||
get
|
||||
@@ -200,12 +192,10 @@ namespace AppLauncher.Windows.Forms
|
||||
TileGroupModel rs = new TileGroupModel()
|
||||
{
|
||||
Title = groupInfo.Title,
|
||||
//GridSize = new Size(panel1.GridSize.X, panel1.GridSize.Y),
|
||||
GridSize = new Size(this.GridSize.X, this.GridSize.Y),
|
||||
IsExpanded = isChecked,
|
||||
IsExclusive = groupInfo.IsExclusive,
|
||||
Items = this.Tiles
|
||||
//Items = panel1.Tiles
|
||||
};
|
||||
|
||||
return rs;
|
||||
@@ -266,7 +256,7 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
tile.Position = newCoord.Value;
|
||||
|
||||
TilePanel panel = new TilePanel();
|
||||
TTilePanel panel = new TTilePanel();
|
||||
panel.LoadInfo(tile);
|
||||
panel.Location = convertCoordToLocation(tile.Position);
|
||||
|
||||
@@ -383,7 +373,7 @@ namespace AppLauncher.Windows.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.Add(new TilePanelLayout(new TileGroupModel()
|
||||
this.FlowLayoutPanel.Controls.Add(new TTilePanelLayout(new TileGroupModel()
|
||||
{
|
||||
Title = "New Group",
|
||||
GridSize = new Size(8, 1)
|
||||
@@ -392,29 +382,32 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
public void AddRow()
|
||||
{
|
||||
//panel1.SetGridSize(groupInfo.GridSize.Width, (groupInfo.GridSize.Height + 1));
|
||||
this.SetGridSize(groupInfo.GridSize.Width, (groupInfo.GridSize.Height + 1));
|
||||
}
|
||||
|
||||
public void EditGroup()
|
||||
{
|
||||
//EditGroupForm editForm = new EditGroupForm(this);
|
||||
//editForm.ShowDialog();
|
||||
EditGroupForm editForm = new EditGroupForm(this);
|
||||
editForm.ShowDialog();
|
||||
}
|
||||
|
||||
public void LoadModel(TileGroupModel model, bool loadTiles = true)
|
||||
public void LoadModel(TileGroupModel model)
|
||||
{
|
||||
groupInfo = model;
|
||||
|
||||
this.SetGridSize(groupInfo.GridSize.Width, groupInfo.GridSize.Height);
|
||||
//this.Width = panel1.Width;
|
||||
|
||||
isChecked = groupInfo.IsExpanded;
|
||||
|
||||
if (loadTiles)
|
||||
{
|
||||
this.LoadTiles(model.Items);
|
||||
}
|
||||
this.LoadTiles(model.Items);
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
public void UpdateModel(TileGroupModel model)
|
||||
{
|
||||
groupInfo = model;
|
||||
isChecked = groupInfo.IsExpanded;
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
@@ -442,7 +435,7 @@ namespace AppLauncher.Windows.Forms
|
||||
}
|
||||
|
||||
// place control
|
||||
TilePanel panel = new TilePanel();
|
||||
TTilePanel panel = new TTilePanel();
|
||||
panel.LoadInfo(item);
|
||||
panel.Location = convertCoordToLocation(confirmedPosition.Value);
|
||||
|
||||
@@ -456,7 +449,7 @@ namespace AppLauncher.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveTile(TilePanel panel, int posX, int posY)
|
||||
public void MoveTile(TTilePanel panel, int posX, int posY)
|
||||
{
|
||||
Item item = items.Where(x => x.Tile.Equals(panel)).FirstOrDefault();
|
||||
if (item == null)
|
||||
@@ -551,7 +544,7 @@ namespace AppLauncher.Windows.Forms
|
||||
this.FlowLayoutPanel.Controls.Remove(this);
|
||||
}
|
||||
|
||||
public void Remove(TilePanel panel)
|
||||
public void Remove(TTilePanel panel)
|
||||
{
|
||||
Item m = items.Where(x => x.Tile.Equals(panel)).FirstOrDefault();
|
||||
if (m != null)
|
||||
File renamed without changes.
Reference in new issue
Block a user