Skip to content

Commit 79c6135

Browse files
author
jacky.han
committed
1.Add Support Spien Version 4.0.64,4.1.00.
2.Fixed some memory usage bugs. 3.Spine atlas and json file can be drop in textbox now.
1 parent a64c9fd commit 79c6135

File tree

122 files changed

+30678
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+30678
-194
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ a tool can view spine files with different spine-runtimes version and export gif
2323
* **3.7.94**
2424
* **3.8.95**
2525
* **4.0.31**
26+
* **4.0.64**
27+
* **4.1.00**
2628
* Export animation to gif or png file.
2729
* Can view Animation with different options.
2830

README_zhTW.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* **3.7.94**
2222
* **3.8.95**
2323
* **4.0.31**
24+
* **4.0.64**
25+
* **4.1.00**
2426
* 將Spine動畫匯出成png或gif。
2527
* 能用不同功能選項瀏覽Spine動畫。
2628

SpineViewerWPF/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// 您可以指定所有的值,或將組建編號或修訂編號設為預設值
5252
// 指定為預設值:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("2.3.1.0")]
55-
[assembly: AssemblyFileVersion("2.3.1.0")]
54+
[assembly: AssemblyVersion("2.4.0.0")]
55+
[assembly: AssemblyFileVersion("2.4.0.0")]

SpineViewerWPF/PublicFunction/Common.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ public static void SaveToGif(List<MemoryStream> lms, float time = 0)
175175
fileName += $"_{App.globalValues.SelectSkin}";
176176

177177
saveFileDialog.FileName = fileName;
178-
saveFileDialog.ShowDialog();
178+
if (saveFileDialog.ShowDialog() == false)
179+
{
180+
return;
181+
}
179182
int delay = 0;
180183
if (time == 0)
181184
{
@@ -216,7 +219,7 @@ public static void SaveToGif(List<MemoryStream> lms, float time = 0)
216219
{
217220
gif.SaveAsGif(fs, new GifEncoder() { ColorTableMode = GifColorTableMode.Global });
218221
}
219-
222+
gif.Dispose();
220223
}
221224
else
222225
{
@@ -248,7 +251,10 @@ public static void SaveToGif2(float time = 0)
248251
fileName += $"_{App.globalValues.SelectSkin}";
249252

250253
saveFileDialog.FileName = fileName;
251-
saveFileDialog.ShowDialog();
254+
if(saveFileDialog.ShowDialog() == false )
255+
{
256+
return;
257+
}
252258

253259
string[] pngList = Directory.GetFiles($"{App.rootDir}\\Temp\\", "*.png",SearchOption.TopDirectoryOnly);
254260

@@ -293,6 +299,7 @@ public static void SaveToGif2(float time = 0)
293299
{
294300
gif.SaveAsGif(fs,new GifEncoder() { ColorTableMode = GifColorTableMode.Global});
295301
}
302+
gif.Dispose();
296303

297304
}
298305
else
@@ -411,6 +418,7 @@ public static void TakeScreenshot()
411418
Texture2D texture = new Texture2D(_graphicsDevice, _graphicsDevice.PresentationParameters.BackBufferWidth, _graphicsDevice.PresentationParameters.BackBufferHeight, false, _graphicsDevice.PresentationParameters.BackBufferFormat);
412419
texture.SetData(screenData);
413420
Common.SaveToPng(texture);
421+
texture.Dispose();
414422
}
415423
App.globalValues.TimeScale = bakTimeScale;
416424
}

SpineViewerWPF/PublicFunction/Player/IPlayer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ public interface IPlayer
2222
void ChangeSet();
2323

2424
void SizeChange();
25+
26+
void Dispose();
2527
}
2628

SpineViewerWPF/PublicFunction/Player/Player_2_1_08.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,11 @@ public void SizeChange()
202202
if (App.graphicsDevice != null)
203203
Player.UserControl_SizeChanged(ref App.graphicsDevice);
204204
}
205+
206+
public void Dispose()
207+
{
208+
ChangeSet();
209+
}
210+
205211
}
206212

