修复资源引用错误问题

This commit is contained in:
Hakoyu 2023-12-06 13:11:25 +08:00
parent 1d4a0c4797
commit fb81811be0
5 changed files with 75 additions and 67 deletions

View File

@ -469,67 +469,3 @@ public class ObservableMultiStatePoint
return result; 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;
}
}

View 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;
}
}

View 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;
}
}

View File

@ -5,8 +5,8 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Control.xaml" /> <ResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Control.xaml" />
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" /> <ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
<ResourceDictionary Source="../Converters.xaml" /> <ResourceDictionary Source="Converters.xaml" />
<ResourceDictionary Source="../Templates.xaml" /> <ResourceDictionary Source="Templates.xaml" />
<ResourceDictionary Source="../Styles.xaml" /> <ResourceDictionary Source="Styles.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>

View File

@ -128,6 +128,8 @@
<Compile Include="Models\ModMakeHistory.cs" /> <Compile Include="Models\ModMakeHistory.cs" />
<Compile Include="Models\ModMakerInfo.cs" /> <Compile Include="Models\ModMakerInfo.cs" />
<Compile Include="Models\ModModel\MoveModel.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\ObservableRange.cs" />
<Compile Include="Models\ModModel\PetModel.cs" /> <Compile Include="Models\ModModel\PetModel.cs" />
<Compile Include="Models\ModModel\SelectTextModel.cs" /> <Compile Include="Models\ModModel\SelectTextModel.cs" />