CHanged to remove unused files
This commit is contained in:
parent
304f5428c6
commit
86f64ffee1
@ -179,7 +179,7 @@ namespace RokettoLaunch
|
||||
RyzStudio.Runtime.InteropServices.User32.UnregisterHotKey((IntPtr)Handle, 1);
|
||||
});
|
||||
|
||||
if ((this.CurrentSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results()).Key != Keys.None)
|
||||
if ((this.CurrentSession?.ShowToggleHotkey ?? new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results()).Key != Keys.None)
|
||||
{
|
||||
UIControl.Invoke(this, (x) =>
|
||||
{
|
||||
@ -1347,7 +1347,7 @@ namespace RokettoLaunch
|
||||
return;
|
||||
}
|
||||
|
||||
if (tableLayout.GroupId == null)
|
||||
if (tableLayout.GroupId == Guid.Empty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,311 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using RyzStudio.Windows.Forms;
|
||||
|
||||
namespace RyzStudio.Windows.TileForms
|
||||
{
|
||||
public class TileContainer : RyzStudio.Windows.Forms.TTogglePanel
|
||||
{
|
||||
public TileContainer()
|
||||
{
|
||||
this.AllowDrop = true;
|
||||
this.ForeColor = Color.FromArgb(31, 31, 31);
|
||||
this.HeaderPadding = new Padding(10, 0, 0, 0);
|
||||
}
|
||||
|
||||
private const int PADDING_BOTTOM = 10;
|
||||
|
||||
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Size TileSize { get; set; } = new Size(70, 70);
|
||||
|
||||
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int TileMargin { get; set; } = 3;
|
||||
|
||||
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public bool AutoSizeHeight { get; set; } = false;
|
||||
|
||||
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public List<Tuple<System.Windows.Forms.Control, Point>> TileCollection { get; set; } = new List<Tuple<System.Windows.Forms.Control, Point>>();
|
||||
|
||||
public int ColumnCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.TileCollection.Count <= 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return (this.TileCollection?.Max(x => x.Item2.X) ?? 0) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
public int RowCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.TileCollection.Count <= 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return (this.TileCollection?.Max(x => x.Item2.Y) ?? 0) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
public Size HotRectangle
|
||||
{
|
||||
get => new Size((this.ContentRectangle.Width - SystemInformation.VerticalScrollBarWidth), this.ContentRectangle.Height);
|
||||
}
|
||||
|
||||
public Size GridSize
|
||||
{
|
||||
get
|
||||
{
|
||||
var tileWidth = TileSize.Width + TileMargin;
|
||||
var tileHeight = TileSize.Height + TileMargin;
|
||||
|
||||
var columns = (int)Math.Floor(decimal.Divide(this.HotRectangle.Width, tileWidth));
|
||||
var rows = (int)Math.Floor(decimal.Divide(this.HotRectangle.Height, tileHeight));
|
||||
|
||||
return new Size(columns, rows);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void OnControlAdded(ControlEventArgs e)
|
||||
{
|
||||
base.OnControlAdded(e);
|
||||
|
||||
if (e.Control == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(e.Control is Tile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var newTile = (Tile)e.Control;
|
||||
newTile.OnMoved += (object sender, EventArgs e) =>
|
||||
{
|
||||
var control = (System.Windows.Forms.Control)sender;
|
||||
|
||||
var coord = this.GetCoord(control);
|
||||
coord = this.ValidateCoord(coord);
|
||||
|
||||
MoveTile(control, coord);
|
||||
};
|
||||
|
||||
var coord = GetCoord(e.Control);
|
||||
|
||||
MoveTile(e.Control, coord);
|
||||
}
|
||||
|
||||
protected override void OnControlRemoved(ControlEventArgs e)
|
||||
{
|
||||
base.OnControlRemoved(e);
|
||||
|
||||
var n = this.TileCollection.FindIndex(x => x.Item1 == e.Control);
|
||||
|
||||
this.TileCollection.RemoveAt(n);
|
||||
}
|
||||
|
||||
|
||||
public void Add(Control control, int x, int y)
|
||||
{
|
||||
var pos = GetLocation(new Point(x, y));
|
||||
|
||||
control.Location = pos;
|
||||
|
||||
UIControl.Invoke(this, (x) => this.Controls.Add(control));
|
||||
}
|
||||
|
||||
public void AddRow()
|
||||
{
|
||||
var gridSize = this.GridSize;
|
||||
|
||||
this.AutoSize(gridSize.Width, (gridSize.Height + 1));
|
||||
}
|
||||
|
||||
public void RemoveRow()
|
||||
{
|
||||
var gridSize = this.GridSize;
|
||||
var minGridSize = this.GetMinGridSize();
|
||||
|
||||
var y = Math.Max((gridSize.Height - 1), minGridSize.Height);
|
||||
|
||||
this.AutoSize(gridSize.Width, y);
|
||||
}
|
||||
|
||||
public new void AutoSize(int x, int y)
|
||||
{
|
||||
var tileWidth = TileSize.Width + TileMargin;
|
||||
var tileHeight = TileSize.Height + TileMargin;
|
||||
|
||||
var w = (tileWidth * x) + this.ContentRectangle.Left + SystemInformation.VerticalScrollBarWidth;
|
||||
var h = (tileHeight * y) + this.ContentRectangle.Top;
|
||||
h += PADDING_BOTTOM;
|
||||
|
||||
this.ExpandedHeight = h;
|
||||
|
||||
UIControl.Invoke(this, (x) => this.Size = new Size(w, h));
|
||||
|
||||
this.IsOpen = this.IsOpen;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
if (this.TileCollection == null)
|
||||
{
|
||||
this.TileCollection = new List<Tuple<System.Windows.Forms.Control, Point>>();
|
||||
}
|
||||
|
||||
this.Controls.Clear();
|
||||
this.TileCollection.Clear();
|
||||
}
|
||||
|
||||
public Point GetCoord(System.Windows.Forms.Control control)
|
||||
{
|
||||
var tileWidth = TileSize.Width + TileMargin;
|
||||
var tileHeight = TileSize.Height + TileMargin;
|
||||
|
||||
var x = control.Left - this.ContentRectangle.Left;
|
||||
var y = control.Top - this.ContentRectangle.Top;
|
||||
|
||||
var colX = (int)Math.Floor(decimal.Divide(x, tileWidth));
|
||||
var colY = (int)Math.Floor(decimal.Divide(y, tileHeight));
|
||||
|
||||
colX = Math.Max(colX, 0);
|
||||
colY = Math.Max(colY, 0);
|
||||
|
||||
return new Point(colX, colY);
|
||||
}
|
||||
|
||||
public Size GetMinGridSize()
|
||||
{
|
||||
var x = Math.Max(this.ColumnCount, 1);
|
||||
var y = Math.Max(this.RowCount, 1);
|
||||
|
||||
return new Size(x, y);
|
||||
}
|
||||
|
||||
public Point GetNextCoord()
|
||||
{
|
||||
var y = Math.Max(this.RowCount, 1) - 1;
|
||||
var x = -1;
|
||||
|
||||
if (this.TileCollection.Count > 0)
|
||||
{
|
||||
x = (this.TileCollection?.Where(x => x.Item2.Y == y)?.Max(x => x.Item2.X) ?? 0);
|
||||
}
|
||||
|
||||
return GetNextCoord(new Point(x, y));
|
||||
}
|
||||
|
||||
public Point GetNextCoord(Point coord)
|
||||
{
|
||||
var gridSize = this.GridSize;
|
||||
|
||||
var x = (coord.X + 1);
|
||||
var y = coord.Y;
|
||||
|
||||
if (x >= gridSize.Width)
|
||||
{
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
public new void Invalidate()
|
||||
{
|
||||
base.Invalidate();
|
||||
|
||||
if (this.TileCollection == null)
|
||||
{
|
||||
this.TileCollection = new List<Tuple<System.Windows.Forms.Control, Point>>();
|
||||
}
|
||||
|
||||
this.TileCollection.Clear();
|
||||
|
||||
foreach (var item in this.Controls)
|
||||
{
|
||||
var control = (System.Windows.Forms.Control)item;
|
||||
var coord = GetCoord(control);
|
||||
|
||||
MoveTile(control, coord);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveTile(System.Windows.Forms.Control control, Point newCoord)
|
||||
{
|
||||
var n = this.TileCollection.FindIndex(x => x.Item1 == control);
|
||||
if (n < 0)
|
||||
{
|
||||
// Add to collection
|
||||
this.TileCollection.Add(new Tuple<System.Windows.Forms.Control, Point>(control, newCoord));
|
||||
|
||||
n = this.TileCollection.FindIndex(x => x.Item1 == control);
|
||||
}
|
||||
|
||||
this.TileCollection[n] = new Tuple<Control, Point>(control, newCoord);
|
||||
|
||||
var newLocation = GetLocation(newCoord);
|
||||
control.Location = new Point(newLocation.X, newLocation.Y);
|
||||
|
||||
// Auto-resize for height
|
||||
if (this.AutoSizeHeight)
|
||||
{
|
||||
var gridSize = this.GridSize;
|
||||
var newHeight = (this.TileCollection?.Max(x => x.Item2.Y) ?? 0) + 1;
|
||||
|
||||
this.AutoSize(gridSize.Width, Math.Max(gridSize.Height, newHeight));
|
||||
}
|
||||
|
||||
// Handle displaced tile
|
||||
var duplicateTile = this.TileCollection.Where(x => ((x.Item1 != control) && (x.Item2 == newCoord))).FirstOrDefault();
|
||||
if (duplicateTile != null)
|
||||
{
|
||||
var nextCoord = GetNextCoord(newCoord);
|
||||
|
||||
MoveTile(duplicateTile.Item1, nextCoord);
|
||||
}
|
||||
}
|
||||
|
||||
public Point ValidateCoord(Point coord)
|
||||
{
|
||||
var gridSize = this.GridSize;
|
||||
|
||||
var x = coord.X;
|
||||
var y = coord.Y;
|
||||
|
||||
if (x >= gridSize.Width)
|
||||
{
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
|
||||
protected Point GetLocation(Point coord)
|
||||
{
|
||||
var tileWidth = TileSize.Width + TileMargin;
|
||||
var tileHeight = TileSize.Height + TileMargin;
|
||||
|
||||
var posX = (coord.X * tileWidth) + this.ContentRectangle.Left;
|
||||
var posY = (coord.Y * tileHeight) + this.ContentRectangle.Top;
|
||||
|
||||
return new Point(posX, posY);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Loading…
Reference in New Issue
Block a user