Exemplo n.º 1
0
        /**
         * Manages the value changing
         */
        public void SettingViewDoubleClick(object sender, System.EventArgs e)
        {
            ListView     listView     = (ListView)sender;
            ListViewItem selectedItem = listView.SelectedItems[0];

            if (selectedItem.SubItems[1].Text == "true")
            {
                selectedItem.SubItems[1].Text = "false";
            }
            else if (selectedItem.SubItems[1].Text == "false")
            {
                selectedItem.SubItems[1].Text = "true";
            }
            else
            {
                ValueChanger valueChanger = new ValueChanger(this, selectedItem);
                valueChanger.ShowDialog();
            }
        }
Exemplo n.º 2
0
		/**
		* Manages the value changing
		*/
		public void SettingViewDoubleClick(object sender, System.EventArgs e)
		{
			ListView listView = (ListView)sender;
			ListViewItem selectedItem  = listView.SelectedItems[0];
			if (selectedItem.SubItems[1].Text == "true") selectedItem.SubItems[1].Text = "false";
			else if (selectedItem.SubItems[1].Text == "false") selectedItem.SubItems[1].Text = "true";
			else
			{
				ValueChanger valueChanger = new ValueChanger(this, selectedItem);
				valueChanger.ShowDialog();
			}
		}