BioGTK  6.7.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
Loading...
Searching...
No Matches
OpenURLBox.cs
1using Gtk;
2using javax.swing.text;
3using System;
4using System.IO;
5using System.Threading;
6
7namespace BioGTK
8{
9 public partial class OpenUrlBox : Dialog
10 {
11 #region Properties
13 private Builder _builder;
14 int line = 0;
15#pragma warning disable 649
16 [Builder.Object]
17 private Entry textBox;
18 [Builder.Object]
19 private Menu contextMenu;
20 [Builder.Object]
21 private Button okBut;
22 [Builder.Object]
23 private Button cancelBut;
24#pragma warning restore 649
25
26 #endregion
27
28 #region Constructors / Destructors
36 public static OpenUrlBox Create()
37 {
38 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/OpenURLBox.glade", FileMode.Open));
39 return new OpenUrlBox(builder, builder.GetObject("mainwindow").Handle);
40 }
41 /* The constructor of the class. */
42 protected OpenUrlBox(Builder builder, IntPtr handle) : base(handle)
43 {
44 _builder = builder;
45 builder.Autoconnect(this);
46 App.ApplyStyles(this);
47 okBut.Clicked += OkButton_Clicked;
48 cancelBut.Clicked += CancelBut_Clicked;
49 }
50
51 private void CancelBut_Clicked(object sender, EventArgs e)
52 {
53 Respond(ResponseType.Cancel);
54 this.Destroy();
55 }
56
57 private void OkButton_Clicked(object sender, EventArgs e)
58 {
59 this.Respond(ResponseType.Ok);
60 this.Hide();
61 }
62
63 public string GetUrl()
64 {
65 return textBox.Text;
66 }
71 private void SetTool_FocusActivated(object sender, EventArgs e)
72 {
73
74 }
75 #endregion
76
77 }
78}
static OpenUrlBox Create()
Definition OpenURLBox.cs:36
Definition ML.cs:17