Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Anka_Ame

@Anka_Ame
About
Posts
48
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Picture box and drawing
    A Anka_Ame

    I am using a picture box to display a number of points on the screen. My problem is that I dont know how to resize the picture so I can see the points on all the picture box and not only in one part of the picture box.

    C# graphics help tutorial

  • Help with the run an executable program of a number of times
    A Anka_Ame

    I am already using Process class to run the executable program. The output files are created by the arguments given to the executable program. I tried to give a different name to the output each time. I am runing the program with the help of a cycle. And the input changes name in each cycle and the output the same. But the only thing it's saved it is the last output. How can I solve this?

    C# question csharp help

  • Help with the run an executable program of a number of times
    A Anka_Ame

    I need to run an executable program from a C# program and I need to run the program of a a number of times and I have to save the output each time. I tried something but it saves my only the last output. How can I do it?

    C# question csharp help

  • Write a character with a text writter
    A Anka_Ame

    I have a stupid problem. I dont know how to write the character " into a text writter. Can you help me?

    C# help tutorial question

  • DataSet and Relation between Tables
    A Anka_Ame

    I read a Xml file and I show it on a Windows Form. The problem is that the Xml file has a relationship between two tables named "Clusters_ClusterRoute", but I dont know how can I show this relation on the Windows Form. Can you help me?

    C# help question xml

  • Table in Window Form
    A Anka_Ame

    How can I build a table on a Windows Form?

    Windows Forms question

  • Windows Form Table
    A Anka_Ame

    How can I build a windows form which contains a table?

    C# question

  • Writing in a Xml
    A Anka_Ame

    I want to write in a Xml file some data, but I have an error because I have the same attribute "ClusterRoute" who appears many times. XmlTextWriter myXmlTextWriter = new XmlTextWriter(@"c:\\Results.xml", Encoding.UTF8); myXmlTextWriter.WriteStartDocument(); for (int i = 0; i < clustersList.Count; i++) { myXmlTextWriter.WriteStartElement("Clusters"); for (int j = 0; j < clustersList[i].Count; j++) { myXmlTextWriter.WriteAttributeString("ClusterRoute", clustersList[i][j].CityID.ToString()); } myXmlTextWriter.WriteEndElement(); } myXmlTextWriter.WriteEndDocument();

    C# xml help

  • Time conversion
    A Anka_Ame

    that's not my problem. I just want to read the value from a Xml file and to convert it to time, in a string without date.

    C# help

  • Time conversion
    A Anka_Ame

    this is the function which reads the Xml File and is part of a class Cities. public class Cities : List { public void OpenCityList(string filename) { DataSet cityDS = new DataSet(); try { this.Clear(); cityDS.ReadXml(filename); DataRowCollection cities = cityDS.Tables[0].Rows; foreach (DataRow city in cities) { this.Add(new City(Convert.ToInt32(city["X"], CultureInfo.CurrentCulture), Convert.ToInt32(city["Y"], CultureInfo.CurrentCulture), Convert.ToInt32(city["Demand"], CultureInfo.CurrentCulture), Convert.ToString(city["Open"], CultureInfo.CurrentCulture))); } } finally { cityDS.Dispose(); } } private TimeSpan startHour; public TimeSpan StartHour { set { startHour = value; } get { return startHour; } } public void ShowCityHour() { foreach (City cityhour in this) { startHour = cityhour.OpenTime; } } } And in another class, named City I have : public class City { private int demand; private TimeSpan openTime; public City(int x, int y, int citydemand, string open)// I am interested about the string open { Location = new Point(x, y); demand = citydemand; DateTime oTime = DateTime.Parse(open); TimeSpan openTime = oTime.TimeOfDay; } public TimeSpan OpenTime { get { return openTime; } set { openTime = value; } } } It is something like that. I take the data from the Xml file and I store it in the string open, and I want to convert it to time, because after that I will have to sort the whole list in order of the hours.

    C# help

  • Time conversion
    A Anka_Ame

    Thanks for trying to help me, but I dont want to make that. I want only to show the hour I read it from the Xml file. That's the problem, because I tried it and it shows something like 00:00, and not 07:30, like it should.

    C# help

  • Time conversion
    A Anka_Ame

    I read a Xml file and from it I will have a string, for example the string name is open="07:30". I tried to read it like this DateTime oTime = DateTime.Parse(open); TimeSpan openTime = oTime.TimeOfDay; where openTime is of type TimeSpan. But the result is 00:00:00 and it doesnt work.

    C# help

  • Time conversion
    A Anka_Ame

    The problem is that I will take the string from a Xml file and I cant use it like that. I really need help.

    C# help

  • Time conversion
    A Anka_Ame

    But if my string is like this "07:30", what can I do? Because I tried that method and my result is 00:00:00. :doh:

    C# help

  • Time conversion
    A Anka_Ame

    Hi, I have a problem with the conversion of a string of type "07:30" into a time. I want to take only the time, without the date. I tried DateTime openTime = DateTime.Now.ToShortTimeString(open); ,where open = "07:30". Please help me with this problem.

    C# help

  • Convert a list element
    A Anka_Ame

    Can someone help me telling me how can I convert a element of a list to int?

    C# question help

  • Time
    A Anka_Ame

    How can I convert a value taken from a Xml file into a time value? Please help.

    C# question xml help

  • resize of image draw
    A Anka_Ame

    How can I make that my drawing should be always starting from the center? I mean that I want to see the whole drawing even if the window will resize. Please help.:sigh:

    C# question graphics help

  • Help textbox
    A Anka_Ame

    :) It's working to save it only like text. Thanks a lot.

    Windows Forms help

  • Help textbox
    A Anka_Ame

    private: System::Void saveToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { SaveFileDialog^ sfd = gcnew SaveFileDialog(); sfd->InitialDirectory = "c:\\"; sfd->FilterIndex =2; sfd->Filter = "TSP Files (*.tsp)|*.tsp|All files (*.*)|*.*|XML Files (*.xml)|*.xml|RTF Files (*.rtf)|*.rtf"; sfd->Title = "Save"; sfd->RestoreDirectory = true; if (sfd->ShowDialog() == System::Windows::Forms::DialogResult::OK) { filename = sfd->FileName; if ((myStream = sfd->OpenFile()) != nullptr) { RichTextBox^ rich = gcnew RichTextBox(); try { String^ strExt; strExt = System::IO::Path::GetExtension(filename); strExt = strExt->ToUpper(); if (strExt == ".RTF") { rich->SaveFile(filename); myStream->Close(); } else { StreamWriter^ txtWriter; txtWriter = gcnew System::IO::StreamWriter(filename); txtWriter->Write(textOutput->Text); txtWriter = nullptr; textOutput->SelectionStart=0; textOutput->SelectionLength=0; txtWriter->Close(); myStream->Close(); } filename = sfd->FileName; this->Text = "Editor: " + filename->ToString(); MessageBox::Show(filename->ToString() + " saved.", "File Save"); } catch (Exception^ e) { MessageBox::Show(e->Message->ToString(), "File Save Error"); } } } }

    Windows Forms help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups