Added application settings and basic filewatcher.
This commit is contained in:
@@ -1,10 +1,26 @@
|
||||
const electron = require("electron");
|
||||
|
||||
const { ipcMain } = electron;
|
||||
const { ipcMain, dialog } = require("electron");
|
||||
const { mainWindow } = require("./main");
|
||||
const settings = require("electron-settings");
|
||||
const { DecodeEstimate } = require("./decoder/decoder");
|
||||
//Import Ipc Handlers
|
||||
require("./file-watcher/file-watcher-ipc");
|
||||
|
||||
console.log("*** Added IPC Handlers ***");
|
||||
|
||||
ipcMain.on("test-start", (event, arg) => {
|
||||
console.log("Test Start Inbound.", arg);
|
||||
ipcMain.on("test", async (event, object) => {
|
||||
DecodeEstimate();
|
||||
event.sender.send("test-success", { success: true });
|
||||
});
|
||||
|
||||
// ipcMain.on("test-start", async (event, arg) => {
|
||||
// console.log("Test Start Inbound.", arg);
|
||||
// const result = await dialog.showOpenDialog(mainWindow, {
|
||||
// properties: ["openDirectory"],
|
||||
// });
|
||||
// await settings.set("filePaths", [
|
||||
// ...result.filePaths,
|
||||
// ...(await settings.get("filePaths")),
|
||||
// ]);
|
||||
// console.log(await settings.get("filePaths"));
|
||||
// event.sender.send("test-success", { success: true });
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user