[xiph-commits] r7975 - trunk/oggdsf/src/tools/DNPlay

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Mon Oct 11 01:55:14 PDT 2004


Author: illiminable
Date: 2004-10-11 01:55:14 -0700 (Mon, 11 Oct 2004)
New Revision: 7975

Modified:
   trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
Log:
* More seperation of UI in DNPlay

Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-10-11 08:48:45 UTC (rev 7974)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-10-11 08:55:14 UTC (rev 7975)
@@ -375,23 +375,43 @@
 			DialogResult locResult = dlgOpenFile.ShowDialog();
 			if (locResult == DialogResult.OK) 
 			{
-				tmrUpdateDuration.Enabled = false;
-				lblFileLocation.Text = dlgOpenFile.FileName;
-				bool locRes = mPlayer.loadFile(dlgOpenFile.FileName);
-				//Error check
-				mFileDuration = mPlayer.fileDuration();
-				setDurationText(mFileDuration);
-				//lblDuration.Text = mFileDuration.ToString();
+				LoadFile(dlgOpenFile.FileName);
+//				tmrUpdateDuration.Enabled = false;
+//				lblFileLocation.Text = dlgOpenFile.FileName;
+//				bool locRes = mPlayer.loadFile(dlgOpenFile.FileName);
+//				//Error check
+//				mFileDuration = mPlayer.fileDuration();
+//				setDurationText(mFileDuration);
+//				//lblDuration.Text = mFileDuration.ToString();
+//
+//				mNumTicks = 0;
+//				mLastSync = 0;
+//				updateProgressBar();
+//
+//				mPlayer.setMediaEventCallback(this);
+//				mPlayer.setCMMLCallbacks(this);
+//				cmdPlay.Enabled = true;
+			}
 
-				mNumTicks = 0;
-				mLastSync = 0;
-				updateProgressBar();
+		}
 
-				mPlayer.setMediaEventCallback(this);
-				mPlayer.setCMMLCallbacks(this);
-				cmdPlay.Enabled = true;
-			}
+		private void LoadFile(String inFileName) 
+		{
+			tmrUpdateDuration.Enabled = false;
+			lblFileLocation.Text = inFileName;
+			bool locRes = mPlayer.loadFile(inFileName);
+			//Error check
+			mFileDuration = mPlayer.fileDuration();
+			setDurationText(mFileDuration);
+			//lblDuration.Text = mFileDuration.ToString();
 
+			mNumTicks = 0;
+			mLastSync = 0;
+			updateProgressBar();
+
+			mPlayer.setMediaEventCallback(this);
+			mPlayer.setCMMLCallbacks(this);
+			cmdPlay.Enabled = true;
 		}
 		
 		private void menuItem3_Click(object sender, System.EventArgs e)
@@ -495,6 +515,7 @@
 
 		private void cmdFollowLink_Click(object sender, System.EventArgs e)
 		{
+
 			String locFilename = mCurrentClip.anchor().href();
 			tmrUpdateDuration.Enabled = false;
 			lblFileLocation.Text = locFilename;



More information about the commits mailing list