|
Where's the code? Without complete details, we can't even guess. Include those details in your question. I think you should try something like this[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
i think you have to use media query
|
|
|
|
|
HI i have window 7 on my pc. want to know which sdk / framework do i need to install to start working on mobile development. my main focus is to learn mobile website and then mobile native application.
Ravi Khoda
|
|
|
|
|
|
Thanks, useful
Ravi Khoda
|
|
|
|
|
Good link for windows mobile
|
|
|
|
|
Dear Friends,
I have list of mp3 files that I would like to merge them into one file. I downloaded files locally into isolated storage, but I have no idea how to merge them. google doesn't help either. I don't know if its possible in wp8. (2) If not possible what specific solution you could advice (I also have my files in web).
Thanks!
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Dear friends, I have bounded pivot items using collection which works fine. Now I want to remove individual pivot item when selection changes.
private void myPivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
{
//Remove old Items
// Add New Item to Page collection (Pages.Add())
//Show only 1 pivot item (Users should see other pivot item headers)
}
}
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
HI,
How to draw a straight line 3 cm?
Tell me the class and Function .
Thank you!
windows phone7 or windows phone 8
|
|
|
|
|
|
Dear All,
I have below code (Just for text purpose)
<ScrollViewer VerticalScrollBarVisibility="Visible">
<TextBlock x:Name="txt" Foreground="White" FontSize="40"/>
</ScrollViewer>
and c#
for (var i = 0; i < 50; i++)
txt.Text += counter++ + Environment.NewLine;
It prints upto 43 lines (counter), However there is a scroll, but i cannot see the remaining text.
I dont know what is the issue with textblock (does it accept only 43 lines or more?)
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
hi, developing mobile sample application in vs2008 and db as SQLite.
System.MissingMethodException was unhandled
Message: The version of the assembly System.Data, Version=3.9.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC cannot be loaded by this version of the Microsoft .NET Compact Framework.
version conflict version is raising in need help in this problem. very urgent.
thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
hi developing an sample mobile application in vs2008 and SQLite db. frequently this error occurred.
Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\samplemob\system.dll'. Error 0x80070070: There is not enough space on the disk.
Device Connectivity Component
any one help to resolve this problem.
thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
Dear All,
I am developing Windows Phone 8 App in c# and i have followed
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202978(v=vs.105).aspx[^]
When Playing file, there is 1-3 seconds delay in playing each Mp3 file.
I am looking to remove this delay or play next track (next mp3 file) before reaching just to an end.
Google does not help a lot
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
this is a code sample that can help you :
private HttpWebRequest request;
private Mp3MediaStreamSource mss;
private string mediaFileLocation =
@"http://media.ch9.ms/ch9/755d/4f893d13-fa05-4871-9123-3eadd2f0755d/
EightPlatformAnnouncements.mp3";
public MainPage()
{
InitializeComponent();
Get = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
Play = (ApplicationBarIconButton)ApplicationBar.Buttons[1];
Pause = (ApplicationBarIconButton)ApplicationBar.Buttons[2];
}
private void Get_Click(object sender, EventArgs e)
{
request = WebRequest.CreateHttp(mediaFileLocation);
request.AllowReadStreamBuffering = true;
request.BeginGetResponse(new AsyncCallback(RequestCallback), null);
}
private void RequestCallback(IAsyncResult asyncResult)
{
HttpWebResponse response =
request.EndGetResponse(asyncResult) as HttpWebResponse;
Stream s = response.GetResponseStream();
mss = new Mp3MediaStreamSource(s, response.ContentLength);
Dispatcher.BeginInvoke(() =>
{
mp3Element.SetSource(mss);
Play.IsEnabled = true;
Get.IsEnabled = false;
});
}
private void Play_Click(object sender, EventArgs e)
{
mp3Element.Play();
Play.IsEnabled = false;
Pause.IsEnabled = true;
}
private void Pause_Click(object sender, EventArgs e)
{
mp3Element.Pause();
Pause.IsEnabled = false;
Play.IsEnabled = true;
}
Thanks
|
|
|
|
|
Thanks for the reply, I am storing files locally and I am using BackgroundAudioPlayer instead of Streaming.
(I didnt understand mp3Element, object of?)
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Many Thnaks for your nice message.
So Having set up the projects, you can then declare an Mp3MediaStreamSource object. The sample
app fetches a remote MP3 file by using an HttpWebRequest. When we get the data back, we use it to
initialize the Mp3MediaStreamSource and set that as the source for a MediaElement object, which is
declared in XAML.
Thanks.
|
|
|
|
|
Thanks for the reply, Can you please help me with Mp3MediaStreamSource class.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Unfortunately, the MediaStreamSource class is not well documented. Fortunately, Microsoft has
made available a set of helper classes, which you can obtain at https://github.com/loarabia/ManagedMediaHelpers. so in the example that I made before is good way to understand it also.
Thanks
|
|
|
|
|
Google maps API key in the sample code
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 100% }
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8
};
var map = new google.maps.Map(document.getElementById("map-canvas"),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
|
|
|
|
|
Hi,
Android (C#) :
I am populating my listview from Sqlite (sometime also from DataTable)
1. when the data is huge its very slow ?
2. how to have filter for this with high speed ?(same as contact list )
Thanks in advanced !
For filtering i have seen this code :
_adapter.Filter.InvokeFilter(_inputSearch.Text);
but just work for one column :
_adapter = new ArrayAdapter<string>(this, Resource.Layout.list_item, Resource.Id.product_name, products);
No USE At ALL !!!!
my code :
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.HesabList);
progress = ProgressDialog.Show(this, "", "Loading ...");
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.Indeterminate = true;
new Thread(new ThreadStart(delegate
{
_btnUpdate = FindViewById<Button>(Resource.Id.UpdateHesabList);
_btnUpdate.Click += new EventHandler(_btnUpdate_Click);
gvHesab = FindViewById<ListView>(Resource.Id.gvHesabList);
gvHesab.ItemClick += new EventHandler<AdapterView.ItemClickEventArgs>(gvHesab_ItemClick);
isTarafHesab = Intent.GetBooleanExtra("IsTarafHesab", false);
txtSearchHesabList = (EditText)FindViewById(Resource.Id.txtSearchHesabList);
txtSearchHesabList.TextChanged += new EventHandler<Android.Text.TextChangedEventArgs>(txtSearchHesabList_TextChanged);
txtSearchHesabList.Gravity = GravityFlags.Right;
Looper.Prepare();
File dbtest = new File(clsBase.SqliteDBPath);
if (!dbtest.Exists() )
{
if (clsBase.HasInternetConnection(this))
createDbSqlite();
else
{
MessageBoxAndroid.Show(this, "Connect to Internet First !");
Finish();
}
}
else
{
fillListView();
}
RunOnUiThread(() => progress.Dismiss());
})).Start();
}
private void fillGridView()
{
try
{
SQLiteDatabase db = OpenOrCreateDatabase("test.db", FileCreationMode.WorldReadable, null);
ICursor cursors = db.RawQuery("select Moen, Hesab, opab, Coab,(select count(*) from tbl_Hest b where a._id >= b._id) as _id,Id from tbl_Hest a", null);
String[] from = Resources.GetStringArray(Resource.Array.gvHesabHeader);
int[] to = { Resource.Id.txt_HesabListGrid_Heen,
Resource.Id.txt_HesabListGrid_Heol ,Resource.Id.txt_HesabListGrid_Heb,
Resource.Id.txt_HesabListGrid_Coab,Resource.Id.txt_HesabListGrid_Row,Resource.Id.txt_HesabListGrid_Id};
RunOnUiThread(() =>
{
SimpleCursorAdapter _HesabGridAdapter = new HesabListGridview(this, Resource.Layout.HesabListGrid, cursors, from, to);
gvHesab.Adapter = _HesabGridAdapter;
});
setListViewHeightBasedOnChildren(gvHesab);
gvHesab.TextFilterEnabled = true;
EditText txtSearchHesabList = (EditText)FindViewById(Resource.Id.txtSearchHesabList);
txtSearchHesabList.TextChanged += new EventHandler<Android.Text.TextChangedEventArgs>
(txtSearchHesabList_TextChanged);
}
catch (Exception ex)
{
}
}
class HesabListGridview : SimpleCursorAdapter
{
ICursor c;
Context context;
Activity activity;
int idS;
public HesabListGridview(Context context, int layout, ICursor c, string[] from, int[] to)
: base(context, layout, c, from, to)
{
this.c = c;
this.context = context;
this.activity = (Activity)context;
}
bool isFirst = true;
public static int dtRowCount = 0;
int CountRepeated = 0;
public override Filter Filter
{
get
{
return base.Filter;
}
}
public override IFilterQueryProvider FilterQueryProvider
{
get
{
return base.FilterQueryProvider;
}
set
{
base.FilterQueryProvider = value;
}
}
public override View GetView(int position, View convertView, ViewGroup parent)
{
if (convertView == null)
convertView = View.Inflate(context, Resource.Layout.HesabListGrid, null);
View row = convertView;
try
{
c.MoveToPosition(position);
TextView txtHesabGrid_Coni = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Hesoen);
TextView txtHesabGrid_Bde = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Hesol);
TextView txtHesabGrid_Nab = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Heab);
TextView txtHesabGrid_Cosab = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Coab);
TextView txtHesabGrid_Row = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Row);
TextView txtHesabGrid_Id = (TextView)convertView.FindViewById(Resource.Id.txt_HesabListGrid_Id);
txtHesabGrid_Coni.SetText(c.GetString(c.GetColumnIndex("Hen")), TextView.BufferType.Normal);
txtHesabGrid_Bde.SetText(c.GetString(c.GetColumnIndex("Hl")), TextView.BufferType.Normal);
txtHesabGrid_Nab.SetText(c.GetString(c.GetColumnIndex("Heb")), TextView.BufferType.Normal);
txtHesabGrid_Cosab.SetText(c.GetString(c.GetColumnIndex("Coab")), TextView.BufferType.Normal);
txtHesabGrid_Row.SetText(c.GetInt(c.GetColumnIndex("_id")).ToString(), TextView.BufferType.Normal);
txtHesabGrid_Id.SetText(c.GetString(c.GetColumnIndex("Id")), TextView.BufferType.Normal);
txtHesabGrid_Id.Visibility = ViewStates.Gone;
if (position % 2 == 0)
{
convertView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#6bcdfb"));
}
else
{
convertView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#2cb8de"));
}
CountRepeated++;
if (17 == CountRepeated)
{
isFirst = false;
}
if (isFirst)
{
HorizontalScrollView hv = (HorizontalScrollView)activity.FindViewById(Resource.Id.scrollHesabListGrid);
hv.FullScroll(FocusSearchDirection.Left);
}
}
catch (Exception ex)
{
}
return (row);
}
}
}
|
|
|
|
|
I need to integrate basic encryption into a .Net portable class using PCLContrib (http://pclcontrib.codeplex.com/)
I have converted desktop framework code to portable as below but I get a padding error on decryption.
Can anybody help me out?:
Public Function XAES_Encrypt(input As String, pass As String) As String
Dim AES As New System.Security.Cryptography.AesManaged
Dim Hash_AES As New System.Security.Cryptography.SHA256Managed
Dim encrypted As String = ""
Try
Dim hash As Byte() = New Byte(31) {}
Dim temp As Byte() = Hash_AES.ComputeHash(System.Text.UnicodeEncoding.Unicode.GetBytes(pass))
Array.Copy(temp, 0, hash, 0, 16)
Array.Copy(temp, 0, hash, 15, 16)
AES.Key = hash
Dim DESEncrypter As System.Security.Cryptography.ICryptoTransform = AES.CreateEncryptor()
Dim Buffer As Byte() = System.Text.UnicodeEncoding.Unicode.GetBytes(input)
encrypted = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
Return encrypted
Catch ex As Exception
Return ex.Message & "error"
End Try
End Function
Public Function XAES_Decrypt(input As String, pass As String) As String
Dim AES As New System.Security.Cryptography.AesManaged
Dim Hash_AES As New System.Security.Cryptography.SHA256Managed
Dim decrypted As String = ""
Try
Dim hash As Byte() = New Byte(31) {}
Dim temp As Byte() = Hash_AES.ComputeHash(System.Text.UnicodeEncoding.Unicode.GetBytes(pass))
Array.Copy(temp, 0, hash, 0, 16)
Array.Copy(temp, 0, hash, 15, 16)
AES.Key = hash
Dim DESDecrypter As System.Security.Cryptography.ICryptoTransform = AES.CreateDecryptor()
Dim Buffer As Byte() = Convert.FromBase64String(input)
Dim TFB() As Byte = DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length)
decrypted = System.Text.UnicodeEncoding.Unicode.GetString(TFB, 0, TFB.Length)
Return decrypted
Catch ex As Exception
Return ex.Message & "Error"
End Try
End Function
modified 19-Dec-13 14:55pm.
|
|
|
|
|
How to access in Google maps services in windows phone
|
|
|
|
|
|