public TrayIcon(SideSaver saverInstance) { _main = saverInstance; _icon = new NotifyIcon(); var u = new Uri("resources/main_white.ico", UriKind.Relative); using (var stream = System.Windows.Application.GetResourceStream(u)?.Stream) if (stream != null) { _icon.Icon = new System.Drawing.Icon(stream); } _icon.Visible = true; _icon.Text = Resources.TrayIcon_idle; _icon.DoubleClick += OnDoubleClick; _icon.ContextMenu = BuildContextMenu(); _main.Items.ListChanged += OnListChanged; }
public static void Main() { AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver.OnAssemblyResolve; SideSaver s = new SideSaver(); }