refact: mvp
This commit is contained in:
parent
4d2f062e70
commit
9a84ad998e
59
Tech/Model/Equipment.cs
Normal file
59
Tech/Model/Equipment.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
|
||||
namespace Tech_Demo.Model
|
||||
{
|
||||
public class Equipment
|
||||
{
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
public int Id { get; set; }
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
public string Name { get; set; }
|
||||
|
||||
/**
|
||||
* ip
|
||||
*/
|
||||
public string Ip { get; set; }
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
public string Url { get; set; }
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
public int Type { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var equipment = obj as Equipment;
|
||||
return base.Equals(equipment);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode() ^ Name.GetHashCode() ^ Ip.GetHashCode() ^ Url.GetHashCode() ^ Type.GetHashCode();
|
||||
}
|
||||
|
||||
public bool Equals(Equipment equipment)
|
||||
{
|
||||
if (equipment == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return Id == equipment.Id && Name == equipment.Name && Ip == equipment.Ip && Url == equipment.Url &&
|
||||
Type == equipment.Type;
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Tech/Model/Repository/Impl/package-info.cs
Normal file
7
Tech/Model/Repository/Impl/package-info.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace Tech_Demo.Model.Repository.Impl
|
||||
{
|
||||
public class package_info
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
7
Tech/Presenter/package-info.cs
Normal file
7
Tech/Presenter/package-info.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace Tech_Demo.Presenter
|
||||
{
|
||||
public class package_info
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -84,20 +84,9 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ArpUtil.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GetIPNetTable.cs" />
|
||||
<Compile Include="PlayerView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlayerView.Designer.cs">
|
||||
<DependentUpon>PlayerView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Equipment.cs" />
|
||||
<Compile Include="Model\Repository\Impl\package-info.cs" />
|
||||
<Compile Include="Presenter\package-info.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UCOverview.cs">
|
||||
@ -106,13 +95,21 @@
|
||||
<Compile Include="UCOverview.Designer.cs">
|
||||
<DependentUpon>UCOverview.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="util\Thumbnail.cs" />
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<Compile Include="Util\ArpUtil.cs" />
|
||||
<Compile Include="Util\GetIPNetTable.cs" />
|
||||
<Compile Include="Util\Thumbnail.cs" />
|
||||
<Compile Include="View\Impl\MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="View\Impl\MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PlayerView.resx">
|
||||
</Compile>
|
||||
<Compile Include="View\Impl\PlayerView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="View\Impl\PlayerView.Designer.cs">
|
||||
<DependentUpon>PlayerView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@ -126,6 +123,12 @@
|
||||
<EmbeddedResource Include="UCOverview.resx">
|
||||
<DependentUpon>UCOverview.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="View\Impl\MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="View\Impl\PlayerView.resx">
|
||||
<DependentUpon>PlayerView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user