|
I use ExcelLibrary which can be downloaded from Google code
License is GNU LGPL.
|
|
|
|
|
Hi This is Chandra,
working on the google maps in Asp.net with C#.At present i can able to bind the Langitude and latitude from database to Google maps based on selection of country.But, my problem is i want to bind the Sales data information along with Latitude and longitude pushpin.Is it possible? Can any one give me some suggestion on this to implements.
My table Data is looks like in the below format
Country Latitude Longitude Sales
England 51.479117 -3.178 33.32
England 51.478705 -3.177831 33.32
Thanks
Chandrkanth
|
|
|
|
|
Hi all! I had a solution to the problem i faced in my previous post below by calling Series.AddXY(). It worked. However, some of the x-axis labels are missing because of space.
Is there any way I can change the orientation of labels so that they become vertical or diagonally oriented as Excel does it? A lot of the labels have not been shown with the current solution with the labels being horizontal. Thanks.
|
|
|
|
|
Are you using a custom graph library, or is it one you've created yourself?
|
|
|
|
|
I'm using the chart library that comes with .Net Framework 4.0 in the
'System.Windows.Forms.DataVisualization.Charting' namespace.
|
|
|
|
|
This[^] might help you out then.
|
|
|
|
|
Hi everyone! I'm creating a line chart using .net framework 4. I'm a able to add points to the series which are used on the vertical axis. However, numbers are automatically assigned to the x-axis for each marker.
How do I change the numbering into my own values? The labels for the x-axis are string values and not numbers. Thanks.
modified 3-Jul-12 10:28am.
|
|
|
|
|
Hi All (especially Pete O'Hanlon),
I have now found the driver I think I am looking for the " KernelDriver,FTDIBUS,USB Serial Converter Driver" I can now check for this driver find it using the code:
ServiceController[] scDevices = ServiceController.GetDevices();
MessageBox.Show("Device driver services on the local computer");
foreach (ServiceController scTemp in scDevices)
{
lstDrivers.Items.Add(scTemp.ServiceType + "," + scTemp.ServiceName +
"," + scTemp.DisplayName);
}
I think if I can check the value of this it will do.
Pete O'Hanlon gave me some code in a question called "Correct way of doing installers"
using a Dictionary command, in copying this and trying to use it, I have obviously lost something / not understood something as the red wiggly line for syntax errors appear in System.Management. commands, I am using VS 2008 (.NET 3.5) and using System.Management only give one . option Instrumentation(?). Should I be using a Build option I have not seen before. So really the question is if I can't do it from here how can I get Petes example to work in VS 2008?
Glenn
modified 3-Jul-12 7:51am.
|
|
|
|
|
ServiceController exists in System.ServiceProcess. You need to add a reference to that.
[Edit]It's worth noting that your code is different to the example I gave, so your question doesn't make much sense if someone just reads what you've put (as I just did). This[^] is the original thread.
|
|
|
|
|
I do have that full list below (I am using 2008, .NET3.5) also
System.Management.SelectQuery query = new System.Management.SelectQuery("Win32_SystemDriver");
should get around that
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Management;
using System.ServiceProcess;
I take it the method I created will only get the name rather than anything useful. The dictionary method, I have not used much (you are only using a get method no set!) could you point me in the direction of a reasonable tutorial. A few minute job is taking so long!
Glenn
|
|
|
|
|
Have you added a reference to System.Management? It sounds like you accidentally added a reference to System.Management.Instrumentation instead.
|
|
|
|
|
Yup!
is only there as I was looking for what else was there (being nosey!) I do have
using System.Management; and
using System.ServiceProcess; any ideas.....
|
|
|
|
|
That's not what I meant by adding a reference. Right click on your project and choose Add Reference... . Scroll through the list of available .NET references and add System.Management (and System.ServiceProcess if you need it).
|
|
|
|
|
Ahh, right okay, sorry about that (too many other things, phone calls etc. got distracted from what I was (trying) to do!) the red wiggly lines have gone, been replaced by blue
on the
System.Management.ManagementObject manageObject = searcher.Get();
and the additions to the list box "driver"
driver.Add("PathName", manageObject["PathName"]);
Sorry, again I have missed something!
Glenn
|
|
|
|
|
Change the method to this:
public static Dictionary<string, string> GetDriverInfo(string driverName)
{
Dictionary<string, string> driver = new Dictionary<string, string>();
System.Management.SelectQuery query = new System.Management.SelectQuery("Win32_SystemDriver");
query.Condition = string.Format("Name='{0}'", driverName);
System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(query);
foreach (System.Management.ManagementObject manageObject in searcher.Get())
{
driver.Add("PathName", manageObject["PathName"].ToString());
driver.Add("Description", manageObject["Description"].ToString());
driver.Add("State", manageObject["State"].ToString());
driver.Add("StartMode", manageObject["StartMode"].ToString());
}
return driver;
} That should do it.
|
|
|
|
|
Yayy!! the wiggly lines have gone, cue the happy dance!
(seriously) Thanks Alot!
Glenn
|
|
|
|
|
You're welcome. This is what I get when I just type code samples into the CP Message box with the famous battle cry of "this should work".
|
|
|
|
|
I now need to use the Dictionary created how can I upload the list and then search it,
if follow the reckoning I have used before would give:
driver.Add(manageObject["PathName"].ToString(),"Description",manageObject["Description"].ToString(),"State", manageObject["State"].ToString()+"StartMode",ManageObject["StartMode"].ToString());
As I in the past have done with a Dictionary
Dictionary.Add("01010", "Glenn"); and this is read out using
Console.WriteLine("myDictionary[\"01010\"]:{0}",Dictonary["01010"]);
only done it at the console!
Glenn (sorry)
modified 3-Jul-12 11:40am.
|
|
|
|
|
Right - now I'm assuming that you are using the Visual Studio installer in this example. What you do is create a custom installer step (like this[^]) and add your logic in there. Have a look here[^] for further details.
|
|
|
|
|
|
Umm, it will be caught up in an installer once it's all working, however now I would like a method of finding out about the drivers with out having to run an installer (I can see a use for it not connected to this project!)
Glenn
|
|
|
|
|
Thanks for that still learning the correct (CP) way of doing things.
Glenn
|
|
|
|
|
Hi All
I've got some problems with converting readed text from *.doc file. I'm using this code:
FileStream fs = null;
fs = new FileStream(plik.ToString(), FileMode.Open);
byte[] example = new byte[fs.Length];
fs.Read(example, 0, example.Length);
string outtext = "";
int count = 0;
for (int i = 2560; i < example.Length; i++)
{
if (example[i] == 0)
{
break;
}
count++;
}
BinaryReader br = new BinaryReader(fs, Encoding.GetEncoding(1250));
br.BaseStream.Position = 2560;
byte[] newarr = br.ReadBytes(count);
outtext = System.Text.UTF8Encoding.UTF8.GetString(newarr);
string str = "";
for (int i = 0; i < outtext.Length; i++)
{
if ((outtext[i] >= '!' && outtext[i] <= '~') || (outtext[i] == ' ') || (outtext[i] == '\r'))
{
str += outtext[i];
}
}
fs.Close();
tekst = str;
It works great till I try to read file with polish symbols (ISO-8859-2). I try'ed to convert it to ISO-8859-2 but it is not working propertly.
Could anybody help me with this problem?
|
|
|
|
|
"Windows-1250 is similar to ISO-8859-2 and has all the printable characters it has and more. However a few of them are rearranged (unlike Windows-1252, which keeps all printable characters from ISO-8859-1 in the same place). Most of the rearrangements seem to have been done to keep characters shared with Windows-1252 in the same place as in Windows-1252 but three of the characters moved (Ą,Ľ,ź) cannot be explained this way."
I'd suggest you use "ISO-8859-2" as your encoding to read the file, not Windows-1250.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|