-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.cs
More file actions
83 lines (66 loc) · 2.21 KB
/
MainWindow.cs
File metadata and controls
83 lines (66 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using System;
using Gtk;
using UI = Gtk.Builder.ObjectAttribute;
using System.Diagnostics;
namespace Appbatrozlinux
{
class MainWindow : Window
{
[UI] private Button _button1 = null;
private int _counter;
public MainWindow() : this(new Builder("MainWindow.glade")) { }
private MainWindow(Builder builder) : base(builder.GetRawOwnedObject("MainWindow"))
{
builder.Autoconnect(this);
DeleteEvent += Window_DeleteEvent;
// _button1.Clicked += Button1_Clicked;
}
private void Window_DeleteEvent(object sender, DeleteEventArgs a)
{
Application.Quit();
}
private void Button1_Clicked(object sender, EventArgs a)
{
multilaunch mt = new multilaunch();
mt.Show();
}
private void Button2_Clicked(object sender, EventArgs a)
{
nbookmark nb = new nbookmark();
nb.Show();
}
private void search_Clicked(object sender, EventArgs a)
{
searchwindow sw = new searchwindow();
sw.Show();
}
private void bookmark_Clicked(object sender, EventArgs a)
{
try{
bookmark bm = new bookmark();
bm.Show();
}
catch(Exception ex){
MessageDialog md = new MessageDialog(null, DialogFlags.Modal, MessageType.Other, ButtonsType.Ok, ex.Message);
md.Run();
md.Destroy();
}
}
private void set_Clicked(object sender, EventArgs a)
{
timerwindow tw = new timerwindow();
tw.Show();
}
private void tutorial_Clicked(object sender, EventArgs a)
{
string command = "xdg-open " + "./tutorial.pdf";
Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "/bin/bash";
proc.StartInfo.Arguments = "-c \" " + command + " \"";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
proc.Close();
}
}
}