[Mono-bugs] [Bug 347669] New: Form: ArgumentOutOfRangeException on merge

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 11 11:45:14 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=347669


           Summary: Form: ArgumentOutOfRangeException on merge
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce: 
    run the code, select File Open

Observed:

 ArgumentOutOfRangeException


Code:


using System;
using System.Windows.Forms;

public class Test {
    static void Main() {
        try {
            Application.Run(new MainForm());
        } catch (Exception e) {
            MessageBox.Show(e.ToString());
        }
    }
}

class MainForm : Form {

    public MainForm() {
        System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(MainForm));
        toolStrip1 = new ToolStrip();
        openToolStripButton = new ToolStripButton();
        customerToolStripButton = new ToolStripButton();
        itemToolStripButton = new ToolStripButton();
        invoiceToolStripButton = new ToolStripButton();
        mainMenuStrip1 = new MenuStrip();
        File = new ToolStripMenuItem();
        openToolStripMenuItem = new ToolStripMenuItem();
        openToolStripMenuItem.Click += new
EventHandler(openToolStripMenuItem_Click);
        toolStripSeparator2 = new ToolStripSeparator();
        Dokument = new ToolStripMenuItem();
        arveToolStripMenuItem = new ToolStripMenuItem();
        WareHouse = new ToolStripMenuItem();
        Personnel = new ToolStripMenuItem();
        Payroll = new ToolStripMenuItem();
        FixedAssets = new ToolStripMenuItem();
        Supplies = new ToolStripMenuItem();
        GeneralLedger = new ToolStripMenuItem();
        Manufacturing = new ToolStripMenuItem();
        PointOfSale = new ToolStripMenuItem();
        CardTerminal = new ToolStripMenuItem();
        Rent = new ToolStripMenuItem();
        WayBill = new ToolStripMenuItem();
        CustomerRelationManagement = new ToolStripMenuItem();
        toolStripSeparator8 = new ToolStripSeparator();
        NewUserToolStripMenuItem = new ToolStripMenuItem();
        exitToolStripMenuItem = new ToolStripMenuItem();
        toolStrip1.Items.AddRange(new ToolStripItem[] {
            openToolStripButton,
            customerToolStripButton,
            itemToolStripButton,
            invoiceToolStripButton});
        toolStrip1.Location = new System.Drawing.Point(0, 24);
        toolStrip1.Name = "toolStrip1";
        toolStrip1.Size = new System.Drawing.Size(644, 25);
        toolStrip1.TabIndex = 1;
        toolStrip1.Text = "toolStrip1";
        openToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
        openToolStripButton.Name = "openToolStripButton";
        openToolStripButton.Size = new System.Drawing.Size(23, 22);
        openToolStripButton.Text = "&Open";
        openToolStripButton.ToolTipText = "Open";
        customerToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
        customerToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
        customerToolStripButton.Name = "customerToolStripButton";
        customerToolStripButton.Size = new System.Drawing.Size(23, 22);
        customerToolStripButton.Text = "toolStripButton2";
        customerToolStripButton.ToolTipText = "Klient (Ctrl+K)";
        itemToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
        itemToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
        itemToolStripButton.Name = "itemToolStripButton";
        itemToolStripButton.Size = new System.Drawing.Size(23, 22);
        itemToolStripButton.Text = "toolStripButton1";
        itemToolStripButton.ToolTipText = "Artikkel (Ctrl+D)";
        invoiceToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
        invoiceToolStripButton.Name = "invoiceToolStripButton";
        invoiceToolStripButton.Size = new System.Drawing.Size(23, 22);
        invoiceToolStripButton.Text = "toolStripButton1";
        invoiceToolStripButton.ToolTipText = "Arve (Ctrl+E)";
        mainMenuStrip1.Items.AddRange(new ToolStripItem[] {
            File
        });
        mainMenuStrip1.Location = new System.Drawing.Point(0, 0);
        mainMenuStrip1.Name = "mainMenuStrip1";
        mainMenuStrip1.Size = new System.Drawing.Size(644, 24);
        mainMenuStrip1.TabIndex = 3;
        mainMenuStrip1.Text = "menuStrip1";
        File.DropDownItems.AddRange(new ToolStripItem[] {
            openToolStripMenuItem,
            toolStripSeparator2,
            Dokument,
            WareHouse,
            Personnel,
            Payroll,
            FixedAssets,
            Supplies,
            GeneralLedger,
            Manufacturing,
            PointOfSale,
            CardTerminal,
            Rent,
            WayBill,
            CustomerRelationManagement,
            toolStripSeparator8,
            NewUserToolStripMenuItem,
            exitToolStripMenuItem});
        File.MergeAction = MergeAction.Insert;
        File.MergeIndex = 1;
        File.Name = "File";
        File.Size = new System.Drawing.Size(35, 20);
        File.Text = "&File";
        openToolStripMenuItem.MergeIndex = 1;
        openToolStripMenuItem.Name = "openToolStripMenuItem";
        openToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
        openToolStripMenuItem.Text = "Open";
        toolStripSeparator2.MergeIndex = 2;
        toolStripSeparator2.Name = "toolStripSeparator2";
        toolStripSeparator2.Size = new System.Drawing.Size(193, 6);
        Dokument.DropDownItems.AddRange(new ToolStripItem[] {
            arveToolStripMenuItem
        });
        Dokument.MergeIndex = 3;
        Dokument.Name = "Dokument";
        Dokument.Size = new System.Drawing.Size(196, 22);
        Dokument.Text = "&Dokument";
        arveToolStripMenuItem.Name = "arveToolStripMenuItem";
        arveToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+E";
        arveToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | KeysE)));
        arveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
        arveToolStripMenuItem.Text = "Arve";
        WareHouse.MergeIndex = 4;
        WareHouse.Name = "WareHouse";
        WareHouse.Size = new System.Drawing.Size(196, 22);
        WareHouse.Text = "&Ladu";
        Personnel.MergeIndex = 5;
        Personnel.Name = "Personnel";
        Personnel.Size = new System.Drawing.Size(196, 22);
        Personnel.Text = "&Kaader";
        Payroll.MergeIndex = 6;
        Payroll.Name = "Payroll";
        Payroll.Size = new System.Drawing.Size(196, 22);
        Payroll.Text = "&Palk";
        FixedAssets.MergeIndex = 7;
        FixedAssets.Name = "FixedAssets";
        FixedAssets.Size = new System.Drawing.Size(196, 22);
        FixedAssets.Text = "PƵ&hivara";
        Supplies.MergeIndex = 8;
        Supplies.Name = "Supplies";
        Supplies.Size = new System.Drawing.Size(196, 22);
        Supplies.Text = "&VƤikevahend";
        GeneralLedger.MergeIndex = 9;
        GeneralLedger.Name = "GeneralLedger";
        GeneralLedger.Size = new System.Drawing.Size(196, 22);
        GeneralLedger.Text = "Pea&raamat";
        Manufacturing.MergeIndex = 10;
        Manufacturing.Name = "Manufacturing";
        Manufacturing.Size = new System.Drawing.Size(196, 22);
        Manufacturing.Text = "&Tootmine";
        PointOfSale.MergeIndex = 11;
        PointOfSale.Name = "PointOfSale";
        PointOfSale.Size = new System.Drawing.Size(196, 22);
        PointOfSale.Text = "Ka&ssasĆ¼steem";
        CardTerminal.MergeIndex = 12;
        CardTerminal.Name = "CardTerminal";
        CardTerminal.Size = new System.Drawing.Size(196, 22);
        CardTerminal.Text = "Kaarditer&minal";
        Rent.MergeIndex = 13;
        Rent.Name = "Rent";
        Rent.Size = new System.Drawing.Size(196, 22);
        Rent.Text = "ĆœĆ¼riar&vestus";
        WayBill.MergeIndex = 14;
        WayBill.Name = "WayBill";
        WayBill.Size = new System.Drawing.Size(196, 22);
        WayBill.Text = "S&Ƶiduleht";
        CustomerRelationManagement.MergeIndex = 15;
        CustomerRelationManagement.Name = "CustomerRelationManagement";
        CustomerRelationManagement.Size = new System.Drawing.Size(196, 22);
        CustomerRelationManagement.Text = "Klie&ndihaldus";
        toolStripSeparator8.MergeAction = MergeAction.Insert;
        toolStripSeparator8.MergeIndex = 20;
        toolStripSeparator8.Name = "toolStripSeparator8";
        toolStripSeparator8.Size = new System.Drawing.Size(193, 6);
        NewUserToolStripMenuItem.MergeIndex = 21;
        NewUserToolStripMenuItem.Name = "NewUserToolStripMenuItem";
        NewUserToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Shift |
