Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public static void Main()
 {
     AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver.OnAssemblyResolve;
     SideSaver s = new SideSaver();
 }