...
 
Commits (10)
using System;
using Tangine.Habbo;
namespace Tangine.Modules
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
......@@ -9,12 +7,6 @@ namespace Tangine.Modules
{
public string Name { get; }
public HHotel Hotel { get; set; }
public string HabboName { get; set; }
public string ResourceUrl { get; set; }
public string ResourceName { get; set; }
public AuthorAttribute(string name)
{
Name = name;
......
using System;
using Tangine.Network.Protocol;
namespace Tangine.Modules
{
[AttributeUsage(AttributeTargets.Method)]
public sealed class DataCaptureAttribute : Attribute
{
public string Hash { get; }
public ushort Id { get; }
public bool IsOutgoing { get; }
public int NotLess { get; set; }
public int NotGreater { get; set; }
public Predicate<HPacket> DataMatcher { get; }
public DataCaptureAttribute(string hash)
{
Hash = hash;
}
public DataCaptureAttribute(ushort id, bool isOutgoing)
{
Id = id;
IsOutgoing = isOutgoing;
}
public DataCaptureAttribute(Type dataType, string pattern)
{
}
public DataCaptureAttribute(Predicate<HPacket> dataMatcher)
{
DataMatcher = dataMatcher;
}
}
}
\ No newline at end of file
......@@ -7,12 +7,11 @@ namespace Tangine.Modules
{
public interface IModule : IDisposable
{
IInstaller Installer { get; }
IInstaller Installer { get; set; }
void ModifyGame(HGame game);
void ModifyGameData(HGameData gameData);
void HandleOutgoing(DataInterceptedEventArgs e);
void HandleIncoming(DataInterceptedEventArgs e);
void HandleData(DataInterceptedEventArgs e);
}
}
\ No newline at end of file
......@@ -48,6 +48,7 @@
<Compile Include="Crypto\PKCSPadding.cs" />
<Compile Include="Crypto\RSAKeys.cs" />
<Compile Include="Modules\Attributes\AuthorAttribute.cs" />
<Compile Include="Modules\Attributes\DataCaptureAttribute.cs" />
<Compile Include="Modules\Attributes\ModuleAttribute.cs" />
<Compile Include="Habbo\Enums\HAction.cs" />
<Compile Include="Habbo\Enums\HBan.cs" />
......
......@@ -80,14 +80,7 @@ namespace Tanji
foreach (IReceiver receiver in _receivers.Values)
{
if (!receiver.IsReceiving) continue;
if (e.IsOutgoing)
{
receiver.HandleOutgoing(e);
}
else
{
receiver.HandleIncoming(e);
}
receiver.HandleData(e);
}
}
......
......@@ -49,5 +49,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.15.0")]
[assembly: AssemblyFileVersion("2.0.15.0")]
\ No newline at end of file
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
\ No newline at end of file
using Tanji.Helpers;
using System;
using System.Reflection;
using System.Windows.Forms;
using System.Collections.Generic;
using Tanji.Helpers;
using Tangine.Modules;
namespace Tanji.Services.Modules.Models
{
public class ModuleModel : ObservableObject
{
public ModuleModel()
public Assembly Assembly { get; }
public string Name { get; set; }
public string Description { get; set; }
public List<AuthorAttribute> Authors { get; }
public Type Type { get; set; }
public string Path { get; set; }
public string Hash { get; set; }
public Form UserInterface { get; set; }
private IModule _instance = null;
public IModule Instance
{
get { return _instance; }
set
{
_instance = value;
RaiseOnPropertyChanged();
}
}
public ModuleModel(Assembly assembly)
{
Authors = new List<AuthorAttribute>();
Assembly = assembly;
}
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@
Content ="Uninstall Module"/>
<Button Width="150" Height="20"
Margin="328,298,0,0"
Command="{Binding InstallModuleCommand}"
Content ="Install Module"/>
</Grid>
</UserControl>
\ No newline at end of file
This diff is collapsed.
......@@ -15,12 +15,14 @@
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
<UpdateAssemblyVersion>True</UpdateAssemblyVersion>
<UpdateAssemblyFileVersion>True</UpdateAssemblyFileVersion>
<UpdateAssemblyVersion>False</UpdateAssemblyVersion>
<UpdateAssemblyFileVersion>False</UpdateAssemblyFileVersion>
<UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion>
<AssemblyVersionSettings>None.IncrementOnDemandWithReset.Increment.None</AssemblyVersionSettings>
<AssemblyFileVersionSettings>None.IncrementOnDemandWithReset.Increment.None</AssemblyFileVersionSettings>
<AssemblyVersion>2.0.15.0</AssemblyVersion>
<AssemblyVersionSettings>
</AssemblyVersionSettings>
<AssemblyFileVersionSettings>
</AssemblyFileVersionSettings>
<AssemblyVersion>1.9.901.0</AssemblyVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
......