Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ProjectObject poj = LoadUST(@"D:\VocalUtau\VocalUtau.DebugExampleFiles\DemoUSTS\Sakurane2.Tracks\Track-4b158252-eb7f-4223-b7b0-d78f32e044ec.ust");

            OAC.ReAlloc(poj.TrackerList[1].PartList[0]);

            NV = new NoteView(OAC.IntPtr, this.pianoRollWindow1);
            PV = new PitchView(OAC.IntPtr, this.pianoRollWindow1);

            PitV = new PITParamView(OAC.IntPtr, this.paramCurveWindow1);
            DynV = new DYNParamView(OAC.IntPtr, this.paramCurveWindow1);

            UAU = new UndoAbleUtils <PartsObject>();

            AV = new ActionView(OAC.IntPtr, this.pianoRollWindow1, this.paramCurveWindow1);

            NV.HandleEvents   = false;
            PV.HandleEvents   = true;
            PV.EarseModeV2    = true;
            PitV.HandleEvents = false;
            DynV.HandleEvents = true;
            btn_DYN.BackColor = DynV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control;
            btn_PIT.BackColor = PitV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control;

            NV.NoteActionEnd    += NV_NoteActionEnd;
            PV.PitchActionEnd   += PV_PitchActionEnd;
            PitV.PitchActionEnd += PitV_PitchActionEnd;
            DynV.DynActionEnd   += DynV_DynActionEnd;

            NV.NoteActionBegin    += NV_NoteActionBegin;
            PV.PitchActionBegin   += PV_PitchActionBegin;
            PitV.PitchActionBegin += PitV_PitchActionBegin;
            DynV.DynActionBegin   += DynV_DynActionBegin;

            this.pianoRollWindow1.TrackPaint += TrackPaint;
            InitEventAction();

            AV.TickPos = 480;
        }