Пример #1
0
 private void iconButton_Click(object sender, EventArgs e)
 {
     if (selectedTool != null)
     {
         string iconFile = selectedTool.iconFile;
         if (Util.IsNullOrSpaces(iconFile))
         {
             iconFile = this.cmdTextBox.Text;
         }
         ChooseIconDlg dlg = new ChooseIconDlg(iconFile);
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             this.selectedTool.iconFile  = dlg.FileName;
             this.selectedTool.iconIndex = dlg.IconIndex;
             DisplayCurrentIcon();
         }
     }
 }
Пример #2
0
		private void iconButton_Click(object sender, EventArgs e)
		{
			if (selectedTool != null)
			{
				string iconFile = selectedTool.iconFile;
				if (Util.IsNullOrSpaces(iconFile))
				{
					iconFile = this.cmdTextBox.Text;
				}
				ChooseIconDlg dlg = new ChooseIconDlg(iconFile);
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					this.selectedTool.iconFile = dlg.FileName;
					this.selectedTool.iconIndex = dlg.IconIndex;
					DisplayCurrentIcon();
				}
			}
		}