Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subscription panel / images
Message
De
29/01/2009 14:32:44
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
29/01/2009 14:27:07
Information générale
Forum:
Level Extreme
Catégorie:
Autre
Divers
Thread ID:
01378009
Message ID:
01378236
Vues:
13
Michel,

>>Code snippet? now that would be nice. It is a drag pasting in code snippets in the pre tags and then edditing every line so the indentation isn't all screwed up. Or maybe I am doing something wrong as I don't know about many things on this forum. What is Time warp for?
>
>I do not understand why you would have to edit the code. Can you send me that code by email so I can try to put it in a message?
>
>Time warp is at the top of the toolbox on the left side. It allows you to move back in time to retrieve messages with pre defined set of times.

Any code I copy from VS and paste between the pre tags has indentation problems. Usually the first line is left justified but everything else is aligned way to the right. For readability I go in an backspace all the lines back to the left and then add spaces to create indent as it would be in the VS editor. Maybe there is a way to not have this happen. Sample below was pasted in without the editing.
public bool SaveToQueue(SpotStarterEntity spotStarter, string spotId)
		{
			bool llSuccess = false;
			this.OnTrackerActivity("Saving To Queue: " + spotId, TrackerAction.Processing);

			string saveName = this.QueueDataPath + @"\Spot_" + spotId + ".xml";
			FileStream stream = null;
			try
			{
				stream = File.Create(saveName);
				XmlSerializer xml = new XmlSerializer(spotStarter.GetType());
				xml.Serialize(stream, spotStarter);

				Debug.WriteLine("Saved", "Queue Item: " + saveName);
				llSuccess = true;
			}
			catch (InvalidOperationException ex)
			{
				Debug.WriteLine("Saving to Queue", "Error: " + ex.Message);
				this.OnTrackerError("InvalidOperationException - Save to Queue");
			}
			finally
			{
				stream.Close();
			}

			return llSuccess;
		}
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform