|
I had windows service and setup projects developed in VS 2008 .NET 3.5.
Setup was converted to VS 2010 and windows service project replaced with new one created in VS 2010 .NET 4.0.
There are custom actions in setup to install service in the system.
The Error 1001 System.BadImageFormatException failed to load service exe due to incorrect format appears during setup execution.
Without custom action the setup runs without problems. I can also manually install the service with installutil.exe
Are there any settings in the setup project to run correct installutil from the right .NET version?
Чесноков
|
|
|
|
|
Hi All,
I am writing text into StreamWriter by sw.Write("Text coming from Labels : so can be in english or chinese or any other languages") method.
After writing first text, I am adding tabs and then adding second text.
Now adding a new line and adding first text + tabs + second text.
It looks like this:
Model :\t \t \t \t \t XXXX
Version :\t \t \t \t YYYY
Note : I am not able to put white spaces here so just putted \t.
Assume that the first X and first Y starting position is equal.
Alignment is coming properly for English.
But if the input texts are in Chinese then it comes like this :
Model :\t \t \t \t \t XXXX
Version :\t \t \t \t YYYY
Here YYYY is not coming just below XXXX such that the start position of first X and first Y should be same,
This Tab spaces are the same for different languages.
I want atleast alignment should be proper with every languages.
Thanks in Advance..
Piyush Vaishnav
|
|
|
|
|
a text file contains text, not formatting. the only way to give it some columnar layout without using a command language, is by inserting the right number of spaces and using a non-proportional (i.e. monospaced) font, such as Courier New. I expect there isn't a non-proportional font for Chinese.
Using tabs to replace spaces could work also, there may be some issues. And it is a first step towards a command language. Real command languages would be HTML, RTF, PostScript, etc.
In summary, there is no general solution IMO.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Much as Luc said, your choices are either to use delimiters (or markup), or to go to fixed-width columns.
You can use string.PadLeft or .PadRight to achieve columns, but you'll need to know the maximum length possible in each column (or truncate longer data).
It's not good to try to store your formatting in with your data, I would recommend delimited text or finding a solution via XML and finally using something to generate your display (rather than relying intrinsically on the stored data).
Cheers.
|
|
|
|
|
Hi,
Now I used string.PadRight(40, ' ') for the first text and then after adding second text.
It's working fine for english.
But for Chinese still second text is not coming below the First Row's second text.
|
|
|
|
|
Are you adding the required line breaks? If you reveal a bit of your code it might help others solve the problem.
As previously stated, you're going to have a hard time finding a balance of content and format. Once, there was this whole thing about HTML and CSS, and then, this other time, XML and XSL/T...
|
|
|
|
|
Hi!
I started a development of a application (in Windows Mobile 6) and now i have a little problem:
My datasource have 11.000~12.000 registers and when I bind it to my ListBox, this action spend 6 seconds (I think its a lot) and now I want to reduce that time.
Anyone now a way to do this?
Some code to exemplify my situation:
SQLiteConnection cnn = openCon();
string SQL = "select cod, desc from produtcs";
SQLiteDataReader sDR;
List<MyObj> data = new List<MyObj>();
cnn.Open();
SQLiteCommand sCommand = new SQLiteCommand(SQL, cnn);
sDR = sCommand.ExecuteReader();
while (sDR.Read())
{
data.Add(new MyObj(sDR["cod"].ToString(), sDR["desc"].ToString()));
}
listBox1.DataSource = data;
I need populate MyObj after, cuz this I use the variable "data"
class MyObj
{
public MyObj(int p1, string p2){ ... }
private int cod;
private string desc;
private string ...
private int ...
}
[]'s
Eder Sá
[]'s
|
|
|
|
|
Eder Sa wrote: Anyone know a way to do this?
First place to start would be asking in the correct forum. See Mobile[^]
Reduce the amount of data you are trying to display. Users are not going to scroll through 12,000 items, particularly on a mobile device.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My first post and my first mistake.
I need to load all the data, because when the user types some letters in a filter, the focus moves in the list, searching for the first ocorrence (I use a binary search, but modified and it works fine!)
I can move the topic to Mobile Forum?
[]'s
|
|
|
|
|
It's too late to move the post now.
Populate the list after you have filtered the data.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Eder Sa wrote: <layer>I need to load all the data, because
How many entries will the user see when typing? Fetch the top 20 and display that until the user hits enter - and page the rest. Google wouldn't be very efficient if it had to send you all it's search-results and let your browser filter it.
Imagine that, with IE4.
I are Troll
|
|
|
|
|
I implemented your suggestion and like the result.
I need to do some more tests and I back later with feedback.
Thx!
[]'s
|
|
|
|
|
Cool - you're welcome
|
|
|
|
|
Bad news
I tried use the suggested method and the result of the test in a device (HTC Touch2) is a desaster!
The device spend much time running SQLs when I use "like" (about 1~2 seconds).
If the user type 100 characters, the total time of the operations is about 100~200 seconds. (not a good result)
I did more tests in the device, and the results are worst. Look:
SQLiteConnection cnn = openCon();
string SQL = "select cod, desc from produtcs";
SQLiteDataReader sDR;
List<MyObj> data = new List<MyObj>();
cnn.Open();
SQLiteCommand sCommand = new SQLiteCommand(SQL, cnn);
sDR = sCommand.ExecuteReader();
while (sDR.Read())
{
data.Add(new MyObj(Convert.ToInt32(sDR["cod"].ToString()), sDR["desc"].ToString()));
}
listBox1.DataSource = data;
dataGrid1.DataSource = data;
Now I'll try make it without use a List<> and insert direclty in a listBox.
At the moment the best solution.
I post my feedback later.
[]'s
Eder Sá
|
|
|
|
|
The trick is to load the 12K items into an in-memory data structure, and filter on that, rather than using the Like operator against the database.
|
|
|
|
|
Peter, I already trying do this, but i need improve the load of that 12k items.
I already tried serialize and save the data in a file and load the file into the
datasource, but the result are not good too.
After loaded in memory my data, I use a filter with BinarySearch (modified) and works great.
Thx for replys guys
[]'s
Eder Sá
|
|
|
|
|
This is similar to an issue I faced on mobile data terminals (MDTs) a while back. Rather than storing the data in the database, we used a series of indexed files which could quickly be read and parsed at runtime. This meant that the amount of data we held in memory at any one time was minimal, and the processing was extremely rapid.
|
|
|
|
|
Is the Sqlite-database located on your HTC? If so, try measuring the load-speed of a textfile to determine whether it can handle your required minimumspeed.
I'd be using the GetValues method of the datareader to get an array of objects. Won't be a wowing-difference though. There should also be a SuspendLayout method on your dataGrid control.
I are Troll
|
|
|
|
|
Hi,
Use thread to load and fill the data that will make your application responsive while the data is loading. Using thread in your application is not big deal but you have to take care about thread synchronization in your code.
hope this helps.
Nitheesh George
http://www.simpletools.co.in
|
|
|
|
|
This still doesn't help him lower the 6 seconds or so that he's loading the data.
|
|
|
|
|
I have problem when I am try to send byte to serial port.
for example
int x=153;
when i get the hexa decimal of 153 it's 99
but when I am try to send it , it appear as 3F but I want it to be 99 as hexa decimal
|
|
|
|
|
Honeyboy_20 wrote: I have problem when I am try to send byte to serial port. for example int x=153; when i get the hexa decimal of 153 it's 99 but when I am try to send it , it appear as 3F but I want it to be 99 as hexa decimal
There is more text than information here. It needs dissecting.
Honeyboy_20 wrote: I have problem when I am try to send byte to serial port.
that is not a question. And neither is the rest of your message. So I will ask some questions you can think about.
Honeyboy_20 wrote: int x=153;
why would you need an int if you want to send a byte. How about declaring a byte instead?
Honeyboy_20 wrote: when i get the hexa decimal of 153 it's 99
why would you need hex at all? how is that relevant? you can send bytes through a serial port, no matter what values they contain or whatever they represent.
Honeyboy_20 wrote: but when I am try to send it , it appear as 3F
that is a bit of a surprise. there must be some magical code involved here. I have a rough idea how one could do it, but hey, I trust your code is much better than that.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
An excellent analysis; have a 5.
I must get a clever new signature for 2011.
|
|
|
|
|
Thank you kindly sir.
I can hardly wait for the next episode.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I do agree with Luc Pattyn in that sending 153 or 0x99 doesn't make any difference. It's just a matter of output formatting.
Maybe there is some decimal-to-hex formatting code in your program, which I believe you don't need at all.
The reason for me to suspect that are the following equations:
153 = 0x99
99 = 0x63
63 = 0x3F So there is a connection between the numerical values you mentioned.
Ciao,
luker
|
|
|
|