From: <kro...@us...> - 2010-12-11 09:50:54
|
Revision: 4028 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4028&view=rev Author: kroko_koenig Date: 2010-12-11 09:50:46 +0000 (Sat, 11 Dec 2010) Log Message: ----------- music part almost... Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Release/setup2.jpg trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/music_menu.xml Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -123,6 +123,7 @@ public static final int btn_main_skp_back=0x7f06000e; public static final int btn_main_skp_forw=0x7f060010; public static final int btn_main_video=0x7f060009; + public static final int clearplaylist=0x7f060050; public static final int full_text=0x7f060018; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; @@ -146,14 +147,16 @@ public static final int now_progress=0x7f06001e; public static final int now_stop=0x7f060024; public static final int now_title=0x7f060021; - public static final int open=0x7f060050; - public static final int rslide=0x7f060053; - public static final int save=0x7f06004f; - public static final int send=0x7f060051; + public static final int open=0x7f060053; + public static final int playlist=0x7f06004f; + public static final int rslide=0x7f060056; + public static final int save=0x7f060052; + public static final int sdcard=0x7f060051; + public static final int send=0x7f060054; public static final int server_ip=0x7f06004a; public static final int server_macid=0x7f06004c; public static final int server_port=0x7f06004b; - public static final int slide=0x7f060052; + public static final int slide=0x7f060055; public static final int title=0x7f06004e; public static final int vibration=0x7f06004d; public static final int widget0=0x7f060011; @@ -185,7 +188,8 @@ public static final int title=0x7f030011; } public static final class menu { - public static final int picturefullscreenmenu=0x7f050000; + public static final int music_menu=0x7f050000; + public static final int picturefullscreenmenu=0x7f050001; } public static final class string { public static final int app_name=0x7f040000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml 2010-12-11 09:50:46 UTC (rev 4028) @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:background="@drawable/back" - android:layout_height="fill_parent"> + android:layout_height="fill_parent" + android:background="@drawable/brush"> <TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:text="Actual playlist" android:textStyle="normal|bold" android:gravity="center_vertical|center_horizontal" - android:layout_width="fill_parent"></TextView> + android:layout_width="fill_parent" android:background="#FFA9A9A9" android:textColor="#000" android:textSize="18dip"></TextView> <ListView android:id="@+id/ListView01" android:layout_height="wrap_content" android:layout_width="fill_parent"> </ListView> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-11 09:50:46 UTC (rev 4028) @@ -18,9 +18,8 @@ android:gravity="center_horizontal"> </TextView> - <ImageView android:id="@+id/now_cd" android:layout_width="200dip" - android:layout_height="200dip" android:scaleType="centerCrop" - android:background="@drawable/cdcover" android:layout_gravity="center_horizontal"> + <ImageView android:id="@+id/now_cd" android:scaleType="centerCrop" + android:background="@drawable/cdcover" android:layout_gravity="center_horizontal" android:layout_height="180dip" android:layout_width="180dip"> </ImageView> <SeekBar android:id="@+id/now_progress" android:layout_width="fill_parent" @@ -60,15 +59,15 @@ <LinearLayout android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> <ImageButton android:id="@+id/now_prev" - android:background="@drawable/skip_back" android:layout_width="60dip" android:layout_height="40dip"/> + android:background="@drawable/skip_back" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_stop" - android:background="@drawable/stop" android:layout_width="60dip" android:layout_height="40dip"/> + android:background="@drawable/stop" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_play" - android:background="@drawable/right" android:layout_width="60dip" android:layout_height="40dip"/> + android:background="@drawable/right" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_next" - android:background="@drawable/skip_forward" android:layout_width="60dip" android:layout_height="40dip"/> + android:background="@drawable/skip_forward" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_list" - android:background="@drawable/document" android:layout_width="60dip" android:layout_height="40dip"/> + android:background="@drawable/document" android:layout_width="60dip" android:layout_height="60dip"/> </LinearLayout> </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/music_menu.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/music_menu.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/music_menu.xml 2010-12-11 09:50:46 UTC (rev 4028) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + + + + +<item android:id="@+id/playlist" android:title="Add to playlist"></item> +<item android:id="@+id/clearplaylist" android:title="Clear playlist"></item><item android:id="@+id/sdcard" android:title="Save to SD card"></item> + +</menu> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbHandler.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbHandler.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -53,6 +53,10 @@ public ArrayList<DbItems> GetSongsByArtist(String Artist) { return fetchData("song.xml?artist=" + Artist); } + + public ArrayList<DbItems> GetSongsByAlbum(String AlbumArtist) { + return fetchData("song.xml?album=" + AlbumArtist); + } private ArrayList<DbItems> fetchData(String Data) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -25,9 +25,11 @@ import java.io.InputStream; import mediaportal.remote.R; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.res.AssetManager; import android.os.Bundle; +import android.os.Vibrator; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; @@ -55,6 +57,7 @@ Button can = (Button) findViewById(R.id.btnBack); can.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("previousMenu"); } }); @@ -62,6 +65,7 @@ Button menu = (Button) findViewById(R.id.btnMenu); menu.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("contextMenu"); } }); @@ -69,6 +73,7 @@ Button home = (Button) findViewById(R.id.btnHome); home.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("parentDir"); } }); @@ -76,6 +81,7 @@ Button info = (Button) findViewById(R.id.btnInfo); info.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("showInfo"); } }); @@ -83,6 +89,7 @@ Button left = (Button) findViewById(R.id.btnLeft); left.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("moveLeft"); } }); @@ -90,6 +97,7 @@ Button right = (Button) findViewById(R.id.btnRight); right.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("moveRight"); } }); @@ -97,6 +105,7 @@ Button up = (Button) findViewById(R.id.btnUp); up.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("moveUp"); } }); @@ -104,6 +113,7 @@ Button down = (Button) findViewById(R.id.btnDown); down.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("moveDown"); } }); @@ -111,6 +121,7 @@ Button ok = (Button) findViewById(R.id.btnOk); ok.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("selectItem"); } }); @@ -125,6 +136,7 @@ Button pause = (Button) findViewById(R.id.btnPause); pause.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("pause"); } }); @@ -132,6 +144,7 @@ Button stop = (Button) findViewById(R.id.btnStop); stop.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("stop"); } }); @@ -139,6 +152,7 @@ Button skipForw = (Button) findViewById(R.id.btnSkipForw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("nextItem"); } }); @@ -146,6 +160,7 @@ Button skipBack = (Button) findViewById(R.id.btnSkipBack); skipBack.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("prevItem"); } }); @@ -153,6 +168,7 @@ Button fForw = (Button) findViewById(R.id.btnFForw); fForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("forward"); } }); @@ -160,6 +176,7 @@ Button fBackw = (Button) findViewById(R.id.btnFBack); fBackw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("rewind"); } }); @@ -231,4 +248,12 @@ public boolean onSingleTapUp(MotionEvent arg0) { return false; } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -25,9 +25,11 @@ import java.io.InputStream; import mediaportal.remote.R; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.res.AssetManager; import android.os.Bundle; +import android.os.Vibrator; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; @@ -54,18 +56,21 @@ Button btnVolumeUp = (Button) findViewById(R.id.btnVolumeUp); btnVolumeUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("volumeUp"); } }); Button btnVolumeDown = (Button) findViewById(R.id.btnVolumeDown); btnVolumeDown.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("volumeDown"); } }); Button btnVolumeMute = (Button) findViewById(R.id.btnVolumeMute); btnVolumeMute.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("volumeMute"); } }); @@ -73,12 +78,14 @@ Button btnChannelUp = (Button) findViewById(R.id.btnChannelUp); btnChannelUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("nextChannel"); } }); Button btnChannelDown = (Button) findViewById(R.id.btnChannelDown); btnChannelDown.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("prevChannel"); } }); @@ -86,6 +93,7 @@ Button btnExit = (Button) findViewById(R.id.btnExit); btnExit.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("exit"); } }); @@ -98,12 +106,14 @@ Button btnHibernate = (Button) findViewById(R.id.btnHibernate); btnHibernate.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("hibernate"); } }); Button btnRestart = (Button) findViewById(R.id.btnRestart); btnRestart.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("restart"); } }); @@ -117,6 +127,7 @@ Button btnWakeOnLan = (Button) findViewById(R.id.btnWakeOnLan); btnWakeOnLan.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); PostCommand("wakeonlan"); } }); @@ -185,4 +196,12 @@ public boolean onSingleTapUp(MotionEvent arg0) { return false; } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -25,6 +25,7 @@ import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; @@ -52,17 +53,25 @@ ListView l1 = (ListView) findViewById(R.id.list_album); l1.setAdapter(new EfficientAdapter(musicAlbum.this)); + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() + { + //@override + public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, + long arg3) { + + ReceiveDbXmlHandler.DbItems item = albumList.get(arg2); + + musicResults.Select = item.Album + "&" + item.Artist; + musicResults.Mode = musicResults.SelectMode.Album; + + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); + startActivityForResult(myIntent, 0); + } + }); + ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); l1.setDividerHeight(2); - - l1.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { - public boolean onItemLongClick(AdapterView<?> arg0, View arg1, - int arg2, long arg3) { - // TODO Auto-generated method stub - return false; - } - }); } @Override Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -60,7 +60,10 @@ long arg3) { ReceiveDbXmlHandler.DbItems item = artistList.get(arg2); + musicResults.Select = item.Artist; + musicResults.Mode = musicResults.SelectMode.Artist; + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -23,18 +23,18 @@ import java.util.ArrayList; import android.app.Activity; +import android.app.AlertDialog; import android.content.Context; +import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.os.Handler; import android.util.Log; -import android.view.ContextMenu; import android.view.LayoutInflater; -import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.view.ContextMenu.ContextMenuInfo; +import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; @@ -42,13 +42,23 @@ public class musicResults extends Activity { + public static enum SelectMode + { + Artist,Album; + } + public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); private static ArrayList<ReceiveDbXmlHandler.DbItems> itemList; public static String Select = ""; - + public static SelectMode Mode; + + ReceiveDbXmlHandler.DbItems selectedItem = null; + final CharSequence[] items = { "Add to playlist", "Clear playlist", + "Save to SD card", "Cancel" }; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_results); @@ -60,37 +70,78 @@ l1.setDivider(divcolor); l1.setDividerHeight(2); - registerForContextMenu(l1); + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { + // @override + public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, + long arg3) { + + selectedItem = itemList.get(arg2); + + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 + .getContext()); + builder.setTitle(selectedItem.Title); + builder.setItems(items, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: + PostAddItem(selectedItem); + Toast.makeText(musicResults.this, + selectedItem.Title + " has been added", Toast.LENGTH_SHORT).show(); + break; + case 1: + PostClear(); + Toast.makeText(musicResults.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); + break; + case 2: + SavetoSDCard(); + Toast.makeText(musicResults.this, + selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); + } + }); } - @Override - public void onCreateContextMenu(ContextMenu menu, View v, - ContextMenuInfo menuInfo) { - super.onCreateContextMenu(menu, v, menuInfo); - menu.setHeaderTitle("Select action"); + public void PostClear() { - menu.add(0, 101, 0, "Add title to playlist"); - menu.add(0, 102, 0, "Download title to SD"); + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); - ListView l1 = (ListView) findViewById(R.id.list_result); - int x = l1.getSelectedItemPosition(); - if (x == -1) - x = 0; - if (itemList.size() > 0) { - ReceiveDbXmlHandler.DbItems itm = itemList.get(x); + String xml = ""; - httpHandler http = new httpHandler(); - http.DownloadFile(); - } - x = 1; + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>CLEAR_PLAYLIST</command>"; + xml += "</message>"; + + post.Post(xml); } - @Override - public boolean onContextItemSelected(MenuItem item) { - // item.id == - return true; + public void PostAddItem(ReceiveDbXmlHandler.DbItems Item) { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>ADD_MUSIC</command>"; + xml += "<filename>" + Item.Filename + "</filename>"; + xml += "<artist>" + Item.Artist + "</artist>"; + xml += "<title>" + Item.Title + "</title>"; + xml += "<duration>" + Item.Duration + "</duration>"; + xml += "</message>"; + + post.Post(xml); } + private void SavetoSDCard() { + + } + @Override public void onStart() { super.onStart(); @@ -110,7 +161,10 @@ Log.d("update search", "do update"); ReceiveDbHandler handler = ReceiveDbHandler.getinstance(); + if(Mode == SelectMode.Artist) itemList = handler.GetSongsByArtist(Select); + if(Mode == SelectMode.Album) + itemList = handler.GetSongsByAlbum(Select); if (itemList.size() == 0) { Toast.makeText(musicResults.this, "TIME OUT SERVER", Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -23,7 +23,9 @@ import java.util.ArrayList; import android.app.Activity; +import android.app.AlertDialog; import android.content.Context; +import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; @@ -46,6 +48,10 @@ public static String Select = ""; + ReceiveDbXmlHandler.DbItems selectedItem = null; + final CharSequence[] items = { "Add to playlist", "Clear playlist", + "Save to SD card", "Cancel" }; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_song); @@ -62,11 +68,33 @@ public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { - ReceiveDbXmlHandler.DbItems item = songList.get(arg2); - PostAddItem(item); - Toast.makeText(musicSong.this, - "Title " + item.Title + " has been added", - Toast.LENGTH_SHORT).show(); + selectedItem = songList.get(arg2); + + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 + .getContext()); + builder.setTitle(selectedItem.Title); + builder.setItems(items, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: + PostAddItem(selectedItem); + Toast.makeText(musicSong.this, + selectedItem.Title + " has been added", Toast.LENGTH_SHORT).show(); + break; + case 1: + PostClear(); + Toast.makeText(musicSong.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); + break; + case 2: + SavetoSDCard(); + Toast.makeText(musicSong.this, + selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); } }); } @@ -133,6 +161,10 @@ post.Post(xml); } + private void SavetoSDCard() { + + } + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -13,7 +13,9 @@ import org.apache.http.params.HttpParams; import android.app.Activity; +import android.app.AlertDialog; import android.content.Context; +import android.content.DialogInterface; import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Color; @@ -89,6 +91,9 @@ public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); + final CharSequence[] items = { "Delete item", "Clear playlist", "Cancel" }; + private nowplaylisthandler.PlayListItem selectedItem; + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { @@ -97,15 +102,38 @@ ListView l1 = (ListView) findViewById(R.id.ListView01); l1.setAdapter(new EfficientAdapter(this)); - l1.setOnItemClickListener(new AdapterView.OnItemClickListener() - { - //@override + + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { + // @override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, - long arg3) { - //Toast.makeText(getBaseContext(), "You clicked "+country[arg2], Toast.LENGTH_LONG).show(); - } + long arg3) { + + selectedItem = nowplaylisthandler.PlayList.get(arg2); + + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 + .getContext()); + builder.setTitle(selectedItem.Title); + builder.setItems(items, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: + + mHandler.postDelayed(mUpdateTimeTask, 100); + Toast.makeText(nowplaylist.this, + selectedItem.Title + " has been deleted", Toast.LENGTH_SHORT).show(); + break; + case 1: + PostClear(); + mHandler.postDelayed(mUpdateTimeTask, 100); + Toast.makeText(nowplaylist.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); } - ); + }); ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); @@ -115,6 +143,38 @@ Toast.LENGTH_LONG).show(); } + public void PostClear() { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>CLEAR_PLAYLIST</command>"; + xml += "</message>"; + + post.Post(xml); + } + + public void PostAddItem(ReceiveDbXmlHandler.DbItems Item) { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>ADD_MUSIC</command>"; + xml += "<filename>" + Item.Filename + "</filename>"; + xml += "<artist>" + Item.Artist + "</artist>"; + xml += "<title>" + Item.Title + "</title>"; + xml += "<duration>" + Item.Duration + "</duration>"; + xml += "</message>"; + + post.Post(xml); + } + @Override public void onStart() { super.onStart(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-11 09:50:46 UTC (rev 4028) @@ -23,38 +23,52 @@ import mediaportal.remote.R; import android.app.Activity; +import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; +import android.os.Vibrator; import android.widget.CheckBox; import android.widget.EditText; +import android.widget.CompoundButton; public class setup extends Activity { public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.setup); + + CheckBox chk = (CheckBox) findViewById(R.id.vibration); + chk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, + boolean isChecked) { + if (isChecked) { + DoVibrate(); + } + } + }); } - + @Override public void onResume() { super.onResume(); - - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, + MODE_PRIVATE); + Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); Settings.Vibrate = settings.getBoolean("Vibrate", true); - - EditText txt1 = (EditText)findViewById(R.id.server_ip); - EditText txt2 = (EditText)findViewById(R.id.server_port); - EditText txt3 = (EditText)findViewById(R.id.server_macid); - CheckBox chk = (CheckBox)findViewById(R.id.vibration); - + + EditText txt1 = (EditText) findViewById(R.id.server_ip); + EditText txt2 = (EditText) findViewById(R.id.server_port); + EditText txt3 = (EditText) findViewById(R.id.server_macid); + CheckBox chk = (CheckBox) findViewById(R.id.vibration); + txt1.setText(Settings.Server); txt2.setText(Settings.Port); txt3.setText(Settings.MacId); @@ -65,23 +79,32 @@ public void onPause() { super.onPause(); - EditText txt1 = (EditText)findViewById(R.id.server_ip); - EditText txt2 = (EditText)findViewById(R.id.server_port); - EditText txt3 = (EditText)findViewById(R.id.server_macid); - CheckBox chk = (CheckBox)findViewById(R.id.vibration); + EditText txt1 = (EditText) findViewById(R.id.server_ip); + EditText txt2 = (EditText) findViewById(R.id.server_port); + EditText txt3 = (EditText) findViewById(R.id.server_macid); + CheckBox chk = (CheckBox) findViewById(R.id.vibration); - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, + MODE_PRIVATE); SharedPreferences.Editor prefEditor = settings.edit(); - + prefEditor.putString("Server", txt1.getText().toString()); - prefEditor.putString("Port",txt2.getText().toString()); + prefEditor.putString("Port", txt2.getText().toString()); prefEditor.putString("MacId", txt3.getText().toString()); prefEditor.putBoolean("Vibrate", chk.isChecked()); prefEditor.commit(); - + Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); Settings.Vibrate = settings.getBoolean("Vibrate", true); } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } Modified: trunk/plugins/AndroidRemote/Release/setup2.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2010-12-11 09:50:46 UTC (rev 4028) @@ -29,27 +29,16 @@ private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btnCopy = new System.Windows.Forms.Button(); + this.txtMyIP = new System.Windows.Forms.Label(); this.txtPort = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.txtServer = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.btnSave = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.btnVideos = new System.Windows.Forms.Button(); - this.btnMusic = new System.Windows.Forms.Button(); - this.btnPic = new System.Windows.Forms.Button(); - this.txtVideos = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.txtMusic = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.txtPic = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.txtMyIP = new System.Windows.Forms.Label(); - this.btnCopy = new System.Windows.Forms.Button(); - this.label4 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // groupBox1 @@ -68,6 +57,36 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "Command controller"; // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(286, 32); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(23, 16); + this.label4.TabIndex = 6; + this.label4.Text = "IP:"; + // + // btnCopy + // + this.btnCopy.Location = new System.Drawing.Point(287, 54); + this.btnCopy.Name = "btnCopy"; + this.btnCopy.Size = new System.Drawing.Size(75, 23); + this.btnCopy.TabIndex = 5; + this.btnCopy.Text = "use this IP"; + this.btnCopy.UseVisualStyleBackColor = true; + this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click); + // + // txtMyIP + // + this.txtMyIP.AutoSize = true; + this.txtMyIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtMyIP.Location = new System.Drawing.Point(315, 32); + this.txtMyIP.Name = "txtMyIP"; + this.txtMyIP.Size = new System.Drawing.Size(41, 16); + this.txtMyIP.TabIndex = 4; + this.txtMyIP.Text = "my IP"; + // // txtPort // this.txtPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -107,7 +126,7 @@ // btnSave // this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSave.Location = new System.Drawing.Point(12, 296); + this.btnSave.Location = new System.Drawing.Point(12, 114); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(84, 29); this.btnSave.TabIndex = 1; @@ -118,7 +137,7 @@ // btnCancel // this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCancel.Location = new System.Drawing.Point(419, 296); + this.btnCancel.Location = new System.Drawing.Point(419, 114); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(84, 29); this.btnCancel.TabIndex = 2; @@ -126,147 +145,11 @@ this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // - // groupBox2 - // - this.groupBox2.Controls.Add(this.btnVideos); - this.groupBox2.Controls.Add(this.btnMusic); - this.groupBox2.Controls.Add(this.btnPic); - this.groupBox2.Controls.Add(this.txtVideos); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Controls.Add(this.txtMusic); - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.txtPic); - this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Location = new System.Drawing.Point(12, 114); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(491, 164); - this.groupBox2.TabIndex = 3; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Share"; - // - // btnVideos - // - this.btnVideos.Location = new System.Drawing.Point(445, 93); - this.btnVideos.Name = "btnVideos"; - this.btnVideos.Size = new System.Drawing.Size(40, 23); - this.btnVideos.TabIndex = 9; - this.btnVideos.Text = "..."; - this.btnVideos.UseVisualStyleBackColor = true; - this.btnVideos.Click += new System.EventHandler(this.btnVideos_Click); - // - // btnMusic - // - this.btnMusic.Location = new System.Drawing.Point(445, 61); - this.btnMusic.Name = "btnMusic"; - this.btnMusic.Size = new System.Drawing.Size(40, 23); - this.btnMusic.TabIndex = 8; - this.btnMusic.Text = "..."; - this.btnMusic.UseVisualStyleBackColor = true; - this.btnMusic.Click += new System.EventHandler(this.btnMusic_Click); - // - // btnPic - // - this.btnPic.Location = new System.Drawing.Point(445, 29); - this.btnPic.Name = "btnPic"; - this.btnPic.Size = new System.Drawing.Size(40, 23); - this.btnPic.TabIndex = 7; - this.btnPic.Text = "..."; - this.btnPic.UseVisualStyleBackColor = true; - this.btnPic.Click += new System.EventHandler(this.btnPic_Click); - // - // txtVideos - // - this.txtVideos.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtVideos.Location = new System.Drawing.Point(36, 96); - this.txtVideos.Name = "txtVideos"; - this.txtVideos.Size = new System.Drawing.Size(392, 16); - this.txtVideos.TabIndex = 6; - this.txtVideos.Text = "..."; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(14, 80); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(51, 16); - this.label7.TabIndex = 5; - this.label7.Text = "Videos"; - // - // txtMusic - // - this.txtMusic.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMusic.Location = new System.Drawing.Point(36, 64); - this.txtMusic.Name = "txtMusic"; - this.txtMusic.Size = new System.Drawing.Size(392, 16); - this.txtMusic.TabIndex = 4; - this.txtMusic.Text = "..."; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(14, 48); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(43, 16); - this.label5.TabIndex = 3; - this.label5.Text = "Music"; - // - // txtPic - // - this.txtPic.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtPic.Location = new System.Drawing.Point(36, 32); - this.txtPic.Name = "txtPic"; - this.txtPic.Size = new System.Drawing.Size(392, 16); - this.txtPic.TabIndex = 2; - this.txtPic.Text = "..."; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(14, 16); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(56, 16); - this.label3.TabIndex = 1; - this.label3.Text = "Pictures"; - // - // txtMyIP - // - this.txtMyIP.AutoSize = true; - this.txtMyIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMyIP.Location = new System.Drawing.Point(315, 32); - this.txtMyIP.Name = "txtMyIP"; - this.txtMyIP.Size = new System.Drawing.Size(41, 16); - this.txtMyIP.TabIndex = 4; - this.txtMyIP.Text = "my IP"; - // - // btnCopy - // - this.btnCopy.Location = new System.Drawing.Point(287, 54); - this.btnCopy.Name = "btnCopy"; - this.btnCopy.Size = new System.Drawing.Size(75, 23); - this.btnCopy.TabIndex = 5; - this.btnCopy.Text = "use this IP"; - this.btnCopy.UseVisualStyleBackColor = true; - this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(286, 32); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(23, 16); - this.label4.TabIndex = 6; - this.label4.Text = "IP:"; - // // Setup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(515, 337); - this.Controls.Add(this.groupBox2); + this.ClientSize = new System.Drawing.Size(511, 155); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnSave); this.Controls.Add(this.groupBox1); @@ -281,8 +164,6 @@ this.Load += new System.EventHandler(this.Setup_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); this.ResumeLayout(false); } @@ -296,16 +177,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Button btnSave; private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Button btnVideos; - private System.Windows.Forms.Button btnMusic; - private System.Windows.Forms.Button btnPic; - private System.Windows.Forms.Label txtVideos; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label txtMusic; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label txtPic; - private System.Windows.Forms.Label label3; private System.Windows.Forms.Label txtMyIP; private System.Windows.Forms.Button btnCopy; private System.Windows.Forms.Label label4; Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2010-12-11 06:12:57 UTC (rev 4027) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2010-12-11 09:50:46 UTC (rev 4028) @@ -61,13 +61,6 @@ { txtServer.Text = xmlreader.GetValueAsString("android", "server", "192.168.0.30"); txtPort.Text = xmlreader.GetValueAsString("android", "port", "8200"); - - txtPic.Text = xmlreader.GetValueAsString("android", "pictures", - Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)); - txtMusic.Text = xmlreader.GetValueAsString("android", "music", - Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)); - txtVideos.Text = xmlreader.GetValueAsString("android", "videos", - Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)); } } private void SaveSettings() @@ -77,10 +70,6 @@ { xmlwriter.SetValue("android", "server", txtServer.Text); xmlwriter.SetValue("android", "port", txtPort.Text); - - xmlwriter.SetValue("android", "pictures", txtPic.Text); - xmlwriter.SetValue("android", "music", txtMusic.Text); - xmlwriter.SetValue("android", "videos", txtVideos.Text); } } @@ -94,39 +83,6 @@ this.Close(); } - private void btnPic_Click(object sender, EventArgs e) - { - FolderBrowserDialog folder = new FolderBrowserDialog(); - folder.SelectedPath = txtPic.Text; - - DialogResult res = folder.ShowDialog(); - if (res == DialogResult.OK) - { - txtPic.Text = folder.SelectedPath; - } - } - private void btnMusic_Click(object sender, EventArgs e) - { - FolderBrowserDialog folder = new FolderBrowserDialog(); - folder.SelectedPath = txtMusic.Text; - - DialogResult res = folder.ShowDialog(); - if (res == DialogResult.OK) - { - txtMusic.Text = folder.SelectedPath; - } - } - private void btnVideos_Click(object sender, EventArgs e) - { - FolderBrowserDialog folder = new FolderBrowserDialog(); - folder.SelectedPath = txtVideos.Text; - - DialogResult res = folder.ShowDialog(); - if (res == DialogResult.OK) - { - txtVideos.Text = folder.SelectedPath; - } - } private void btnCopy_Click(object sender, EventArgs e) { txtServer.Text = txtMyIP.Text; Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |