mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
修复资源引用错误问题
This commit is contained in:
parent
1d4a0c4797
commit
fb81811be0
@ -469,67 +469,3 @@ public class ObservableMultiStatePoint
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class ObservableRect<T>
|
||||
{
|
||||
public ObservableValue<T> X { get; } = new();
|
||||
public ObservableValue<T> Y { get; } = new();
|
||||
public ObservableValue<T> Width { get; } = new();
|
||||
public ObservableValue<T> Height { get; } = new();
|
||||
|
||||
public ObservableRect() { }
|
||||
|
||||
public ObservableRect(T x, T y, T width, T hetght)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
Width.Value = width;
|
||||
Height.Value = hetght;
|
||||
}
|
||||
|
||||
public void SetValue(T x, T y, T width, T hetght)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
Width.Value = width;
|
||||
Height.Value = hetght;
|
||||
}
|
||||
|
||||
public ObservableRect<T> Copy()
|
||||
{
|
||||
var result = new ObservableRect<T>();
|
||||
result.X.Value = X.Value;
|
||||
result.Y.Value = Y.Value;
|
||||
result.Width.Value = Width.Value;
|
||||
result.Height.Value = Height.Value;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class ObservablePoint<T>
|
||||
{
|
||||
public ObservableValue<T> X { get; } = new();
|
||||
public ObservableValue<T> Y { get; } = new();
|
||||
|
||||
public ObservablePoint() { }
|
||||
|
||||
public ObservablePoint(T x, T y)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
}
|
||||
|
||||
public void SetValue(T x, T y)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
}
|
||||
|
||||
public ObservablePoint<T> Copy()
|
||||
{
|
||||
var result = new ObservablePoint<T>();
|
||||
result.X.Value = X.Value;
|
||||
result.Y.Value = Y.Value;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
31
VPet.ModMaker/Models/ObservablePoint.cs
Normal file
31
VPet.ModMaker/Models/ObservablePoint.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using HKW.HKWUtils.Observable;
|
||||
|
||||
namespace VPet.ModMaker.Models;
|
||||
|
||||
public class ObservablePoint<T>
|
||||
{
|
||||
public ObservableValue<T> X { get; } = new();
|
||||
public ObservableValue<T> Y { get; } = new();
|
||||
|
||||
public ObservablePoint() { }
|
||||
|
||||
public ObservablePoint(T x, T y)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
}
|
||||
|
||||
public void SetValue(T x, T y)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
}
|
||||
|
||||
public ObservablePoint<T> Copy()
|
||||
{
|
||||
var result = new ObservablePoint<T>();
|
||||
result.X.Value = X.Value;
|
||||
result.Y.Value = Y.Value;
|
||||
return result;
|
||||
}
|
||||
}
|
39
VPet.ModMaker/Models/ObservableRect.cs
Normal file
39
VPet.ModMaker/Models/ObservableRect.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using HKW.HKWUtils.Observable;
|
||||
|
||||
namespace VPet.ModMaker.Models;
|
||||
|
||||
public class ObservableRect<T>
|
||||
{
|
||||
public ObservableValue<T> X { get; } = new();
|
||||
public ObservableValue<T> Y { get; } = new();
|
||||
public ObservableValue<T> Width { get; } = new();
|
||||
public ObservableValue<T> Height { get; } = new();
|
||||
|
||||
public ObservableRect() { }
|
||||
|
||||
public ObservableRect(T x, T y, T width, T hetght)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
Width.Value = width;
|
||||
Height.Value = hetght;
|
||||
}
|
||||
|
||||
public void SetValue(T x, T y, T width, T hetght)
|
||||
{
|
||||
X.Value = x;
|
||||
Y.Value = y;
|
||||
Width.Value = width;
|
||||
Height.Value = hetght;
|
||||
}
|
||||
|
||||
public ObservableRect<T> Copy()
|
||||
{
|
||||
var result = new ObservableRect<T>();
|
||||
result.X.Value = X.Value;
|
||||
result.Y.Value = Y.Value;
|
||||
result.Width.Value = Width.Value;
|
||||
result.Height.Value = Height.Value;
|
||||
return result;
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Control.xaml" />
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
<ResourceDictionary Source="../Converters.xaml" />
|
||||
<ResourceDictionary Source="../Templates.xaml" />
|
||||
<ResourceDictionary Source="../Styles.xaml" />
|
||||
<ResourceDictionary Source="Converters.xaml" />
|
||||
<ResourceDictionary Source="Templates.xaml" />
|
||||
<ResourceDictionary Source="Styles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
@ -128,6 +128,8 @@
|
||||
<Compile Include="Models\ModMakeHistory.cs" />
|
||||
<Compile Include="Models\ModMakerInfo.cs" />
|
||||
<Compile Include="Models\ModModel\MoveModel.cs" />
|
||||
<Compile Include="Models\ObservablePoint.cs" />
|
||||
<Compile Include="Models\ObservableRect.cs" />
|
||||
<Compile Include="Models\ObservableRange.cs" />
|
||||
<Compile Include="Models\ModModel\PetModel.cs" />
|
||||
<Compile Include="Models\ModModel\SelectTextModel.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user