-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
170 lines (158 loc) · 4.4 KB
/
main.js
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
const electron = require("electron");
const url = require("url");
const path = require("path");
const { app, BrowserWindow, Menu } = electron;
let mainWindow;
app.on('ready', () => {
mainWindow = new BrowserWindow({});
console.log(process.platform);
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, "main.html"),
protocol: "file:",
slashes: true
}));
const mainMenuTemplate = [
{
label: "Dosya",
submenu: [
{
label: "Yeni sekme",
accelerator: "CmdOrCtrl+N",
click: () => {
console.log("Yeni sekme açıldı.");
// Yeni sekmeyle ilgili yapılacak işlemleri buraya yazabilirsiniz
}
},
{
label: "Yeni pencere",
accelerator: "CmdOrCtrl+Shift",
click: () => {
console.log("Yeni pencere açıldı.");
// Yeni pencereyle ilgili yapılacak işlemleri buraya yazabilirsiniz
}
},
{
label: "Aç",
accelerator: "Ctrl+O",
click: () => {
console.log("açma işlemi yapıldı.");
// Açma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Kaydet",
accelerator: "Ctrl+S",
click: () => {
console.log("notlar kaydedildi.");
// Kaydetme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Farklı Kaydet",
accelerator: "Ctrl+Shift+S",
click: () => {
console.log("Farklı kaydetme işlemi yapıldı.");
// Farklı kaydetme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Tümünü Kaydet",
accelerator: "Ctrl+Alt+S",
click: () => {
console.log("Tümünü kaydetme işlemi yapıldı.");
// Tümünü kaydetme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Yazdır",
accelerator: "Ctrl+P",
click: () => {
console.log("Yazdırma işlemi yapıldı.");
// Yazdırma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Sekmeyi kapat",
accelerator: "Ctrl+W",
click: () => {
console.log("Sekme kapatıldı.");
// Sekmeyi kapatma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Pencereyi kapat",
accelerator: "Ctrl+Shift+W",
click: () => {
console.log("Pencere kapama işlemi yapıldı.");
// Pencereyi kapatma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Çıkış",
role: "quit"
}
]
},
{
label: "Düzenle",
submenu: [
{
label: "Geri al",
accelerator: "Ctrl+Z",
click: () => {
console.log("Geri alma işlemi yapıldı.");
// Geri alma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Kes",
accelerator: "Ctrl+X",
click: () => {
console.log("Kesme işlemi yapıldı.");
// Kesme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Kopyala",
accelerator: "Ctrl+C",
click: () => {
console.log("Kopyalama işlemi yapıldı.");
// Kopyalama işlemlerini buraya yazabilirsiniz
}
},
{
label: "Bul",
accelerator: "Ctrl+F",
click: () => {
// Bulma işlemlerini buraya yazabilirsiniz
}
},
{
label: "Değiştir",
accelerator: "Ctrl+H",
click: () => {
console.log("Değiştirme işlemi yapıldı.");
// Değiştirme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Git",
accelerator: "Ctrl+G",
click: () => {
// Gitme işlemlerini buraya yazabilirsiniz
}
},
{
label: "Tümünü Seç",
accelerator: "Ctrl+A",
click: () => {
console.log("Tümünü seçme işlemi yapıldı.");
// Tümünü seçme işlemlerini buraya yazabilirsiniz
}
}
]
}
];
const mainMenu = Menu.buildFromTemplate(mainMenuTemplate);
Menu.setApplicationMenu(mainMenu);
});