Skip to content

Commit

Permalink
#3 #4 の実装
Browse files Browse the repository at this point in the history
  • Loading branch information
Atria64 committed Sep 11, 2020
1 parent f089fe7 commit 8fa2088
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions PptTimerAddin/TimerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ public TimerForm()

private void Form1_Load(object sender, EventArgs e)
{
timeLabel.DoubleClick += TimerControl;
//配置変更系/-----
timeLabel.MouseDown += new MouseEventHandler(MouseDown);
timeLabel.MouseMove += new MouseEventHandler(MouseMove);
//----------------
timer.Enabled = true;

timer.Enabled = Settings.Default.AutoTimerStartMode;
if (timer.Enabled)
{
timeLabel.ForeColor = Color.FromName(Settings.Default.CharColor);
}
else timeLabel.ForeColor = Color.FromName(Settings.Default.HighlightColor);

timeLabel.Text = CalLabelTime();
timeLabel.ForeColor = Color.FromName(Settings.Default.CharColor);
timeLabel.BackColor = Color.FromName(Settings.Default.BackGroundColor);
}

Expand All @@ -47,6 +54,15 @@ private void timer_Tick(object sender, EventArgs e)
timeLabel.Text = CalLabelTime();
}

private void TimerControl(object sender,EventArgs e)
{
timer.Enabled = !timer.Enabled;
if (timer.Enabled)
{
timeLabel.ForeColor = Color.FromName(Settings.Default.CharColor);
}else timeLabel.ForeColor = Color.FromName(Settings.Default.HighlightColor);
}

//配置変更系-------
private Point mousePoint;
private new void MouseDown(object sender,MouseEventArgs e)
Expand Down

0 comments on commit 8fa2088

Please sign in to comment.