private void InitializeComponent(string[] args)
        {
            components = new System.ComponentModel.Container();
            theIcon    = new NotifyIcon(components)
            {
                ContextMenuStrip = new ContextMenuStrip(),
                Icon             = SystemIcons.WinLogo,
                Text             = "JSON Wallpaper",
                Visible          = true
            };

            theIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;
            theIcon.DoubleClick += notifyIcon_DoubleClick;

            ws = new WallpaperSwitcher(args);
        }
Ejemplo n.º 2
0
        public ConfigForm(WallpaperSwitcher ws) : this()
        {
            switcher                = ws;
            numInterval.Value       = switcher.IntervalInMinutes;
            txtJSONFile.Text        = switcher.JSONFilename;
            chkRunOnStartup.Checked = switcher.RunsAtStartUp;

            btnNext.Enabled = switcher.IsRunning;
            btnPrev.Enabled = switcher.IsRunning;
            if (switcher.IsRunning)
            {
                lblRunning.Text = "Status: " + "Running";
            }
            else
            {
                lblRunning.Text = "Status: " + "Not Running - Check Parameters";
            }
        }