Changed: new light theme
@ -155,17 +155,17 @@
|
||||
<Compile Include="Windows\Forms\AUserControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Forms\Tile\TilePanelLayout.cs">
|
||||
<Compile Include="Windows\Forms\Tile\TTilePanelLayout.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Forms\Tile\TilePanelLayout.Designer.cs">
|
||||
<DependentUpon>TilePanelLayout.cs</DependentUpon>
|
||||
<Compile Include="Windows\Forms\Tile\TTilePanelLayout.Designer.cs">
|
||||
<DependentUpon>TTilePanelLayout.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Forms\Tile\TilePanel.cs">
|
||||
<Compile Include="Windows\Forms\Tile\TTilePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Forms\Tile\TilePanel.Designer.cs">
|
||||
<DependentUpon>TilePanel.cs</DependentUpon>
|
||||
<Compile Include="Windows\Forms\Tile\TTilePanel.Designer.cs">
|
||||
<DependentUpon>TTilePanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
@ -211,11 +211,11 @@
|
||||
<EmbeddedResource Include="Windows\Forms\Tile\EditTileForm.resx">
|
||||
<DependentUpon>EditTileForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Windows\Forms\Tile\TilePanelLayout.resx">
|
||||
<DependentUpon>TilePanelLayout.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Windows\Forms\Tile\TTilePanelLayout.resx">
|
||||
<DependentUpon>TTilePanelLayout.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Windows\Forms\Tile\TilePanel.resx">
|
||||
<DependentUpon>TilePanel.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Windows\Forms\Tile\TTilePanel.resx">
|
||||
<DependentUpon>TTilePanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
@ -286,14 +286,11 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\button16_folder_add2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="RyzStudio\Windows\Forms\Resources\edit.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="RyzStudio\Windows\Forms\Resources\edit2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\app_icon_24.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\folder_32.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
1
MainForm.Designer.cs
generated
@ -120,6 +120,7 @@
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Name = "MainForm";
|
||||
this.Text = "Form1";
|
||||
this.TitleContextMenuStrip = this.contextMenuStrip1;
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
10
MainForm.cs
@ -52,7 +52,6 @@ namespace AppLauncher
|
||||
if (this.Width > collapsedWidth)
|
||||
{
|
||||
flowLayoutPanel1.Visible = false;
|
||||
//titlePanel1.LabelVisible = false;
|
||||
|
||||
await collapseWindow(collapsedWidth, 6);
|
||||
}
|
||||
@ -61,7 +60,6 @@ namespace AppLauncher
|
||||
await expandWindow(expandedWidth, 8);
|
||||
|
||||
flowLayoutPanel1.Visible = true;
|
||||
//titlePanel1.LabelVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,12 +90,12 @@ namespace AppLauncher
|
||||
List<TileGroupModel> rs = new List<TileGroupModel>();
|
||||
for (int i = 0; i < flowLayoutPanel1.Controls.Count; i++)
|
||||
{
|
||||
if (flowLayoutPanel1.Controls[i].GetType() != typeof(TilePanelLayout))
|
||||
if (flowLayoutPanel1.Controls[i].GetType() != typeof(TTilePanelLayout))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TilePanelLayout container = flowLayoutPanel1.Controls[i] as TilePanelLayout;
|
||||
TTilePanelLayout container = flowLayoutPanel1.Controls[i] as TTilePanelLayout;
|
||||
rs.Add(container.Model);
|
||||
}
|
||||
|
||||
@ -175,7 +173,7 @@ namespace AppLauncher
|
||||
|
||||
foreach (TileGroupModel item in rs)
|
||||
{
|
||||
TilePanelLayout panel = new TilePanelLayout(item);
|
||||
TTilePanelLayout panel = new TTilePanelLayout(item);
|
||||
maxWidth = Math.Max(maxWidth, panel.Width);
|
||||
|
||||
flowLayoutPanel1.Controls.Add(panel);
|
||||
@ -184,7 +182,7 @@ namespace AppLauncher
|
||||
flowLayoutPanel1.Width = maxWidth + SystemInformation.VerticalScrollBarWidth + 20;
|
||||
|
||||
//this.Width = flowLayoutPanel1.Width + (flowLayoutPanel1.Left * 2);
|
||||
//##this.Width = flowLayoutPanel1.Width + flowLayoutPanel1.Left;
|
||||
this.Width = flowLayoutPanel1.Width + flowLayoutPanel1.Left;
|
||||
}
|
||||
|
||||
}
|
||||
|
4
Properties/Resources.Designer.cs
generated
@ -83,9 +83,9 @@ namespace AppLauncher.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap folder_ea_32 {
|
||||
internal static System.Drawing.Bitmap folder_32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("folder_ea_32", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("folder_32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
@ -124,8 +124,8 @@
|
||||
<data name="arrow_right_ea_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow-right-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folder_ea_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\folder-ea-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="folder_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\folder_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="form16_close" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\form16_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
BIN
Resources/folder_32.png
Normal file
After Width: | Height: | Size: 601 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline></svg>
|
Before Width: | Height: | Size: 313 B |
@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-arrow-right"
|
||||
version="1.1"
|
||||
id="svg2026"
|
||||
sodipodi:docname="arrow-right.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata2032">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs2030" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview2028"
|
||||
showgrid="false"
|
||||
inkscape:zoom="35.291667"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="13.133412"
|
||||
inkscape:window-x="1072"
|
||||
inkscape:window-y="843"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2026" />
|
||||
<line
|
||||
x1="4.5102615"
|
||||
y1="8.1322317"
|
||||
x2="11.750201"
|
||||
y2="8.1322317"
|
||||
id="line2022"
|
||||
style="stroke-width:1.03427708;stroke:#eaeaea;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\line2022.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
<polyline
|
||||
points="12 5 19 12 12 19"
|
||||
id="polyline2024"
|
||||
transform="matrix(0.51713855,0,0,0.51713855,1.9245686,1.9265688)"
|
||||
style="stroke:#eaeaea;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\line2022.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
</svg>
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-folder"
|
||||
version="1.1"
|
||||
id="svg4530"
|
||||
sodipodi:docname="folder.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata4536">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs4534" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview4532"
|
||||
showgrid="false"
|
||||
inkscape:zoom="35.333333"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="1072"
|
||||
inkscape:window-y="843"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4530" />
|
||||
<path
|
||||
d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"
|
||||
id="path4528"
|
||||
style="stroke:#eaeaea;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\folder-ea-32.png"
|
||||
inkscape:export-xdpi="122.18182"
|
||||
inkscape:export-ydpi="122.18182" />
|
||||
</svg>
|
Before Width: | Height: | Size: 1.9 KiB |
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
class="feather feather-grid"
|
||||
version="1.1"
|
||||
id="svg1176"
|
||||
sodipodi:docname="grid.svg"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\grid.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
style="fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round">
|
||||
<metadata
|
||||
id="metadata1182">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1180" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview1178"
|
||||
showgrid="false"
|
||||
inkscape:zoom="17.666667"
|
||||
inkscape:cx="-1.0506596"
|
||||
inkscape:cy="1.9195642"
|
||||
inkscape:window-x="1072"
|
||||
inkscape:window-y="843"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg1176" />
|
||||
<rect
|
||||
x="2.7877357"
|
||||
y="2.7877357"
|
||||
width="5.5141511"
|
||||
height="5.5141511"
|
||||
id="rect1168"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect1168.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
style="fill:none;fill-opacity:1;stroke:#eaeaea;stroke-width:1.57547164;stroke-opacity:1" />
|
||||
<rect
|
||||
x="11.45283"
|
||||
y="2.7877357"
|
||||
width="5.5141511"
|
||||
height="5.5141511"
|
||||
id="rect1170"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect1168.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
style="fill:none;fill-opacity:1;stroke:#eaeaea;stroke-width:1.57547164;stroke-opacity:1" />
|
||||
<rect
|
||||
x="11.45283"
|
||||
y="11.45283"
|
||||
width="5.5141511"
|
||||
height="5.5141511"
|
||||
id="rect1172"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect1168.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
style="fill:none;fill-opacity:1;stroke:#eaeaea;stroke-width:1.57547164;stroke-opacity:1" />
|
||||
<rect
|
||||
x="2.7877357"
|
||||
y="11.45283"
|
||||
width="5.5141511"
|
||||
height="5.5141511"
|
||||
id="rect1174"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect1168.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
style="fill:none;fill-opacity:1;stroke:#eaeaea;stroke-width:1.57547164;stroke-opacity:1" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.2 KiB |
@ -7,7 +7,7 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="listbox.svg"
|
||||
sodipodi:docname="icon-set.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
@ -26,7 +26,7 @@
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="390.6468"
|
||||
inkscape:cy="362.07537"
|
||||
inkscape:cx="331.14896"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:pageshadow="2"
|
||||
@ -522,5 +522,17 @@
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.26458333,0,0,0.26458333,90.279613,100.24874)"
|
||||
id="g1832"
|
||||
style="fill:none;stroke:#636977;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1">
|
||||
<path
|
||||
d="m 22,19 a 2,2 0 0 1 -2,2 H 4 A 2,2 0 0 1 2,19 V 5 A 2,2 0 0 1 4,3 h 5 l 2,3 h 9 a 2,2 0 0 1 2,2 z"
|
||||
id="path4528"
|
||||
style="stroke:#636977;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\folder-ea-32.png"
|
||||
inkscape:export-xdpi="122.18182"
|
||||
inkscape:export-ydpi="122.18182" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-toggle-left"
|
||||
version="1.1"
|
||||
id="svg5895"
|
||||
sodipodi:docname="toggle-left.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata5901">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs5899" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview5897"
|
||||
showgrid="false"
|
||||
inkscape:zoom="35.291667"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="1072"
|
||||
inkscape:window-y="843"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5895" />
|
||||
<rect
|
||||
x="0.52007085"
|
||||
y="4.520071"
|
||||
width="11.441558"
|
||||
height="7.2809916"
|
||||
rx="3.6404958"
|
||||
ry="3.6404958"
|
||||
id="rect5891"
|
||||
style="stroke:#eaeaea;stroke-width:1.0401417;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect5891.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
<circle
|
||||
cx="4.1605668"
|
||||
cy="8.1605663"
|
||||
r="1.5602125"
|
||||
id="circle5893"
|
||||
style="stroke:#eaeaea;stroke-width:1.0401417;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\rect5891.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
</svg>
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-toggle-right"
|
||||
version="1.1"
|
||||
id="svg5919"
|
||||
sodipodi:docname="toggle-right.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata5925">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs5923" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview5921"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="1072"
|
||||
inkscape:window-y="843"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5919" />
|
||||
<rect
|
||||
x="0.51694918"
|
||||
y="4.5169492"
|
||||
width="11.372882"
|
||||
height="7.237288"
|
||||
rx="3.618644"
|
||||
ry="3.618644"
|
||||
id="rect5915"
|
||||
style="stroke:#eaeaea;stroke-width:1.03389835;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\toggle-right-ea-16.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
<circle
|
||||
cx="8.2711868"
|
||||
cy="8.1355934"
|
||||
r="1.5508475"
|
||||
id="circle5917"
|
||||
style="stroke:#eaeaea;stroke-width:1.03389835;stroke-opacity:1"
|
||||
inkscape:export-filename="L:\gitlab-hiimray\linear-app-launcher\Resources\toggle-right-ea-16.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120" />
|
||||
</svg>
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,17 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Text;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
public class AForm : Form
|
||||
{
|
||||
protected readonly int titleHeight = 56;
|
||||
|
||||
protected bool isDragging = false;
|
||||
protected Point startPosition = new Point();
|
||||
|
||||
@ -22,29 +19,6 @@ namespace AppLauncher.Windows.Forms
|
||||
this.FormBorderStyle = FormBorderStyle.None;
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
}
|
||||
|
||||
this.MouseDown += mainForm_MouseDown;
|
||||
this.MouseUp += mainForm_MouseUp;
|
||||
this.MouseMove += mainForm_MouseMove;
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
if (this.DesignMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//int requestedHeight = (int)Math.Floor(decimal.Divide((Screen.PrimaryScreen.WorkingArea.Height - this.Height), 2));
|
||||
//this.Location = new Point(Screen.PrimaryScreen.WorkingArea.X, (Screen.PrimaryScreen.WorkingArea.Y + requestedHeight));
|
||||
|
||||
//Point newPosition = new Point(Cursor.Position.X, Cursor.Position.Y);
|
||||
//newPosition.X -= (this.Width / 2);
|
||||
//newPosition.Y -= (this.Height / 2);
|
||||
|
||||
//this.Location = newPosition;
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
@ -62,32 +36,81 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
area.Inflate(-1, -1);
|
||||
|
||||
g.FillRectangle(new SolidBrush(menubarColour), area.X, area.Y, (area.Width + area.X), 56);
|
||||
g.DrawLine(new Pen(borderColour, 1), area.X, 57, (area.Width + area.X), 57);
|
||||
g.FillRectangle(new SolidBrush(menubarColour), area.X, area.Y, (area.Width + area.X), titleHeight);
|
||||
g.DrawLine(new Pen(borderColour, 1), area.X, (titleHeight + 1), (area.Width + area.X), (titleHeight + 1));
|
||||
|
||||
g.DrawImageUnscaled(Properties.Resources.app_icon_24, 17, 17);
|
||||
|
||||
TextRenderer.DrawText(e.Graphics, "Launcher", new Font(this.Font.FontFamily, 14F), new Point(58, 17), Color.FromArgb(156, 158, 171));
|
||||
|
||||
//g.DrawRectangle(new Pen(Color.FromArgb(232, 231, 236), 1), borderArea);
|
||||
//g.DrawRectangle(new Pen(Color.Red, 1), area);
|
||||
|
||||
}
|
||||
|
||||
//protected override void OnPaintBackground(PaintEventArgs e)
|
||||
//{
|
||||
// base.OnPaintBackground(e);
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
|
||||
//Graphics g = e.Graphics;
|
||||
//g.TextRenderingHint = TextRenderingHint.AntiAlias;
|
||||
//g.InterpolationMode = InterpolationMode.HighQualityBilinear;
|
||||
//g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
//g.SmoothingMode = SmoothingMode.HighQuality;
|
||||
bool isLabel = ((e.Location.X >= 0) && (e.Location.X <= this.Width) && (e.Location.Y >= 0) && (e.Location.Y <= titleHeight));
|
||||
|
||||
//g.FillRectangle(new LinearGradientBrush(this.DisplayRectangle, Color.FromArgb(76, 83, 93), Color.FromArgb(255, 255, 255), -30F), this.DisplayRectangle);
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (isLabel)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
else
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (isLabel)
|
||||
{
|
||||
if (this.TitleContextMenuStrip != null)
|
||||
{
|
||||
this.TitleContextMenuStrip.Show(this, e.Location);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//g.DrawRectangle(new Pen(new SolidBrush(Color.Red), 1), this.DisplayRectangle);
|
||||
//}
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
isDragging = true;
|
||||
startPosition = e.Location;
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (isDragging)
|
||||
{
|
||||
int x = (this.Location.X + (e.Location.X - startPosition.X));
|
||||
int y = (this.Location.Y + (e.Location.Y - startPosition.Y));
|
||||
|
||||
//this.Location = validateFormLocation(x, y);
|
||||
this.Location = new Point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
protected Point DefaultLocation
|
||||
{
|
||||
@ -106,33 +129,8 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
public override Color BackColor { get => base.BackColor; set => base.BackColor = Color.FromArgb(254, 254, 254); }
|
||||
|
||||
private void mainForm_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
isDragging = true;
|
||||
startPosition = e.Location;
|
||||
}
|
||||
|
||||
private void mainForm_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
private void mainForm_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (isDragging)
|
||||
{
|
||||
int x = (this.Location.X + (e.Location.X - startPosition.X));
|
||||
int y = (this.Location.Y + (e.Location.Y - startPosition.Y));
|
||||
|
||||
//this.Location = validateFormLocation(x, y);
|
||||
this.Location = new Point(x, y);
|
||||
}
|
||||
}
|
||||
[Category("Appearance")]
|
||||
public ContextMenuStrip TitleContextMenuStrip { get; set; } = null;
|
||||
|
||||
}
|
||||
}
|
@ -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,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;
|
@ -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)
|