49 lines
No EOL
2.2 KiB
C#
49 lines
No EOL
2.2 KiB
C#
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
using JD.Application.View.Tracks;
|
|
using JD.Reflection.Attributes;
|
|
using JD.Timeline.View.ClipView;
|
|
using JD.Timeline.View.ClipView.Widgets;
|
|
using TeaBox.Actions;
|
|
using TeaBox.Bootstrap;
|
|
using JD.Serialization;
|
|
using JD.TeaBoxAddinSystem.Bootstrap;
|
|
using Application = TeaBox.ObjectModel.Application;
|
|
|
|
namespace AutoDance.Program
|
|
{
|
|
[Export(typeof(IBootstrapCommand))]
|
|
public class Initializer : IBootstrapCommand
|
|
{
|
|
public void Execute()
|
|
{
|
|
Application.Main.Actions["EditorActions.TogglePlay"].Chord = new KeyChord(Keys.Space);
|
|
|
|
OverlappingTrack.OverlapMode = OverlapMode.WaveOnly;
|
|
TapeTrackWidget.CanDeleteDefaultValue = false;
|
|
TapeTrackWidget.CanRenameDefaultValue = false;
|
|
TapeTrackWidget.DisplayGrid = true;
|
|
|
|
// Register the default style of clips.
|
|
ClipWidget.RegisterStyle<MusicLoopClip>(JD.Timeline.Properties.ResourcesCache.Icon_20x20_sound, Color.FromArgb(56, 103, 0));
|
|
ClipWidget.RegisterStyle<RecordClipMarker>(JD.Timeline.Properties.ResourcesCache.Icon_20x20_camera, Color.FromArgb(147, 147, 147));
|
|
ClipWidget.RegisterStyle<ReplayClipNew>(Properties.Resources.forward, Color.FromArgb(147, 147, 147));
|
|
|
|
// Register the types so we can use the serializers
|
|
// even if the classes were writting manually.
|
|
LuaSerializer.AssembliesToSearchForType.Add(typeof(ReplayClipNew).Assembly);
|
|
|
|
var clipFactory = ObjectFactory.getFactoryForType(typeof(Clip));
|
|
clipFactory.addType((uint)806134490, typeof(ReplayClipNew));
|
|
clipFactory.addType((uint)2342733921, typeof(RecordClipMarker));
|
|
clipFactory.addType((uint)1314516726, typeof(MusicLoopClip));
|
|
|
|
//Register the tracks to factory
|
|
var trackFactory = ObjectFactory.getFactoryForType(typeof(TapeTrack));
|
|
trackFactory.addType((uint)2608831234, typeof(MusicLoopTrack));
|
|
trackFactory.addType((uint)2560309225, typeof(ReplayClipTrack));
|
|
trackFactory.addType((uint)2561295741, typeof(RecordClipTrack));
|
|
trackFactory.addType((uint)3296113298, typeof(UsedRecordingClipTrack));
|
|
}
|
|
}
|
|
} |