28 lines
958 B
C#
28 lines
958 B
C#
using JD.Asset.Types.Map;
|
|
using JD.Timeline.Dance;
|
|
using JD.Serialization;
|
|
|
|
namespace JD.Timeline.Model.Clips
|
|
{
|
|
public static class PictogramModelExtensions
|
|
{
|
|
public static PictogramBitmapHandler BitmapHandler(this PictogramModel model)
|
|
{
|
|
if (model.Extensions.BitmapHandler == null)
|
|
{
|
|
model.Extensions.BitmapHandler = new PictogramBitmapHandler(model, model.Tape.PictogramBitmapWatcher());
|
|
}
|
|
return model.Extensions.BitmapHandler;
|
|
}
|
|
|
|
public static string PictoFullPath(this PictogramModel model)
|
|
{
|
|
return System.IO.Path.GetFullPath(System.IO.Path.Combine(Map.FromPath(model.Tape.Id).DataRoot, model.PictoPath.ToString()));
|
|
}
|
|
|
|
public static void Save(this PictogramModel model)
|
|
{
|
|
TeaBox.ObjectModel.Application.Main.Dispatcher.DispatchAsync(() => model.BitmapHandler().Save());
|
|
}
|
|
}
|
|
}
|