Skip to content

Commit

Permalink
log message cleanup and import window default btn..
Browse files Browse the repository at this point in the history
- cleaned up some log message strings.
- fixed focus issue in wallpaper import window and Ok btn set as default.
- added Hebrew language and updated attribution doc.
- minor refactoring.
  • Loading branch information
rocksdanister committed Jul 4, 2021
1 parent 36cfa31 commit 1befae8
Show file tree
Hide file tree
Showing 12 changed files with 1,106 additions and 256 deletions.
89 changes: 35 additions & 54 deletions src/livelywpf/livelywpf/Core/SetupDesktop.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/livelywpf/livelywpf/Core/Wallpapers/VideoMpvPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ private void Proc_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (!string.IsNullOrEmpty(e.Data))
{
Logger.Info("Mpv{0}:{1}", uniqueId, e.Data);
Logger.Info($"Mpv{uniqueId}: {e.Data}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/livelywpf/livelywpf/Core/Wallpapers/WebProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private void Proc_OutputDataReceived(object sender, DataReceivedEventArgs e)
//When the redirected stream is closed, a null line is sent to the event handler.
if (!string.IsNullOrEmpty(e.Data))
{
Logger.Info($"Cef{uniqueId}:{e.Data}");
Logger.Info($"Cef{uniqueId}: {e.Data}");
if (!_initialized || !isLoaded)
{
IpcMessage obj;
Expand Down
10 changes: 5 additions & 5 deletions src/livelywpf/livelywpf/Core/Watchdog/WatchdogProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Start()
if (livelySubProcess != null)
return;

Logger.Info("Starting watchdog service..");
Logger.Info("Starting watchdog service...");
ProcessStartInfo start = new ProcessStartInfo()
{
Arguments = Process.GetCurrentProcess().Id.ToString(System.Globalization.CultureInfo.InvariantCulture),
Expand All @@ -50,19 +50,19 @@ public void Start()
}
catch (Exception e)
{
Logger.Error("Failed to start watchdog service:" + e.Message);
Logger.Error("Failed to start watchdog service: " + e.Message);
}
}

public void Add(int pid)
{
Logger.Info("Adding program to watchdog:" + pid);
Logger.Info("Adding program to watchdog: " + pid);
SendMessage("lively:add-pgm " + pid);
}

public void Remove(int pid)
{
Logger.Info("Removing program to watchdog:" + pid);
Logger.Info("Removing program to watchdog: " + pid);
SendMessage("lively:rmv-pgm " + pid);
}

Expand All @@ -80,7 +80,7 @@ private void SendMessage(string text)
}
catch (Exception e)
{
Logger.Error("Failed to communicate with watchdog service:" + e.Message);
Logger.Error("Failed to communicate with watchdog service: " + e.Message);
}
}
}
Expand Down
361 changes: 182 additions & 179 deletions src/livelywpf/livelywpf/Docs/attribution.rtf

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions src/livelywpf/livelywpf/Helpers/Hardware/SystemInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,20 @@ public static List<string> GetGpu()

public static string GetCpuInfo()
{
var sb = new StringBuilder();
var gpu = GetCpu();
foreach (var item in gpu)
try
{
using ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor");
var sb = new StringBuilder();
foreach (ManagementObject obj in myProcessorObject.Get())
{
sb.AppendLine("CPU: " + obj["Name"]);
}
return sb.ToString().TrimEnd();
}
catch (Exception e)
{
sb.AppendLine("CPU: " + item);
return "CPU: " + e.Message;
}
return sb.ToString().TrimEnd();
}

public static List<string> GetCpu()
Expand Down
Loading

0 comments on commit 1befae8

Please sign in to comment.