Search Results

Search found 9374 results on 375 pages for 'cell phone'.

Page 13/375 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Ubuntu doesn't see my phone (Sony Xperia Tipo)

    - by ola
    When I connect my phone Xperia Tipo to my Ubuntu 12.04, the USB icon does not appear in a launcher. lsusb gives me following results: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID 8086:0189 Intel Corp. Bus 001 Device 004: ID 1bcf:2880 Sunplus Innovation Technology Inc. Bus 003 Device 003: ID 0fce:5170 Sony Ericsson Mobile Communications AB I installed Wammu and it does not see phone either: Wammu is now searching for phone: All finished, found 0 phones No phone has been found! On the phone I have debbugging turned on and it sees Ubuntu. Can I ask for instruction step by step? I am a begginer on Ubuntu.

    Read the article

  • New Windows Phone 7 Developer Guidance released for building line of business applications

    - by Eric Nelson
    Several partners have been asking about guidance on combining Windows Phone 7 applications with Windows Azure. The patterns and practices team recently released new guidance on Windows Phone 7.  This is a continuation of the Windows Azure Guidance. It takes the survey application and makes a version for Windows Phone 7.  The guide includes the following topics: Prism for Windows Phone 7 Reactive Extensions WCF Services on top of Windows Azure Push Notifications Camera & Voice Panorama Much more... Well worth a read if you are an ISV looking at taking Line of Business applications to Windows Phone 7. Related Links: We have created Microsoft Platform Ready to help software houses develop applications for Windows Azure and On-Premise. Check it out and the goodies it can deliver for little effort.

    Read the article

  • Get phone number of (via mobile networks) browsing mobile device

    - by TrialUser
    I recently figured out, that the web site of my phone provider (mobile) mysteriously identifies me and automatically logs me into my account when I'm accessing with my android phone, as if it knew my phone number. (I used several browsers. When I'm using the phone as WLAN hotspot and access the same site from another device that doesn't happen.) How does my phone provider do that? On the one hand, as a programmer, I'd like to be able to do that too, but on the other hand, as a user, I'm kind of scared. What information do they have, such that they (believe they) are able to identify me just by my device? I hope this question isn't completely inappropriate for this site; feel free to add better tags — it's hard to find the right ones without knowing the Webmasters site at all.

    Read the article

  • Can each mobile app have its own client account for payments? (Windows Phone, Android and iPhone)

    - by Luckyl337
    My company has many clients wanting mobile applications and having the payments come into our account and then sorting the payments would be a real pain. So can a company have a main account to publish applications (free and chargeable) and still have some sort of client account for each app (so they could view sales and receive full payment directly)? I would like to know for Windows, Android and Apple please.

    Read the article

  • WCF on Windows Phone 7 (Silverlight 4)

    - by Igor Zevaka
    Has anyone been able to communicate using WCF on Windows Phone Series 7 emulator? I've been trying for the past two days and it's just happening for me. I can get a normal Silverlight control to work in both Silverlight 3 and Silverlight 4, but not the phone version. Here are two versions that I've tried: Version 1 - Using Async Pattern BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost/wcf/Authentication.svc"); Wcf.IAuthentication auth1 = new ChannelFactory<Wcf.IAuthentication>(basicHttpBinding, endpointAddress).CreateChannel(endpointAddress); AsyncCallback callback = (result) => { Action<string> write = (str) => { this.Dispatcher.BeginInvoke(delegate { //Display something }); }; try { Wcf.IAuthentication auth = result.AsyncState as Wcf.IAuthentication; Wcf.AuthenticationResponse response = auth.EndLogin(result); write(response.Success.ToString()); } catch (Exception ex) { write(ex.Message); System.Diagnostics.Debug.WriteLine(ex.Message); } }; auth1.BeginLogin("user0", "test0", callback, auth1); This version breaks on this line: Wcf.IAuthentication auth1 = new ChannelFactory<Wcf.IAuthentication>(basicHttpBinding, endpointAddress).CreateChannel(endpointAddress); Throwing System.NotSupportedException. The exception is not very descriptive and the callstack is equally not very helpful: at System.ServiceModel.DiagnosticUtility.ExceptionUtility.BuildMessage(Exception x) at System.ServiceModel.DiagnosticUtility.ExceptionUtility.LogException(Exception x) at System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(Exception e) at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address) at WindowsPhoneApplication2.MainPage.DoLogin() .... Version 2 - Blocking WCF call Here is the version that doesn't use the async pattern. [System.ServiceModel.ServiceContract] public interface IAuthentication { [System.ServiceModel.OperationContract] AuthenticationResponse Login(string user, string password); } public class WcfClientBase<TChannel> : System.ServiceModel.ClientBase<TChannel> where TChannel : class { public WcfClientBase(string name, bool streaming) : base(GetBinding(streaming), GetEndpoint(name)) { ClientCredentials.UserName.UserName = WcfConfig.UserName; ClientCredentials.UserName.Password = WcfConfig.Password; } public WcfClientBase(string name) : this(name, false) {} private static System.ServiceModel.Channels.Binding GetBinding(bool streaming) { System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding(); binding.MaxReceivedMessageSize = 1073741824; if(streaming) { //binding.TransferMode = System.ServiceModel.TransferMode.Streamed; } /*if(XXXURLXXX.StartsWith("https")) { binding.Security.Mode = BasicHttpSecurityMode.Transport; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None; }*/ return binding; } private static System.ServiceModel.EndpointAddress GetEndpoint(string name) { return new System.ServiceModel.EndpointAddress(WcfConfig.Endpoint + name + ".svc"); } protected override TChannel CreateChannel() { throw new System.NotImplementedException(); } } auth.Login("test0", "password0"); This version crashes in System.ServiceModel.ClientBase<TChannel> constructor. The call stack is a bit different: at System.Reflection.MethodInfo.get_ReturnParameter() at System.ServiceModel.Description.ServiceReflector.HasNoDisposableParameters(MethodInfo methodInfo) at System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract) at System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction) at System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescription(Type contractType) at System.ServiceModel.ChannelFactory1.CreateDescription() at System.ServiceModel.ChannelFactory.InitializeEndpoint(Binding binding, EndpointAddress address) at System.ServiceModel.ChannelFactory1..ctor(Binding binding, EndpointAddress remoteAddress) at System.ServiceModel.ClientBase1..ctor(Binding binding, EndpointAddress remoteAddress) at Wcf.WcfClientBase1..ctor(String name, Boolean streaming) at Wcf.WcfClientBase`1..ctor(String name) at Wcf.AuthenticationClient..ctor() at WindowsPhoneApplication2.MainPage.DoLogin() ... Any ideas?

    Read the article

  • System.UnsupportedException using WCF on Windows Phone 7

    - by Igor Zevaka
    Has anyone been able to communicate using WCF on Windows Phone Series 7 emulator? I've been trying for the past two days and it's just happening for me. I can get a normal Silverlight control to work in both Silverlight 3 and Silverlight 4, but not the phone version. Here are two versions that I've tried: Version 1 - Using Async Pattern BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost/wcf/Authentication.svc"); Wcf.IAuthentication auth1 = new ChannelFactory<Wcf.IAuthentication>(basicHttpBinding, endpointAddress).CreateChannel(endpointAddress); AsyncCallback callback = (result) => { Action<string> write = (str) => { this.Dispatcher.BeginInvoke(delegate { //Display something }); }; try { Wcf.IAuthentication auth = result.AsyncState as Wcf.IAuthentication; Wcf.AuthenticationResponse response = auth.EndLogin(result); write(response.Success.ToString()); } catch (Exception ex) { write(ex.Message); System.Diagnostics.Debug.WriteLine(ex.Message); } }; auth1.BeginLogin("user0", "test0", callback, auth1); This version breaks on this line: Wcf.IAuthentication auth1 = new ChannelFactory<Wcf.IAuthentication>(basicHttpBinding, endpointAddress).CreateChannel(endpointAddress); Throwing System.NotSupportedException. The exception is not very descriptive and the callstack is equally not very helpful: at System.ServiceModel.DiagnosticUtility.ExceptionUtility.BuildMessage(Exception x) at System.ServiceModel.DiagnosticUtility.ExceptionUtility.LogException(Exception x) at System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(Exception e) at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address) at WindowsPhoneApplication2.MainPage.DoLogin() .... Version 2 - Blocking WCF call Here is the version that doesn't use the async pattern. [System.ServiceModel.ServiceContract] public interface IAuthentication { [System.ServiceModel.OperationContract] AuthenticationResponse Login(string user, string password); } public class WcfClientBase<TChannel> : System.ServiceModel.ClientBase<TChannel> where TChannel : class { public WcfClientBase(string name, bool streaming) : base(GetBinding(streaming), GetEndpoint(name)) { ClientCredentials.UserName.UserName = WcfConfig.UserName; ClientCredentials.UserName.Password = WcfConfig.Password; } public WcfClientBase(string name) : this(name, false) {} private static System.ServiceModel.Channels.Binding GetBinding(bool streaming) { System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding(); binding.MaxReceivedMessageSize = 1073741824; if(streaming) { //binding.TransferMode = System.ServiceModel.TransferMode.Streamed; } /*if(XXXURLXXX.StartsWith("https")) { binding.Security.Mode = BasicHttpSecurityMode.Transport; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None; }*/ return binding; } private static System.ServiceModel.EndpointAddress GetEndpoint(string name) { return new System.ServiceModel.EndpointAddress(WcfConfig.Endpoint + name + ".svc"); } protected override TChannel CreateChannel() { throw new System.NotImplementedException(); } } auth.Login("test0", "password0"); This version crashes in System.ServiceModel.ClientBase<TChannel> constructor. The call stack is a bit different: at System.Reflection.MethodInfo.get_ReturnParameter() at System.ServiceModel.Description.ServiceReflector.HasNoDisposableParameters(MethodInfo methodInfo) at System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract) at System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction) at System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescription(Type contractType) at System.ServiceModel.ChannelFactory1.CreateDescription() at System.ServiceModel.ChannelFactory.InitializeEndpoint(Binding binding, EndpointAddress address) at System.ServiceModel.ChannelFactory1..ctor(Binding binding, EndpointAddress remoteAddress) at System.ServiceModel.ClientBase1..ctor(Binding binding, EndpointAddress remoteAddress) at Wcf.WcfClientBase1..ctor(String name, Boolean streaming) at Wcf.WcfClientBase`1..ctor(String name) at Wcf.AuthenticationClient..ctor() at WindowsPhoneApplication2.MainPage.DoLogin() ... Any ideas?

    Read the article

  • How to handle the back button on Windows Phone 7

    - by David_001
    On the windows phone 7 emulator, when the hardware back button is pressed, the default behaviour is for it to close your current application. I want to override this default behaviour so that it navigates to the previous page in my application. After some research, it seems it should be possible to do this by overriding the OnBackKeyPress method, like so: protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { // do some stuff ... // cancel the navigation e.Cancel = true; } However, clicking the back button still closes my application. Putting a breakpoint on the above method reveals that it is never called. I have another breakpoint on my application exit code, and this breakpoint is hit. Is there something else I need to do to intercept the back button?

    Read the article

  • MediaElement.Position behaviour and Windows Phone 7 issue

    - by RoguePlanetoid
    I have a problem, I have written a simple Media Player for Windows Phone 7 and can Play, Stop and control the Volume of a Video (loaded from a URI) however when I try to set the position, this causes the application to freeze. I have used both these lines, but either does not work: Player.Position = new TimeSpan(0, 0, 0, 0, (int)Position.Value); Player.Position = TimeSpan.FromSeconds((int)(Position.Value)); I do have this event handler: void Player_MediaOpened(object sender, RoutedEventArgs e) { Position.Maximum = Player.NaturalDuration.TimeSpan.TotalMilliseconds; } And have tried using the Seconds value, casting to Ints etc, however everytime I try to set the Position, the app freezes. The video otherwise plays normally - anyone know what the problem may be here?

    Read the article

  • What is the difference between Windows RT and Windows Phone 8?

    - by Rakib Ansary
    From what I have read it seems there are more or less three versions(?) of Windows 8: Windows 8, Windows RT, and Windows Phone 8. While the difference between Windows 8 and Windows RT is clear, I don't understand the difference between Windows RT and Windows Phone 8. The Android parallel, Jelly Bean that runs on Tablets and on Phones doesn't have any differences. Are there any differences between Windows RT and Windows Phone 8 except for the fact that one is for Tablets (Windows RT) and the other is for Phones (Windows Phone 8)?

    Read the article

  • After resizing label on tap on tableview cell tableview content order changes iphone sdk

    - by neha
    Hi all, In my application I'm dynamically resizing a label in cell as well as cell when a cell is tapped in uitableview, but after resizing the label in cell, the contents in the tableview are getting shifted means the cells contain different cell content after this tap, whereas this' not the case when I'm tapping the cell and expanding it without expanding the label in it. Can anybody please help? It's urgent. Thanks in advance.

    Read the article

  • How can I take a photo from my camera phone remotely? [closed]

    - by kurt
    Is there any app where I could control the camera of my phone remotely(even bluetooth would do) I have a Nokia 5800 xpress music. The app could either be a stand alone app installed on the mobile phone than could click snaps at predefined intervals or if there is a app that I can install on my PC and then control my phone's camera via bluetooth or wifi or anything else. Is this possible?

    Read the article

  • Populating cell in UITableView with unique items

    - by aahrens
    I have an array of URL Links that I'm trying to load into a Grouped UITableView. The goal being that I have numberOfSectionsInTableView return [url count] so I can have number of sections equal to the number of url links. Then in numberOfRowsInSection returns 1 so I only populate 1 URL for each section. The trouble I'm having is to ensure that cellForRowAtIndexPath won't keep grabbing the first url link. I suspect it's because it's always grabbing the first url because the rowIndex is always zero. Any ideas how to ensure that each cell in my UITableView is populated with a different url link? - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [newsItems count]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"MyIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease]; cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease]; cell.textLabel.lineBreakMode = UILineBreakModeWordWrap; cell.textLabel.numberOfLines = 5; } // Configure the cell. Get the title of the news item that was parsed out int newsItemIndex = [indexPath indexAtPosition: [indexPath length] - 1]; [cell.textLabel setText:[[newsItems objectAtIndex: newsItemIndex] objectForKey: @"link"]]; return cell; }

    Read the article

  • How much does it cost to make a phone?

    - by geoffreyf67
    I was curious if there are any websites that detail how much it costs to make a phone. Not a cell phone but a landline phone. It seems that the ones with any decent features have always cost $100+ and I'd have thought that the price would have dropped over the years but that doesn't seem to be happening. So I figured I'd look into the cost of making the phones. G-Man

    Read the article

  • iPhone: Cell imageViews repeating when loaded from url

    - by araid
    I'm developing a demo RSS reader for iPhone. I obviously have a tableview to display the feeds, and then a detailed view. Some of this feeds have a thumbnail that I want to display on cell.imageview of the table, and some don't. The problem is that when scrolling the table, loaded thumbnails start repeating on other cells, and I end up with a thumbnail on every cell. Here's a piece of my code. I may upload screenshots later - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: @"rssItemCell"]; if(nil == cell){ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"rssItemCell"]autorelease]; } BlogRss *item = [[[self rssParser]rssItems]objectAtIndex:indexPath.row]; cell.textLabel.text = [item title]; cell.detailTextLabel.text = [item description]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; // Thumbnail if exists if(noticia.imagePath != nil){ NSData* imageData; @try { imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:item.imagePath]]; } @catch (NSException * e) { //Some error while downloading data } @finally { item.image = [[UIImage alloc] initWithData:imageData]; [imageData release]; } } if(item.image != nil){ [[cell imageView] setImage:item.image]; } return cell; } Any help will be very appreciated.

    Read the article

  • Background image of table cell

    - by Shuaib
    Hey guys, Trying to set a background image for a table view cell, tried almost everything but failing. Hoping someone would notice what I am doing wrong. Here is how my current code looks like: static NSString *CustomCellIdentifier = @"listCustomCell"; listCustomCell *cell = (listCustomCell *)[tableView dequeueReusableCellWithIdentifier: CustomCellIdentifier]; if (cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"listCustomCell" owner:self options:nil]; for (id oneObject in nib) if ([oneObject isKindOfClass:[listCustomCell class]]) cell = (listCustomCell *)oneObject; } cell.backgroundColor = [UIColor clearColor]; UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"list_selected.png"]]; //[cell setBackgroundView:backgroundImageView]; cell.backgroundView = backgroundImageView; The image won't show up in the background of the cell. All I see is plain white background. Thanks for help.

    Read the article

  • IP Phone over VPN - one way calls unless default route?

    - by dannymcc
    I have come across a strange problem with our VPN and BCM 50 (Nortel/Avaya) phone system. As you can tell by my other questions I have been doing some work on setting a VPN up from one location to another and it's all working well. With one exception. We have an IP phone that is connected at the remote location, straight to a router which has a VPN tunnel to our main practice. The phone works mostly, but every few calls it turns into a one way call. As in, the caller (from the remote phone) can't hear the receiver- but the receiver can hear the caller. This is fixed by setting the VPN tunnel to be the default route for all traffic. The problem with fixing it that way is that all traffic then goes through the tunnel which slows internet access etc. down considerably. The router is set to send the following over the VPN: 192.168.1.0/24 192.168.2.0/24 192.168.4.0/24 The IP of the remote location is: 192.168.3.0/24 The remote router (where the phone is) is a Draytek 2830n, and the local router (at the main practice) is a Draytek 2820. We are using an IPSec tunnel with AES encryption <- as a result of a previous answer pointing to the incompatibility in the hardware encryption. Any advice would be appreciated!

    Read the article

  • Programmatically change an EditorGrid's cell value

    - by Snowright
    Hi, I have an Editor Grid where if a specific cell is in focus (is being edited), a window containing a tree panel pops up allowing the user to choose a node from the treepanel as the new value of the cell. This way, the user isn't actually editing the cell in question, but is using the window to choose the new value. However, I am having difficulties setting the value of the cell in question programmatically. Below is the code I use to set the grid up, including the column model that chooses what editor to use for a cell depending on the value type: var editorCM = new Ext.grid.ColumnModel({ //config ,editors : { //rest of editors 'id' : new Ext.grid.GridEditor(new Ext.form.TextField({readOnly : true})) } ,getCellEditor : function(col, row) { //choose editor depending on the type value of a cell } }) var editorGrid = new Ext.grid.EditorGridPanel({ //rest of config ,cm : editorCM }) Below is my code to change the cell's value once the user chooses from the treepanel. function submitNode(newValue) { var temp = editorGrid.GetSelectionModel().getSelectedCell(); //returns array containing column and row position of selected cell, which value we want to change. //temp[1] = column index, temp[0] = row index //Gets the cell editor at specific position and sets new value for that cell editorGrid.getColumnModel().getCellEditor(temp[1], temp[0]).setValue(newValue); } I've also tried a few other ways (all including setValue(newValue)), but have come up empty handed. I've looked through the API and the ExtJS forums for any clue but have also come up empty handed.

    Read the article

  • How do I remove the time from printpreview dialog?

    - by Albo Best
    Here is my code: Imports System.Data.OleDb Imports System.Drawing.Printing Namespace Print Public Class Form1 Inherits System.Windows.Forms.Form Dim PrintC As PrinterClass Dim conn As OleDb.OleDbConnection Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\db1.mdb" Dim sql As String = String.Empty Dim ds As DataSet Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FillDataGrid() '//create printerclass object PrintC = New PrinterClass(PrintDocument1, dataGrid) End Sub Private Sub FillDataGrid() Try Dim dt As New DataTable Dim ds As New DataSet ds.Tables.Add(dt) Dim da As New OleDbDataAdapter con.Open() da = New OleDbDataAdapter("SELECT * from klient ", con) da.Fill(dt) con.Close() dataGrid.DataSource = dt.DefaultView Dim dTable As DataTable For Each dTable In ds.Tables Dim dgStyle As DataGridTableStyle = New DataGridTableStyle dgStyle.MappingName = dTable.TableName dataGrid.TableStyles.Add(dgStyle) Next ' DataGrid settings dataGrid.CaptionText = "TE GJITHE KLIENTET" dataGrid.HeaderFont = New Font("Verdana", 12) dataGrid.TableStyles(0).GridColumnStyles(0).Width = 60 dataGrid.TableStyles(0).GridColumnStyles(1).Width = 140 dataGrid.TableStyles(0).GridColumnStyles(2).Width = 140 dataGrid.TableStyles(0).GridColumnStyles(3).Width = 140 dataGrid.TableStyles(0).GridColumnStyles(4).Width = 140 dataGrid.TableStyles(0).GridColumnStyles(5).HeaderText = "" dataGrid.TableStyles(0).GridColumnStyles(5).Width = -1 Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click 'create printerclass object PrintC = New PrinterClass(PrintDocument1, dataGrid) PrintDocument1.Print() End Sub Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click 'create printerclass object PrintC = New PrinterClass(PrintDocument1, dataGrid) ''preview Dim ps As New PaperSize("A4", 840, 1150) ps.PaperName = PaperKind.A4 PrintDocument1.DefaultPageSettings.PaperSize = ps PrintPreviewDialog1.WindowState = FormWindowState.Normal PrintPreviewDialog1.StartPosition = FormStartPosition.CenterScreen PrintPreviewDialog1.ClientSize = New Size(600, 600) PrintPreviewDialog1.ShowDialog() End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 'print grid Dim morepages As Boolean = PrintC.Print(e.Graphics) If (morepages) Then e.HasMorePages = True End If End Sub End Class End Namespace This is how data looks in DataGrid (that's perfect)... and here is how it looks when I click PrintPreview. (I don't want the time to appear there, the "12:00:00" part. in database the date is stored as Short Date (10-Dec-12) Can somebody suggest a way around that? Imports System Imports System.Windows.Forms Imports System.Drawing Imports System.Drawing.Printing Imports System.Collections Imports System.Data Namespace Print Public Class PrinterClass '//clone of Datagrid Dim PrintGrid As Grid '//printdocument for initial printer settings Private PrintDoc As PrintDocument '//defines whether the grid is ordered right to left Private bRightToLeft As Boolean '//Current Top Private CurrentY As Single = 0 '//Current Left Private CurrentX As Single = 0 '//CurrentRow to print Private CurrentRow As Integer = 0 '//Page Counter Public PageCounter As Integer = 0 '/// <summary> '/// Constructor Class '/// </summary> '/// <param name="pdocument"></param> '/// <param name="dgrid"></param> Public Sub New(ByVal pdocument As PrintDocument, ByVal dgrid As DataGrid) 'MyBase.new() PrintGrid = New Grid(dgrid) PrintDoc = pdocument '//The grid columns are right to left bRightToLeft = dgrid.RightToLeft = RightToLeft.Yes '//init CurrentX and CurrentY CurrentY = pdocument.DefaultPageSettings.Margins.Top CurrentX = pdocument.DefaultPageSettings.Margins.Left End Sub Public Function Print(ByVal g As Graphics, ByRef currentX As Single, ByRef currentY As Single) As Boolean '//use predefined area currentX = currentX currentY = currentY PrintHeaders(g) Dim Morepages As Boolean = PrintDataGrid(g) currentY = currentY currentX = currentX Return Morepages End Function Public Function Print(ByVal g As Graphics) As Boolean CurrentX = PrintDoc.DefaultPageSettings.Margins.Left CurrentY = PrintDoc.DefaultPageSettings.Margins.Top PrintHeaders(g) Return PrintDataGrid(g) End Function '/// <summary> '/// Print the Grid Headers '/// </summary> '/// <param name="g"></param> Private Sub PrintHeaders(ByVal g As Graphics) Dim sf As StringFormat = New StringFormat '//if we want to print the grid right to left If (bRightToLeft) Then CurrentX = PrintDoc.DefaultPageSettings.PaperSize.Width - PrintDoc.DefaultPageSettings.Margins.Right sf.FormatFlags = StringFormatFlags.DirectionRightToLeft Else CurrentX = PrintDoc.DefaultPageSettings.Margins.Left End If Dim i As Integer For i = 0 To PrintGrid.Columns - 1 '//set header alignment Select Case (CType(PrintGrid.Headers.GetValue(i), Header).Alignment) Case HorizontalAlignment.Left 'left sf.Alignment = StringAlignment.Near Case HorizontalAlignment.Center sf.Alignment = StringAlignment.Center Case HorizontalAlignment.Right sf.Alignment = StringAlignment.Far End Select '//advance X according to order If (bRightToLeft) Then '//draw the cell bounds (lines) and back color g.FillRectangle(New SolidBrush(PrintGrid.HeaderBackColor), CurrentX - PrintGrid.Headers(i).Width, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height) g.DrawRectangle(New Pen(PrintGrid.LineColor), CurrentX - PrintGrid.Headers(i).Width, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height) '//draw the cell text g.DrawString(PrintGrid.Headers(i).CText, PrintGrid.Headers(i).Font, New SolidBrush(PrintGrid.HeaderForeColor), New RectangleF(CurrentX - PrintGrid.Headers(i).Width, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height), sf) '//next cell CurrentX -= PrintGrid.Headers(i).Width Else '//draw the cell bounds (lines) and back color g.FillRectangle(New SolidBrush(PrintGrid.HeaderBackColor), CurrentX, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height) g.DrawRectangle(New Pen(PrintGrid.LineColor), CurrentX, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height) '//draw the cell text g.DrawString(PrintGrid.Headers(i).CText, PrintGrid.Headers(i).Font, New SolidBrush(PrintGrid.HeaderForeColor), New RectangleF(CurrentX, CurrentY, PrintGrid.Headers(i).Width, PrintGrid.Headers(i).Height), sf) '//next cell CurrentX += PrintGrid.Headers(i).Width End If Next '//reset to beginning If (bRightToLeft) Then '//right align CurrentX = PrintDoc.DefaultPageSettings.PaperSize.Width - PrintDoc.DefaultPageSettings.Margins.Right Else '//left align CurrentX = PrintDoc.DefaultPageSettings.Margins.Left End If '//advance to next row CurrentY = CurrentY + CType(PrintGrid.Headers.GetValue(0), Header).Height End Sub Private Function PrintDataGrid(ByVal g As Graphics) As Boolean Dim sf As StringFormat = New StringFormat PageCounter = PageCounter + 1 '//if we want to print the grid right to left If (bRightToLeft) Then CurrentX = PrintDoc.DefaultPageSettings.PaperSize.Width - PrintDoc.DefaultPageSettings.Margins.Right sf.FormatFlags = StringFormatFlags.DirectionRightToLeft Else CurrentX = PrintDoc.DefaultPageSettings.Margins.Left End If Dim i As Integer For i = CurrentRow To PrintGrid.Rows - 1 Dim j As Integer For j = 0 To PrintGrid.Columns - 1 '//set cell alignment Select Case (PrintGrid.Cell(i, j).Alignment) '//left Case HorizontalAlignment.Left sf.Alignment = StringAlignment.Near Case HorizontalAlignment.Center sf.Alignment = StringAlignment.Center '//right Case HorizontalAlignment.Right sf.Alignment = StringAlignment.Far End Select '//advance X according to order If (bRightToLeft) Then '//draw the cell bounds (lines) and back color g.FillRectangle(New SolidBrush(PrintGrid.BackColor), CurrentX - PrintGrid.Cell(i, j).Width, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height) g.DrawRectangle(New Pen(PrintGrid.LineColor), CurrentX - PrintGrid.Cell(i, j).Width, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height) '//draw the cell text g.DrawString(PrintGrid.Cell(i, j).CText, PrintGrid.Cell(i, j).Font, New SolidBrush(PrintGrid.ForeColor), New RectangleF(CurrentX - PrintGrid.Cell(i, j).Width, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height), sf) '//next cell CurrentX -= PrintGrid.Cell(i, j).Width Else '//draw the cell bounds (lines) and back color g.FillRectangle(New SolidBrush(PrintGrid.BackColor), CurrentX, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height) g.DrawRectangle(New Pen(PrintGrid.LineColor), CurrentX, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height) '//draw the cell text '//Draw text by alignment g.DrawString(PrintGrid.Cell(i, j).CText, PrintGrid.Cell(i, j).Font, New SolidBrush(PrintGrid.ForeColor), New RectangleF(CurrentX, CurrentY, PrintGrid.Cell(i, j).Width, PrintGrid.Cell(i, j).Height), sf) '//next cell CurrentX += PrintGrid.Cell(i, j).Width End If Next '//reset to beginning If (bRightToLeft) Then '//right align CurrentX = PrintDoc.DefaultPageSettings.PaperSize.Width - PrintDoc.DefaultPageSettings.Margins.Right Else '//left align CurrentX = PrintDoc.DefaultPageSettings.Margins.Left End If '//advance to next row CurrentY += PrintGrid.Cell(i, 0).Height CurrentRow += 1 '//if we are beyond the page margin (bottom) then we need another page, '//return true If (CurrentY > PrintDoc.DefaultPageSettings.PaperSize.Height - PrintDoc.DefaultPageSettings.Margins.Bottom) Then Return True End If Next Return False End Function End Class End Namespace

    Read the article

  • Windows Phone and Silverlight ListBox.ItemTemplate

    - by user551308
    Hi, I have a Windows Phone 7 application with the following listbox and every item contains 2 textblocks and a HyperlinkButton. <ListBox.ItemTemplate> In the ViewModel constructor I have the following code: GetCommand = new RelayCommand(() ={some code}); where GetCommand is a property : public RelayCommand GetCommand { get; private set; } My problem is that GetCommand = new RelayCommand(() ={some code}); is not executing when I press the button. I must say that if dont place the HyperlinkButton insise the itemTemplate, everything works fine. I use the Galasoft mvvm light tookit - http://www.galasoft.ch/mvvm/getstarted/ I appreciate any help.

    Read the article

  • Control margins of an automatically generated content presenter in Windows Phone Panorama Control

    - by Maxim V. Pavlov
    I am building an MVVM Panorama Windows Phone 7 application. At some point of Panorama Item's layout I get a bottom margin of a panorama header box, that moves my content too far down. Is there a way I can set a bottom margin of a ContentPresenter, that is generated to hold the controls, defined in the Panorama.HeaderTemplate? Here is my layout list in Silverlight Spy: In case the screen shot is not readable, here is a large version: http://bit.ly/rBvNp8 Something generates a 26 points bottom margin for a header box (probably the control's code, that handles a layout). How can I control this value? I need it to be set to 0.

    Read the article

  • Suddenly Facebook API stopped working on Windows Phone

    - by Juan Diego
    My code hasn't changed, it was working yesterday or so. I can oauth, get the token but then doing the following: WebClient wc = new WebClient(); wc.DownloadStringCompleted += result; wc.DownloadStringAsync(new Uri("https://graph.facebook.com/me&access_token=xxxTOKENxxx", UriKind.Absolute)); Returns a NotFound WebClient exception: "The remote server returned an error: NotFound." Strange thing is that when pasting that same url on Chrome or IE it does work(PC). Tried on Emulator and on 2 different real WP devices, even pasting the same url on the WP browser. Feels like facebook is rejecting Windows Phone for some reason? Anyone has an idea of what might be happening?

    Read the article

  • Windows Phone 7 HttpRequest Unable to see true Error Code and response details

    - by Bob
    I have to call a somewhat broken API from a Windows Phone 7 application. The API returns a 302 error and a cookie to the authentication request. I've tried every way I've been able to find in the MSDN documentation for using ClientHTTP instead of BrowserHTTP (registering the prefix, using the call to explicitly create a ClientHTTP using Request), but the 302 is getting translated to a 404 and I'm not seeing the cookies on the response. I've tried a WebClient, I've tried an HttpRequest and it is always the translated error message. If I allocate a CookieContainer for the HttpRequest, I get a null argument exception when the client stack is parsing the returned message. I can see that the response is coming back as expected via Fiddler.

    Read the article

  • Timer applications running under lock on Windows Phone 7

    - by cpedros
    Under the current Windows Phone 7 Application Certification Requirements (pdf) applications running under lock must "stop any ... active timers" (section 6.3.1). However looking out on Marketplace there are a number of timer/stopwatch apps claiming to run under lock and also allow lock to be disabled in their settings. How are these apps certified or is there some loosening on the restrictions by Microsoft if the app allows the user to make that decision? Also some of these apps also suggest they continue even when the app is exited or when the device off. Is it the case that they are not truly running under these circumstances, i.e. the timers either start where they left off when reactivated, or perhaps use the OS time to work out the time elapsed between tombstoning and reactivation? In these circumstance I also presume it is not possible for the app to notify the user when the timer completes?

    Read the article

  • Formating phone numbers

    - by Sven
    Our customers often fill out "incorrect" formated phone-numbers. Do anyone know if there is any lib or standard to convert numbers into a more international style? This is a Swedish example but we have customers around the globe and i don't what to manually handle implementations for everyone. input often is like this: 0555 11122 and the wanted result is something like this: +46(0)555-11122 I can do the formating myself but different countries have different variations and systems so a C/Java/C# lib or a standard method to handle this would be great.

    Read the article

  • Windows Phone 7 Application + WCF + SSL + Username Authentication

    - by s7orm
    Hello, I have developed a test service with WCF, which I try to consume from a Windows Phone 7 Application, however when calling a method from the service I get a weird exception: There was no endpoint listening at https://server/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. The WCF service uses a custom binding with UserNameOverTransport authentication and SSL. For the authorization I am using an implementation of the UserNamePasswordValidator. If I try to consume the service from a console or silverlight application (cross domain policy is enabled) - it works fine (authorization as well). And the most weird thing is that the ServiceReferences.ClientConfig file generated for the WP7 App is exactly the same as the config file generated for the silverlight application. I have no idea what is wrong with my service...

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >