示例#1
0
        private void FrmBinaryClock_Load(object sender, EventArgs e)
        {
            this.SuspendLayout();
            if (!ConfigTool.ConfigExits(Global.ConfigFile))
            {
                ChangeSize();
                ChangeColor(Global.DefaultColor, Global.DefaultShadow);

                this.Opacity = 0.45;
                int x = Screen.PrimaryScreen.WorkingArea.Right - this.Width - 50;
                int y = Screen.PrimaryScreen.WorkingArea.Top + 50;
                this.Location = new Point(x, y);
            }
            else
            {
                GetConfiguration();
                ChangeSize();
                ChangeColor(Global.ClockColor, Global.ShadowColor);
            }

            timer.Start();

            notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;
            notifyIcon.ContextMenuStrip.Closing += ContextMenuStrip_Closing;
            AddItemClickEvent(notifyIcon.ContextMenuStrip.Items);

            //DrawIcon();
            this.ResumeLayout();
        }