You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a form that has a button or menu item that when clicked, starts step 2.
Open two forms. One form has a button that opens a file dialog. The other form may be blank.
Click the button to show the open file dialog.
Select a file from the dialog.
Click OK or double click a file to close the dialog.
using System;
using System.Windows.Forms;
using System.Windows.Input;
using System.Drawing;
public class HelloWorld : Form
{
static public void Main ()
{
Application.Run (new HelloWorld ());
}
public HelloWorld ()
{
Size = new Size(800, 600);
var b = new Button();
b.Text = "Open";
b.Dock = DockStyle.Fill;
Controls.Add(b);
b.Click += (Object sender, EventArgs e)=>{
var d = new ChildForm();
d.ShowDialog();
};
Text = "Parent Dialog";
}
}
class GridForm : Form
{
public GridForm()
{
Size = new Size(500, 500);
Text = "Grid Dialog";
}
}
class ChildForm : Form
{
public ChildForm()
{
var b = new Button();
b.Text = "Open";
b.Dock = DockStyle.Fill;
Controls.Add(b);
b.Click += (Object sender, EventArgs e)=>{
var d = new OpenFileDialog();
d.ShowDialog();
};
var f = new GridForm();
f.Show();
Text = "Child Dialog";
}
}
Current Behavior
Sometimes, the dialog appears frozen, along with the other forms. The application must be forcefully closed.
While the Mono application is hung, other applications are hung too. Firefox, for instance, does not accept input as long as the Mono application is frozen.
Expected Behavior
The dialog closes normally, selecting the file.
On which platforms did you notice this
[ ] macOS
[X] Linux - OS: Fedora 28 ---- Kernel: Linux fritodell 4.16.0-0.rc6.git0.1.fc29.x86_64 #1 SMP Mon Mar 19 16:04:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[ ] Windows
Version Used:
Mono JIT compiler version 4.8.0 (Stable 4.8.0.520/8f6d0f6 Thu Jun 7 07:23:56 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Steps to Reproduce
Current Behavior
Sometimes, the dialog appears frozen, along with the other forms. The application must be forcefully closed.
While the Mono application is hung, other applications are hung too. Firefox, for instance, does not accept input as long as the Mono application is frozen.
Expected Behavior
The dialog closes normally, selecting the file.
On which platforms did you notice this
[ ] macOS
[X] Linux - OS: Fedora 28 ---- Kernel: Linux fritodell 4.16.0-0.rc6.git0.1.fc29.x86_64 #1 SMP Mon Mar 19 16:04:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[ ] Windows
Version Used:
Mono JIT compiler version 4.8.0 (Stable 4.8.0.520/8f6d0f6 Thu Jun 7 07:23:56 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Stacktrace
The text was updated successfully, but these errors were encountered: