-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: Launcher Added: Animation Model Selector for Preview
- Loading branch information
Showing
19 changed files
with
4,293 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using PSXPrev.Forms; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Drawing.Design; | ||
using System.Windows.Forms; | ||
using System.Windows.Forms.Design; | ||
|
||
namespace PSXPrev | ||
{ | ||
public class RootEntitySelectorEditor : UITypeEditor | ||
{ | ||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) | ||
{ | ||
return UITypeEditorEditStyle.Modal; | ||
} | ||
|
||
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) | ||
{ | ||
if (Program.Scanning) | ||
{ | ||
MessageBox.Show("Please wait until the scan finishes."); | ||
return null; | ||
} | ||
var svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; | ||
if (svc != null) | ||
{ | ||
using (var form = new SelectTMDForm()) | ||
{ | ||
if (svc.ShowDialog(form) == DialogResult.OK) | ||
{ | ||
return form.SelectedTMD; | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
using (var form = new SelectTMDForm()) | ||
{ | ||
if (form.ShowDialog() == DialogResult.OK) | ||
{ | ||
return form.SelectedTMD; | ||
} | ||
} | ||
} | ||
return base.EditValue(context, provider, value); | ||
} | ||
} | ||
} |
Oops, something went wrong.