コード例 #1
0
 public void setProtection(bool x)
 {
     protectionStatus = x;
     if (x)
     {
         Protection.Image = ((System.Drawing.Image)(Properties.Resources.on));
     }
     else
     {
         Protection.Image = ((System.Drawing.Image)(Properties.Resources.off));
     }
     Protection.Refresh();
 }
コード例 #2
0
 private void protectionBtn(object sender, MouseEventArgs e)
 {
     if (protectionIsOn())
     {
         Protection.Image = ((System.Drawing.Image)(Properties.Resources.off));
         setProtection(false);
     }
     else if (!protectionStatus)
     {
         Protection.Image = ((System.Drawing.Image)(Properties.Resources.on));
         setProtection(true);
     }
     Protection.Refresh();
     updateSetting();
 }