Keys.F2)));
        NewUserToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
        NewUserToolStripMenuItem.Text = "Uus kasutaja";
        exitToolStripMenuItem.MergeIndex = 22;
        exitToolStripMenuItem.Name = "exitToolStripMenuItem";
        exitToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
        exitToolStripMenuItem.Text = "Tƶƶ lƵpp &x";

        AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        AutoScaleMode = AutoScaleMode.Font;
        BackgroundImageLayout = ImageLayout.Center;
        ClientSize = new System.Drawing.Size(644, 396);
        Controls.Add(toolStrip1);
        Controls.Add(mainMenuStrip1);
        IsMdiContainer = true;
        KeyPreview = false;
        MainMenuStrip = mainMenuStrip1;
        Name = "MainForm";
    }

    void openToolStripMenuItem_Click(object sender, EventArgs e) {
        Form frm = new Childform();
        frm.MdiParent = this;
        frm.Show();
    }



    ToolStrip toolStrip1;
    ToolStripButton openToolStripButton;
    ToolStripButton invoiceToolStripButton;
    MenuStrip mainMenuStrip1;
    ToolStripMenuItem File;
    ToolStripMenuItem openToolStripMenuItem;
    ToolStripSeparator toolStripSeparator2;
    ToolStripMenuItem exitToolStripMenuItem;
    ToolStripMenuItem Dokument;
    ToolStripMenuItem arveToolStripMenuItem;
    ToolStripMenuItem WareHouse;
    ToolStripMenuItem Personnel;
    ToolStripMenuItem Payroll;
    ToolStripMenuItem FixedAssets;
    ToolStripMenuItem Supplies;
    ToolStripMenuItem GeneralLedger;
    ToolStripMenuItem Manufacturing;
    ToolStripMenuItem PointOfSale;
    ToolStripMenuItem CardTerminal;
    ToolStripMenuItem Rent;
    ToolStripMenuItem WayBill;
    ToolStripMenuItem CustomerRelationManagement;
    ToolStripSeparator toolStripSeparator8;
    ToolStripMenuItem NewUserToolStripMenuItem;
    ToolStripButton customerToolStripButton;
    ToolStripButton itemToolStripButton;

}




