Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
feature: MaterialSkin
Browse files Browse the repository at this point in the history
  • Loading branch information
xfoxfu committed Aug 12, 2015
2 parents bbd112a + 6065c69 commit 0f1b38e
Show file tree
Hide file tree
Showing 21 changed files with 201 additions and 87 deletions.
5 changes: 5 additions & 0 deletions Auth/Auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<ApplicationIcon>Rap-ID.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="MaterialSkin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialSkin.0.2.1\lib\MaterialSkin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -70,6 +74,7 @@
<EmbeddedResource Include="Wait.resx">
<DependentUpon>Wait.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
4 changes: 2 additions & 2 deletions Auth/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.1.3")]
[assembly: AssemblyFileVersion("1.3.1.3")]
[assembly: AssemblyVersion("1.3.2.8")]
[assembly: AssemblyFileVersion("1.3.2.8")]
44 changes: 30 additions & 14 deletions Auth/Wait.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions Auth/Wait.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,30 @@
using System.Net;
using System.Net.Sockets;
using System.IO;
using MaterialSkin;
using MaterialSkin.Controls;

namespace RapID.Auth
{
public partial class Wait : Form
public partial class Wait : MaterialForm
{
private string _app;
public Wait(string app)
{
InitializeComponent();
this._app = app;
_app = app;
var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
materialSkinManager.ColorScheme = new ColorScheme(Primary.Orange800, Primary.Orange900, Primary.Orange500, Accent.Orange200, TextShade.WHITE);
}

public void SetInfoText(string text)
{
this.OverThread = () =>
{
this.infoLabel.Text = text;
this.Refresh();
infoLabel.Text = text;
Refresh();
};
this.Invoke(this.OverThread);
}
Expand Down
4 changes: 4 additions & 0 deletions Auth/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MaterialSkin" version="0.2.1" targetFramework="net451" />
</packages>
5 changes: 5 additions & 0 deletions Configure/Configure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
<ApplicationIcon>Rap-ID.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="MaterialSkin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialSkin.0.2.1\lib\MaterialSkin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -105,6 +109,7 @@
<DependentUpon>Setter.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
37 changes: 22 additions & 15 deletions Configure/Picker.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Configure/Picker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
using System.Text;
using System.Windows.Forms;
using RapID.ClassLibrary;
using MaterialSkin;
using MaterialSkin.Controls;

namespace RapID.Configure
{
public partial class Picker : Form
public partial class Picker : MaterialForm
{
private UDPServer udpClient;
private List<Device> piList = new List<Device>();
Expand All @@ -20,6 +22,11 @@ public Picker()
this.udpClient = new UDPServer(NetworkPorts.Boradcast);
this.udpClient.OnMessage += udpClient_OnMessage;
this.udpClient.StartListen();

var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
materialSkinManager.ColorScheme = new ColorScheme(Primary.Green800, Primary.Green900, Primary.Green500, Accent.Green200, TextShade.WHITE);
}

void udpClient_OnMessage(object sender, string message, System.Net.IPEndPoint remote)
Expand Down
8 changes: 4 additions & 4 deletions Configure/Picker.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Rap-IDIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="RapIDIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="iconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>134, 17</value>
<value>130, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Rap-IDIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="RapIDIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAAAAEAIAAoCAEAFgAAACgAAACAAAAAAAEAAAEAIAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA
AAD/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1257,6 +1257,6 @@
</value>
</data>
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>245, 17</value>
<value>241, 17</value>
</metadata>
</root>
4 changes: 2 additions & 2 deletions Configure/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.13")]
[assembly: AssemblyFileVersion("1.1.0.13")]
[assembly: AssemblyVersion("1.1.1.6")]
[assembly: AssemblyFileVersion("1.1.1.6")]
Loading

0 comments on commit 0f1b38e

Please sign in to comment.