|
Hi! I've tested corrections in Mono 1.1.16.1 and this problem have been solved, good job. But I have found new bug in RichTextBox, but I couldn't create test case using only class methods. In attachment is general test case. You need use mouse to generate such exception. Try selecting text from beginning almost to end and do it again and while selecting, it will generate such exception: Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of rang e. at System.Text.StringBuilder.ToString (Int32 startIndex, Int32 length) [0x0000 0] at System.Windows.Forms.Document.Draw (System.Drawing.Graphics g, Rectangle cl ip) [0x00000] at System.Windows.Forms.TextBoxBase.OnPaintInternal (System.Windows.Forms.Pain tEventArgs pevent) [0x00000] at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message m) [0x00 000] at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message m) [ 0x00000] at System.Windows.Forms.RichTextBox.WndProc (System.Windows.Forms.Message m) [ 0x00000] at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Fo rms.Message m) [0x00000] at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wPa ram, IntPtr lParam) [0x00000] at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG m sg) [0x00000] at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG msg) [0x00000] at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.For ms.ApplicationContext context) [0x00000] at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [ 0x00000] at RichTextBoxTest.MainForm.Main (System.String[] args) [0x00000] This exception exists in all mono version, 1.1.13.8, 1.1.16.1 and HEAD. Second problem is when click Button2 (test case in attachment) it replace some tokens in text. In Mono version 1.1.13.8 it worked properly, but in Mono 1.1.16.1 and HEAD it remove some empty lines which isn't desired. Other problem is that RichTextBox have problems with drawing properly especially with more complicated text and using scrolling. Here is also problem that loaded file is displayed improper, it doesn't displays dots. You have make some good improvements with DataGrid :-), but it still have a lot of bugs, which makes porting application even impossible (i will try to prepare more test cases). Best regards -- Bartosz Mosica wilow [at] ncdc.pl Bartosz Mosica napisał(a):
|
{\rtf1\ansi\ansicpg1250\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset238
Tahoma;}{\f1\fswiss\fprq2\fcharset0 Tahoma;}{\f2\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\cf1\lang1045\b\f0\fs36
Welcome\par
\b0\fs20\par
\tab This is the Some application Windows Interface. This aplication is
software interface for piece of hardware for some printers that allows double
sided printing without operator's assistance. Application capabilities are in
some ways similar to a printer driver and in some ways far more sophisticated.
\par
\par
It is designed for easy management of all of the applications settings and for
other administrative tasks. \par
\par
\lang1033\f1\tab\lang1045\f0 Currently we support : \fs24\par
\fs20\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-142\li852
Some options number 1\par
{\pntext\f2\'B7\tab}Some options number 2\par
{\pntext\f2\'B7\tab}Some options number 3\par
{\pntext\f2\'B7\tab}Some options number 4\par
\pard\li710\par
\par
\pard\lang1033\f1\tab\lang1045\f0 Server environment information : \par
\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-162\li852
Version:\b $Version$\b0\par
{\pntext\f2\'B7\tab}Time of inerface start: \b $TimeOfStart$\b0\par
{\pntext\f2\'B7\tab}Executable path: \b $ExecutablePath$\b0\par
{\pntext\f2\'B7\tab}Computer name: \b $ComputerName$\b0\par
{\pntext\f2\'B7\tab}Web IP Address:\b $WebAccessIps$\b0\par
{\pntext\f2\'B7\tab}OS Version:\b $OsVersion$\b0\par
{\pntext\f2\'B7\tab}.NET framework version: \b $FrameworkVersion$\b0\par
}
using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
namespace RichTextBoxTest
{
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button2;
public MainForm()
{
InitializeComponent();
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code
editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.richTextBox1 = new
System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button2
//
this.button2.Location = new System.Drawing.Point(460,
16);
this.button2.Name = "button2";
this.button2.TabIndex = 2;
this.button2.Text = "button2";
this.button2.Click += new
System.EventHandler(this.Button2Click);
//
// richTextBox1
//
this.richTextBox1.Dock =
System.Windows.Forms.DockStyle.Bottom;
this.richTextBox1.Location = new
System.Drawing.Point(0, 67);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(672,
348);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "richTextBox1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(296,
16);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new
System.EventHandler(this.Button1Click);
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(672, 415);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.richTextBox1);
this.Name = "MainForm";
this.Text = "MainForm";
this.ResumeLayout(false);
}
#endregion
void Button1Click(object sender, System.EventArgs e)
{
FileStream fileStream = new FileStream("sample.rtf",
FileMode.Open);
richTextBox1.LoadFile(fileStream,
RichTextBoxStreamType.RichText);
}
void Button2Click(object sender, System.EventArgs e)
{
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$Version$", String.Format("v{0}", "3.0.1"));
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$TimeOfStart$", DateTime.Now.ToString());
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$ExecutablePath$",
Environment.CurrentDirectory.Replace(@"\",@"\\"));
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$ComputerName$",Environment.MachineName);
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$OsVersion$",Environment.OSVersion.ToString());
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$FrameworkVersion$",Environment.Version.ToString());
richTextBox1.Rtf =
richTextBox1.Rtf.Replace(@"$WebAccessIps$", "Enabled on IP: 127.0.0.1");
}
}
}
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
