From cc02eeece31d38a0e855280609e415a3d1a18941 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 26 五月 2020 15:36:47 +0800
Subject: [PATCH] 2020-05-26-2
---
HDL-ON_Android/Assets/Phone/.DS_Store | 0
HDL_ON/UI/.DS_Store | 0
HDL_ON/UI/Music/A31PlayMusicPage.cs | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++--
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm | 0
HDL_ON/UI/Music/.DS_Store | 0
.vs/HDL_APP_Project/xs/sqlite3/storage.ide | 0
.vs/HDL_APP_Project/xs/UserPrefs.xml | 7 +
HDL_ON/UI/Music/View/PlayView.cs | 12 ++--
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 0
9 files changed, 162 insertions(+), 16 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 7e862f2..3580ae7 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,7 +1,7 @@
锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/Music/A31PlayMusicPage.cs">
<Files>
- <File FileName="HDL_ON/UI/Music/A31PlayMusicPage.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/Music/A31PlayMusicPage.cs" Line="32" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -11,13 +11,16 @@
<Node name="Common" expanded="True" />
<Node name="UI" expanded="True">
<Node name="Music" expanded="True">
+ <Node name="View" expanded="True" />
<Node name="A31PlayMusicPage.cs" selected="True" />
</Node>
</Node>
</Node>
<Node name="HDL-ON_Android" expanded="True">
<Node name="Assets" expanded="True">
- <Node name="Phone" expanded="True" />
+ <Node name="Phone" expanded="True">
+ <Node name="MusicIcon" expanded="True" />
+ </Node>
</Node>
</Node>
</Node>
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
index 44ebfc1..adda9c2 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
index 3c12d23..8bec6fa 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
index 8275885..6977e38 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/.DS_Store b/HDL-ON_Android/Assets/Phone/.DS_Store
index d85dca2..726e9b4 100644
--- a/HDL-ON_Android/Assets/Phone/.DS_Store
+++ b/HDL-ON_Android/Assets/Phone/.DS_Store
Binary files differ
diff --git a/HDL_ON/UI/.DS_Store b/HDL_ON/UI/.DS_Store
index d352060..c018345 100644
--- a/HDL_ON/UI/.DS_Store
+++ b/HDL_ON/UI/.DS_Store
Binary files differ
diff --git a/HDL_ON/UI/Music/.DS_Store b/HDL_ON/UI/Music/.DS_Store
index 197f0eb..4f40449 100644
--- a/HDL_ON/UI/Music/.DS_Store
+++ b/HDL_ON/UI/Music/.DS_Store
Binary files differ
diff --git a/HDL_ON/UI/Music/A31PlayMusicPage.cs b/HDL_ON/UI/Music/A31PlayMusicPage.cs
index ad84e65..0f9f6a9 100644
--- a/HDL_ON/UI/Music/A31PlayMusicPage.cs
+++ b/HDL_ON/UI/Music/A31PlayMusicPage.cs
@@ -156,7 +156,7 @@
Width = Application.GetRealWidth(344),
Height = Application.GetRealHeight(460),
BackgroundColor = Color.WhiteColor,
- Radius=(uint)Application.GetRealHeight(12),
+ Radius = (uint)Application.GetRealHeight(12),
};
popFra.AddChidren(dialogFra);
dialogFra.AddChidren(loading);//dialogFra鍒锋柊鍥炬爣鐖舵帶浠�
@@ -210,7 +210,7 @@
Y = Application.GetRealHeight(15),
Width = Application.GetRealWidth(28 + 12),//28
Height = Application.GetRealHeight(20),
- TextID =StringId.cancelMusic,
+ TextID = StringId.cancelMusic,
TextColor = Color.MusicNoTxetColor,
TextSize = TextSize.Text14,
TextAlignment = TextAlignment.CenterLeft,
@@ -313,12 +313,11 @@
});
};
-
///闊抽噺杩涘害鏉$偣鍑讳簨浠�
EventHandler<int> progressClick = (sender, e) =>
{
playView.volValueBtn.Text = playView.volSeekBar.Progress + "%";
- SendMethod.ControlVolume(playView.volSeekBar.Progress,A31MusicModel.Current);
+ SendMethod.ControlVolume(playView.volSeekBar.Progress, A31MusicModel.Current);
A31MusicModel.Current.A31PlayStatus.vol = playView.volSeekBar.Progress.ToString();
};
playView.volSeekBar.OnProgressChangedEvent += progressClick;
@@ -367,12 +366,11 @@
return;
}
playView.volSeekBar.Progress = volume;
- SendMethod.ControlVolume(playView.volSeekBar.Progress,A31MusicModel.Current);
+ SendMethod.ControlVolume(playView.volSeekBar.Progress, A31MusicModel.Current);
A31MusicModel.Current.A31PlayStatus.vol = playView.volSeekBar.Progress.ToString();
};
}
-
System.Threading.Thread timerThread;
/// <summary>
/// 瀹氭椂鏇存柊鐘舵��
@@ -508,7 +506,8 @@
}
playView.songNameTextView.Text = (A31MusicModel.Current.A31PlayStatus.Title == null ? "Unkown" : A31MusicModel.Current.A31PlayStatus.Title);
playView.singerBtn.Text = (A31MusicModel.Current.A31PlayStatus.Artist == null ? "Unkown" : A31MusicModel.Current.A31PlayStatus.Artist.Trim());
-
+ //鏇存柊婧愮殑鐣岄潰
+ showSourcePage();
}
catch (Exception e)
{
@@ -520,6 +519,150 @@
})
{ IsBackground = true };
timerThread.Start();
+ }
+ /// <summary>
+ /// 鏇存柊涓嶅悓闊充箰婧愮晫闈㈠浘鏍囩姸鎬�
+ /// </summary>
+ void showSourcePage()
+ {
+ playView.loveBtn.Alpha = 1;
+ playView.loveBtn.Enable = true;
+
+ playView.playlistBtn.Alpha = 1;
+ playView.playlistBtn.Enable = true;
+
+ playView.prevBtn.Alpha = 1;
+ playView.prevBtn.Enable = true;
+
+ playView.nextBtn.Alpha = 1;
+ playView.nextBtn.Enable = true;
+
+ playView.playOrderBtn.Alpha = 1;
+ playView.playOrderBtn.Enable = true;
+
+ //btnPlay.Alpha = 1;
+ //btnPlay.Enable = true;
+
+ playView.volSeekBar.IsClickable = true;
+
+ switch (A31MusicModel.Current.A31PlayStatus.Source)
+ {
+
+ case "QPLAY"://QQ闊充箰
+ //currentsource.UnSelectedImagePath = "MusicIcon/qqmusic1.png";
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+ break;
+ case "AIRPLAY"://閰风嫍闊充箰
+ //currentsource.UnSelectedImagePath = "MusicIcon/kumusic.png";
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+ playView.volSeekBar.IsClickable = false;
+ break;
+ case "SONGLIST-NETWORK"://鏈湴闊充箰
+ //currentsource.UnSelectedImagePath = "MusicIcon/musicMusic1.png";
+ break;
+ case "SONGLIST-LOCAL"://USB
+ //currentsource.UnSelectedImagePath = "MusicIcon/USB1.png";
+ break;
+ case "RADIO-NETWORK"://鍦ㄧ嚎鐢靛彴
+ //currentsource.UnSelectedImagePath = "MusicIcon/local1.png";
+ playView.playlistBtn.Alpha = 1;
+ playView.playlistBtn.Enable = true;
+
+ playView.prevBtn.Alpha = 0.5f;
+ playView.prevBtn.Enable = false;
+
+ playView.nextBtn.Alpha = 0.5f;
+ playView.nextBtn.Enable = false;
+
+ playView.playOrderBtn.Alpha = 0.5f;
+ playView.playOrderBtn.Enable = false;
+ break;
+
+ case "STATION-NETWORK"://Pandora鐢靛彴
+ playView.volSeekBar.IsClickable = false;
+ //currentsource.UnSelectedImagePath = "MusicIcon/pandora1.png";
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+
+ playView.prevBtn.Alpha = 0.5f;
+ playView.prevBtn.Enable = false;
+
+ playView.playOrderBtn.Alpha = 0.5f;
+ playView.playOrderBtn.Enable = false;
+ break;
+
+ case "BLUETOOTH"://钃濈墮
+ // currentsource.UnSelectedImagePath = "MusicIcon/bluetooth1.png";
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+
+ playView.playlistBtn.Alpha = 0.5f;
+ playView.playlistBtn.Enable = false;
+
+ playView.prevBtn.Alpha = 0.5f;
+ playView.prevBtn.Enable = false;
+
+ playView.nextBtn.Alpha = 0.5f;
+ playView.nextBtn.Enable = false;
+
+ playView.playOrderBtn.Alpha = 0.5f;
+ playView.playOrderBtn.Enable = false;
+
+ //btnPlay.Alpha = 0.5f;
+ //btnPlay.Enable = false;
+ break;
+
+
+ case "LINE-IN"://绾胯矾杈撳叆
+ // currentsource.UnSelectedImagePath = "MusicIcon/muiscline1.png";
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+
+ playView.playlistBtn.Alpha = 0.5f;
+ playView.playlistBtn.Enable = false;
+
+ playView.prevBtn.Alpha = 0.5f;
+ playView.prevBtn.Enable = false;
+
+ playView.nextBtn.Alpha = 0.5f;
+ playView.nextBtn.Enable = false;
+
+ playView.playOrderBtn.Alpha = 0.5f;
+ playView.playOrderBtn.Enable = false;
+
+ //btnPlay.Alpha = 0.5f;
+ //btnPlay.Enable = false;
+ break;
+
+ default:
+ //currentsource.UnSelectedImagePath = "MusicIcon/dlna.png";
+ playView.volSeekBar.IsClickable = false;
+ playView.loveBtn.Alpha = 0.5f;
+ playView.loveBtn.Enable = false;
+
+ playView.playlistBtn.Alpha = 0.5f;
+ playView.playlistBtn.Enable = false;
+
+ playView.prevBtn.Alpha = 0.5f;
+ playView.prevBtn.Enable = false;
+
+ playView.nextBtn.Alpha = 0.5f;
+ playView.nextBtn.Enable = false;
+
+ playView.playOrderBtn.Alpha = 0.5f;
+ playView.playOrderBtn.Enable = false;
+ break;
+ }
+ //if (A31MusicModel.Current.A31PlayStatus.playSource == "UPnPServer")
+ //{
+ // currentsource.UnSelectedImagePath = "MusicIcon/dlna.png";
+ //}
+ //else if (A31MusicModel.Current.A31PlayStatus.playSource == "Tidal")
+ //{
+ // currentsource.UnSelectedImagePath = "MusicIcon/Tidal1.png";
+ //}
}
/// <summary>
/// 鏄剧ず褰撳墠鎾斁闊充箰View
@@ -636,7 +779,7 @@
A31MusicModel.Current.A31PlayStatus.Title = songBtn.Text;
System.Threading.Tasks.Task.Run(() =>
{
- SendMethod.ListMusicPlay(playListName, clickBtn.Tag,A31MusicModel.Current);
+ SendMethod.ListMusicPlay(playListName, clickBtn.Tag, A31MusicModel.Current);
});
});
});
diff --git a/HDL_ON/UI/Music/View/PlayView.cs b/HDL_ON/UI/Music/View/PlayView.cs
index a36e052..f69fa70 100644
--- a/HDL_ON/UI/Music/View/PlayView.cs
+++ b/HDL_ON/UI/Music/View/PlayView.cs
@@ -16,6 +16,7 @@
Height = Application.GetRealHeight(526),
Width = Application.GetRealWidth(327),
BackgroundImagePath = "MusicIcon/playBj.png",
+
};
/// <summary>
/// 闊充箰姹夊瓧
@@ -167,22 +168,21 @@
UnSelectedImagePath = "MusicIcon/vol.png",
};
/// <summary>
- /// 澹伴煶杩涘害鏉�
+ /// 闊抽噺杩涘害鏉�
/// </summary>
public DiyImageSeekBar volSeekBar = new DiyImageSeekBar
{
- Y = Application.GetRealHeight(418),
+ Y = Application.GetRealHeight(395),
X = Application.GetRealWidth(58),
Width = Application.GetRealWidth(215),
- Height = Application.GetRealHeight(8),
+ Height = Application.GetRealHeight(54),//杩涘害鏉$埗鎺т欢鑳屾櫙楂樺害
IsProgressTextShow = false,//鏄剧ず鐧惧垎姣�
IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔�
ProgressBarColor = Color.SelectedColor,//閫変腑杩涘害鏉¢鑹�
ThumbImagePath = "MusicIcon/progressIcon.png",//杩涘害鏉℃寜閽浘鏍�
- ThumbImageHeight = Application.GetMinRealAverage(20),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
- SeekBarViewHeight = Application.GetRealHeight(8),//杩涘害鏉$殑楂樺害
+ ThumbImageHeight = Application.GetMinRealAverage(54),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
+ SeekBarViewHeight = Application.GetMinRealAverage(8),//杩涘害鏉$殑楂樺害
};
-
/// <summary>
/// 闊抽噺鍊肩櫨鍒嗘瘮;
--
Gitblit v1.8.0