示例#1
0
 private void buttonMinimize_Click(object sender, EventArgs e)
 {
     label1.Focus();
     WindowState = FormWindowState.Minimized;
     if (windgetOpen)
     {
         windgetOpen = false;
         settingsWidget.Dispose();
         settingsWidget = null;
         buttonWidget.BackgroundImage = Properties.Resources.buttonWidget;
     }
 }
示例#2
0
 private void button_Widget_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (!windgetOpen)
     {
         windgetOpen    = true;
         settingsWidget = new FormWidget();
         settingsWidget.DesktopLocation = new Point(Left, Top - settingsWidget.Size.Height);
         settingsWidget.Show(this);
         button_Widget.BackgroundImage = Properties.Resources.buttonWidgetPressed;
     }
     else
     {
         windgetOpen = false;
         settingsWidget.Dispose();
         settingsWidget = null;
         button_Widget.BackgroundImage = Properties.Resources.buttonWidget;
     }
 }