Пример #1
0
        protected override VizCmd CmdHorzRel(VizCmd vizCmd)
        {
            var cmd = base.CmdHorzRel(vizCmd);

            timemark = Global.Instance.Song.NormalizedTimeMark(StartPoint.X);
            return(cmd);
        }
Пример #2
0
 protected virtual VizCmd CmdPaste(VizCmd vizCmd)
 {
     Global.Instance.Song.Vizs.Remove(vizCmd.viz);
     //vizCmd.viz = this;
     //vizCmd.obj = JsonConvert.SerializeObject(this);
     //Global.Song.Selected.Remove(viz);
     vizCmd.cmd = Cmd.Insert;
     return(vizCmd);
 }
Пример #3
0
        protected virtual VizCmd CmdCopy(VizCmd vizCmd)
        {
            //Viz viz = (Viz)JsonConvert.DeserializeObject((string)(vizCmd.obj), typeof(Lyric));
            Viz viz = vizCmd.viz;

            viz.ResetPoints(Global.Instance.Song);
            Global.Instance.Song.Vizs.Add(viz);
            vizCmd.cmd = Cmd.Delete;
            return(vizCmd);
        }
Пример #4
0
        //public bool CmdLogAndDo(int cmd)
        //{
        //	return CmdDo(cmd);
        //}

        #region Command helpers
        protected virtual VizCmd CmdHorzRel(VizCmd vizCmd)
        {
            int offset = (int)vizCmd.obj;

            StartPoint.X += offset;
            EndPoint.X   += offset;

            vizCmd.obj = -offset;
            return(vizCmd);
        }
Пример #5
0
        public virtual VizCmd XeqCmd(VizCmd vizCmd)
        {
            switch (vizCmd.cmd)
            {
            case Cmd.HorzRel: return(CmdHorzRel(vizCmd));

            case Cmd.Insert: return(CmdInsert(vizCmd));

            case Cmd.Delete: return(CmdDelete(vizCmd));

            case Cmd.Copy: return(CmdCopy(vizCmd));

            case Cmd.Paste: return(CmdPaste(vizCmd));
            }
            return(null);
        }
Пример #6
0
 protected override VizCmd CmdHorzRel(VizCmd vizCmd) => base.CmdHorzRel(vizCmd);