Browse Source

UI chore / bug found in drag sort move down

Coder 8 months atrás
parent
commit
0a683bacf1
1 changed files with 13 additions and 6 deletions
  1. 13 6
      Bmp.WinForms/MainForm.cs

+ 13 - 6
Bmp.WinForms/MainForm.cs

@@ -472,6 +472,7 @@ namespace Bmp.WinForms
 
         private void AddDebugContent(int i)
         {
+            //TODO: UI playlist group by Album, but move sort ???
             var group = new ListViewGroup
             {
                 Header = "Grrr" + i,
@@ -488,7 +489,10 @@ namespace Bmp.WinForms
         private void ShowSettingContextMenu(int? expandIndex = null)
         {
             var ctx = new ContextMenuStrip();
-            ctx.Items.Add("(设置)").Enabled = false;
+            var topItem = ctx.Items.Add(" ---------------- 设置 ---------------- ");
+            topItem.Alignment = ToolStripItemAlignment.Right;
+            topItem.TextAlign = ContentAlignment.MiddleCenter;
+            topItem.Enabled = false;
             ctx.Items.Add("-");
 
             var allSupportedDevices = OutputDeviceProvider.GetAllSupportedDevices();
@@ -585,7 +589,7 @@ namespace Bmp.WinForms
                     if (_playbackState == UIPlaybackState.Playing)
                     {
                         toolStripItem.Enabled = false;
-                        toolStripItem.Text += "(播放时不可用)";
+                        toolStripItem.Text += " (播放时不可用)";
                     }
                     toolStripItem.Click += delegate
                     {
@@ -604,7 +608,10 @@ namespace Bmp.WinForms
 
             if (selectedDsdDevice == null)
             {
-                ctx.Items.Add("(未选择 DSD 输出设备)").Enabled = false;
+                if (_sl?.State?.DecodeDsdToPcm == false)
+                {
+                    ctx.Items.Add("(未选择 DSD 输出设备)").Enabled = false;
+                }
             }
             else if (selectedDsdDevice.HasControlPanel)
             {
@@ -612,7 +619,7 @@ namespace Bmp.WinForms
                 if (_playbackState == UIPlaybackState.Playing)
                 {
                     toolStripItem.Enabled = false;
-                    toolStripItem.Text += "(播放时不可用)";
+                    toolStripItem.Text += " (播放时不可用)";
                 }
                 toolStripItem.Click += delegate
                 {
@@ -795,7 +802,7 @@ namespace Bmp.WinForms
                 var point = MainListView.PointToClient(new Point(e.X, e.Y));
 
                 var targetIndex = MainListView.InsertionMark.NearestIndex(point);
-
+                //BUG: when move down index -= 1?
                 if (targetIndex >= 0 && targetIndex < MainListView.Items.Count)
                 {
                     foreach (var item in items!)
@@ -1084,7 +1091,7 @@ namespace Bmp.WinForms
                     _inputSource.ReadBytes(_inputSource.BlockAlign);
 
                     //if content not support seek, reload and read&discard until target pos
-                    if (seekTo - _inputSource.CurrentTime > TimeSpan.FromMilliseconds(100))
+                    if (seekTo - _inputSource.CurrentTime > TimeSpan.FromMilliseconds(500))
                     {
                         await ReloadSource();