public void SaveState() { using (FileStream fstream = File.Open(ScorePath, FileMode.Append)) { var Buff = new UnicodeEncoding().GetBytes($"Tiempo: {TimeSpent.ToString()} - Intentos {Attemps}\n"); fstream.Write(Buff, 0, Buff.Length); } }
public string[] ToStringArray(int digits) { return(new[] { AssemblyName, MethodName, AvgTime.ToString($"F{digits}", CultureInfo.InvariantCulture) /*.Replace(".", ",")*/, //slk . ; in csv , ! TicksNum.ToString(), MinTime.ToString($"F{digits}", CultureInfo.InvariantCulture) /*.Replace(".", ",")*/, //slk . ; in csv , ! MaxTime.ToString($"F{digits}", CultureInfo.InvariantCulture) /*.Replace(".", ",")*/, //slk . ; in csv , ! TimeSpent.ToString(), AvgKB.ToString(), AllocKB.ToString(), PatchOwners }); }
public void DrawToForm(Form f) { var label = new Label(); var textBox = new TextBox(); var checkBox = new CheckBox(); label.Text = Description.ToString(); textBox.Text = TimeSpent.ToString(); label.Left = StartX; label.Top = StartY; StartX += 100;// Move position to right textBox.Left = StartX; textBox.Top = StartY; StartX += 150;// Move position to right checkBox.Left = StartX; checkBox.Top = StartY; StartX = 10; // Reset to start StartY += 50; // Move position to down f.Controls.Add(label); f.Controls.Add(textBox); f.Controls.Add(checkBox); }