SpineViewerWPF/PublicFunction/Player/Player_2_1_25.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,10 @@ public void SizeChange()
220220
if (App.graphicsDevice != null)
221221
Player.UserControl_SizeChanged(ref App.graphicsDevice);
222222
}
223+
224+
public void Dispose()
225+
{
226+
ChangeSet();
227+
}
223228
}
224229

SpineViewerWPF/PublicFunction/Player/Player_3_1_07.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,10 @@ public void SizeChange()
221221
if (App.graphicsDevice != null)
222222
Player.UserControl_SizeChanged(ref App.graphicsDevice);
223223
}
224+
225+
public void Dispose()
226+
{
227+
ChangeSet();
228+
}
224229
}
225230

SpineViewerWPF/PublicFunction/Player/Player_3_2_xx.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,10 @@ public void SizeChange()
221221
if (App.graphicsDevice != null)
222222
Player.UserControl_SizeChanged(ref App.graphicsDevice);
223223
}
224+
225+
public void Dispose()
226+
{
227+
ChangeSet();
228+
}
224229
}
225230

SpineViewerWPF/PublicFunction/Player/Player_3_4_02.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,10 @@ public void SizeChange()
221221
if (App.graphicsDevice != null)
222222
Player.UserControl_SizeChanged(ref App.graphicsDevice);
223223
}
224+
225+
public void Dispose()
226+
{
227+
ChangeSet();
228+
}
224229
}
225230

SpineViewerWPF/PublicFunction/Player/Player_3_5_51.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,10 @@ public void SizeChange()
220220
if (App.graphicsDevice != null)
221221
Player.UserControl_SizeChanged(ref App.graphicsDevice);
222222
}
223+
224+
public void Dispose()
225+
{
226+
ChangeSet();
227+
}
223228
}
224229

SpineViewerWPF/PublicFunction/Player/Player_3_6_32.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,10 @@ public void SizeChange()
228228
if (App.graphicsDevice != null)
229229
Player.UserControl_SizeChanged(ref App.graphicsDevice);
230230
}
231+
232+
public void Dispose()
233+
{
234+
ChangeSet();
235+
}
231236
}
232237

SpineViewerWPF/PublicFunction/Player/Player_3_6_39.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,10 @@ public void SizeChange()
213213
if (App.graphicsDevice != null)
214214
Player.UserControl_SizeChanged(ref App.graphicsDevice);
215215
}
216+
217+
public void Dispose()
218+
{
219+
ChangeSet();
220+
}
216221
}
217222

SpineViewerWPF/PublicFunction/Player/Player_3_6_53.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,10 @@ public void SizeChange()
228228
if (App.graphicsDevice != null)
229229
Player.UserControl_SizeChanged(ref App.graphicsDevice);
230230
}
231+
232+
public void Dispose()
233+
{
234+
ChangeSet();
235+
}
231236
}
232237

SpineViewerWPF/PublicFunction/Player/Player_3_7_94.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,10 @@ public void SizeChange()
212212
if(App.graphicsDevice != null)
213213
Player.UserControl_SizeChanged(ref App.graphicsDevice);
214214
}
215+
216+
public void Dispose()
217+
{
218+
ChangeSet();
219+
}
215220
}
216221

SpineViewerWPF/PublicFunction/Player/Player_3_8_95.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,9 @@ public void SizeChange()
239239
Player.UserControl_SizeChanged(ref App.graphicsDevice);
240240
}
241241

242+
public void Dispose()
243+
{
244+
ChangeSet();
245+
}
242246
}
243247

SpineViewerWPF/PublicFunction/Player/Player_4_0_31.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,5 +238,9 @@ public void SizeChange()
238238
Player.UserControl_SizeChanged(ref App.graphicsDevice);
239239
}
240240

241+
public void Dispose()
242+
{
243+
ChangeSet();
244+
}
241245
}
242246

0 commit comments

Comments
 (0)