Ejemplo n.º 1
0
        ///<summary>Execute Edit item Command</summary>
        void DoEditCmd(object prm = null)
        {
            IMediaTrack mt = (prm as IMediaTrack) ?? this.CurrentTrack;

            if (mt != null)
            {
                if (mt.IsGroup)
                {
                    TrackGroupVModel gvm = new TrackGroupVModel();
                    gvm.Entity = mt as MediaTrackGroup;
                    Views.PopupView vw = new Views.PopupView(gvm);
                    vw.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
                    vw.Topmost = true;
                    vw.Show();
                }
            }
        }
Ejemplo n.º 2
0
        ///<summary>Execute Create Track Group Command</summary>
        void DoCreateTrackGrpCmd(object prm = null)
        {
            var tg = this.Entity.AddNewTrackGroup(this.ViewUtil.EnumerateSelectedTracks());

            this.Entity.Root.Tracks.Add(tg);

            if (this._grpEditor == null)
            {
                TrackGroupVModel gvm = new TrackGroupVModel();
                gvm.Entity = tg;
                Views.PopupView vw = new Views.PopupView(gvm);
                vw.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
                vw.Closed += (s, a) => _grpEditor = null;
                _grpEditor = vw;
                vw.Show();
            }
            else
            {
                this._grpEditor.EnsureVisible();
            }
        }