class Childform : Form {
    public Childform() {
        toolStrip1 = new ToolStrip();
        addToolStripButton = new ToolStripButton();
        printToolStripButton = new ToolStripButton();
        filterToolStripButton = new ToolStripButton();
        deleteToolStripButton = new ToolStripButton();
        menuStrip1 = new MenuStrip();
        fileToolStripMenuItem = new ToolStripMenuItem();
        toolStripSeparator = new ToolStripSeparator();
        printToolStripMenuItem = new ToolStripMenuItem();
        editToolStripMenuItem = new ToolStripMenuItem();
        toolStripSeparator3 = new ToolStripSeparator();
        copyToolStripMenuItem = new ToolStripMenuItem();
        toolStripSeparator4 = new ToolStripSeparator();
        selectAllToolStripMenuItem = new ToolStripMenuItem();
        toolsToolStripMenuItem = new ToolStripMenuItem();
        addToolStripMenuItem = new ToolStripMenuItem();
        deleteToolStripMenuItem = new ToolStripMenuItem();
        filterToolStripMenuItem = new ToolStripMenuItem();
        helpToolStripMenuItem = new ToolStripMenuItem();
        searchToolStripMenuItem = new ToolStripMenuItem();
        toolStrip1.SuspendLayout();
        menuStrip1.SuspendLayout();
        SuspendLayout();
        toolStrip1.GripStyle = ToolStripGripStyle.Hidden;
        toolStrip1.Items.AddRange(new ToolStripItem[] {
            addToolStripButton,
            printToolStripButton,
            filterToolStripButton,
            deleteToolStripButton});
        toolStrip1.Location = new System.Drawing.Point(0, 0);
        toolStrip1.Name = "toolStrip1";
        toolStrip1.Size = new System.Drawing.Size(337, 25);
        toolStrip1.TabIndex = 3;
        toolStrip1.Text = "toolStrip1";
        addToolStripButton.Name = "addToolStripButton";
        addToolStripButton.Size = new System.Drawing.Size(45, 22);
        addToolStripButton.Text = "Uus";
        addToolStripButton.ToolTipText = "Lisa (Ctrl+N)";
        printToolStripButton.Name = "printToolStripButton";
        printToolStripButton.Size = new System.Drawing.Size(50, 22);
        printToolStripButton.Text = "TrĆ¼ki";
        printToolStripButton.ToolTipText = "Print (Ctrl+P)";
        filterToolStripButton.Name = "filterToolStripButton";
        filterToolStripButton.Size = new System.Drawing.Size(46, 22);
        filterToolStripButton.Text = "Otsi";
        filterToolStripButton.ToolTipText = "Otsingufilter  (F11)";
        deleteToolStripButton.Name = "deleteToolStripButton";
        deleteToolStripButton.Size = new System.Drawing.Size(64, 22);
        deleteToolStripButton.Text = "Kustuta";
        deleteToolStripButton.ToolTipText = "Kustuta (Ctrl+T)";
        menuStrip1.Items.AddRange(new ToolStripItem[] {
            fileToolStripMenuItem,
            editToolStripMenuItem,
            toolsToolStripMenuItem,
            helpToolStripMenuItem});
        menuStrip1.Location = new System.Drawing.Point(0, 0);
        menuStrip1.Name = "menuStrip1";
        menuStrip1.RenderMode = ToolStripRenderMode.System;
        menuStrip1.Size = new System.Drawing.Size(337, 24);
        menuStrip1.TabIndex = 2;
        menuStrip1.Text = "menuStrip1";
        menuStrip1.Visible = false;

        fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
            toolStripSeparator,
            printToolStripMenuItem});
        fileToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
        fileToolStripMenuItem.Name = "fileToolStripMenuItem";
        fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
        fileToolStripMenuItem.Text = "&File";
        toolStripSeparator.MergeAction = MergeAction.Insert;
        toolStripSeparator.MergeIndex = 3;
        toolStripSeparator.Name = "toolStripSeparator";
        toolStripSeparator.Size = new System.Drawing.Size(149, 6);
        printToolStripMenuItem.MergeAction = MergeAction.Insert;
        printToolStripMenuItem.MergeIndex = 2;
        printToolStripMenuItem.Name = "printToolStripMenuItem";
        printToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
Keys.P)));
        printToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        printToolStripMenuItem.Text = "&Print";
        editToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
            toolStripSeparator3,
            copyToolStripMenuItem,
            toolStripSeparator4,
            selectAllToolStripMenuItem});
        editToolStripMenuItem.MergeAction = MergeAction.Insert;
        editToolStripMenuItem.MergeIndex = 1;
        editToolStripMenuItem.Name = "editToolStripMenuItem";
        editToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        editToolStripMenuItem.Text = "&Paranda";
        toolStripSeparator3.Name = "toolStripSeparator3";
        toolStripSeparator3.Size = new System.Drawing.Size(157, 6);
        copyToolStripMenuItem.Name = "copyToolStripMenuItem";
        copyToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | KeysC)));
        copyToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        copyToolStripMenuItem.Text = "Kopeeri";
        toolStripSeparator4.Name = "toolStripSeparator4";
        toolStripSeparator4.Size = new System.Drawing.Size(157, 6);
        selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
        selectAllToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        selectAllToolStripMenuItem.Text = "Vali kƵik";
        toolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
            addToolStripMenuItem,
            deleteToolStripMenuItem,
            filterToolStripMenuItem});
        toolsToolStripMenuItem.MergeAction = MergeAction.Insert;
        toolsToolStripMenuItem.MergeIndex = 2;
        toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
        toolsToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
        toolsToolStripMenuItem.Text = "&Tegevus";
        addToolStripMenuItem.Name = "addToolStripMenuItem";
        addToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.N)));
        addToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        addToolStripMenuItem.Text = "Lisa";
        deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
        deleteToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
Keys.T)));
        deleteToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        deleteToolStripMenuItem.Text = "Kustuta";
        filterToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Silver;
        filterToolStripMenuItem.Name = "filterToolStripMenuItem";
        filterToolStripMenuItem.ShortcutKeys = Keys.F11;
        filterToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        filterToolStripMenuItem.Text = "Tingimus";
        helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
            searchToolStripMenuItem});
        helpToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
        helpToolStripMenuItem.Name = "helpToolStripMenuItem";
        helpToolStripMenuItem.Size = new System.Drawing.Size(34, 20);
        helpToolStripMenuItem.Text = "&Abi";
        searchToolStripMenuItem.MergeAction = MergeAction.Insert;
        searchToolStripMenuItem.MergeIndex = 1;
        searchToolStripMenuItem.Name = "searchToolStripMenuItem";
        searchToolStripMenuItem.ShortcutKeys = Keys.F1;
        searchToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
        searchToolStripMenuItem.Text = "&Otsi teemat";

        AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        ClientSize = new System.Drawing.Size(337, 272);
        Controls.Add(toolStrip1);
        Controls.Add(menuStrip1);
    }

    public ToolStrip toolStrip1;
    ToolStripButton addToolStripButton;
    ToolStripButton printToolStripButton;
    ToolStripButton filterToolStripButton;
    ToolStripButton deleteToolStripButton;
    MenuStrip menuStrip1;
    ToolStripMenuItem fileToolStripMenuItem;
    ToolStripSeparator toolStripSeparator;
    ToolStripMenuItem printToolStripMenuItem;
    ToolStripMenuItem editToolStripMenuItem;
    ToolStripSeparator toolStripSeparator3;
    ToolStripMenuItem copyToolStripMenuItem;
    ToolStripSeparator toolStripSeparator4;
    ToolStripMenuItem selectAllToolStripMenuItem;
    ToolStripMenuItem toolsToolStripMenuItem;
    ToolStripMenuItem addToolStripMenuItem;
    ToolStripMenuItem deleteToolStripMenuItem;
    ToolStripMenuItem filterToolStripMenuItem;
    ToolStripMenuItem helpToolStripMenuItem;
    ToolStripMenuItem searchToolStripMenuItem;
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list