Example #1
0
 private void ScriptHelper_SelectedChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (SelectedChanged != null)
     {
         SelectedChanged(sender, e);
     }
 }
Example #2
0
 private void leksykonNMListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     string internationalName = e.Item.Text;
     leksykonDescriptionLabel.Text = "Preparaty zawierające: " + internationalName;
     Leksykon_UpdateGrid(
         UnitOfWork.MedicineRepository.GetMedicinesByInternationalName(internationalName));
 }
Example #3
0
        private void dbContentListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            var historyItem = (ISearchResult)e.Item.Tag;
            resultsTextBox.Text = _helper.ResultTextGenerator.Generate(historyItem);

            exportResultsButton.Enabled = false;
        }
Example #4
0
        private void lvwFigure_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            var selectedItem = (e.IsSelected && e.Item != null) ? e.Item.Tag as I図形 : null;
            Global.図形一覧.SelectedItem = selectedItem;

            UpdateCommandButton();
        }
Example #5
0
 protected void SetText(object obj, ListViewItemSelectionChangedEventArgs args)
 {
     tbFirstName.Text = args.Item.SubItems[1].Text;
     tbLastName.Text = args.Item.SubItems[2].Text;
     tbAge.Text = args.Item.SubItems[3].Text;
     lblHiddenId.Text = args.Item.SubItems[0].Text;
 }
Example #6
0
        public ListViewNF()
        {
            _itemSelectionChangedTimer.Interval = 1;
            _selectedIndexChangedTimer.Interval = 1;

            _itemSelectionChangedTimer.Tick += (sender, e) =>
            {
                OnItemSelectionChanged(_itemSelectionChangedEventArgs);
                _itemSelectionChangedEventArgs = null;
            };
            _selectedIndexChangedTimer.Tick += (sender, e) =>
            {
                OnSelectedIndexChanged(_selectedIndexChangedEventArgs);
                _selectedIndexChangedEventArgs = null;
            };

            //Activate double buffering
            SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);

            //Enable the OnNotifyMessage event so we get a chance to filter out
            // Windows messages before they get to the form's WndProc
            SetStyle(ControlStyles.EnableNotifyMessage, true);

            _sorter = new ListViewColumnSorter();
            ListViewItemSorter = _sorter;
            ColumnClick += ListViewNF_ColumnClick;
        }
        private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            //�ڵؿ�ͼ���ù�ϵ��
            IFeatureClass pFeatClass = pParcelFeatLayer.FeatureClass;
            IObjectClass pObjectClass = pFeatClass as IObjectClass;
            IEnumRelationshipClass pEnumRelationshipClass = pObjectClass.get_RelationshipClasses(esriRelRole.esriRelRoleOrigin);
            pEnumRelationshipClass.Reset();
            IRelationshipClass pRelationshipClass = pEnumRelationshipClass.Next();
            IRow pOwnerRow;
            IFeature pParcelFeature;
            AxMapControl axMap = pMainFrm.getMapControl();
            for (int i = 0; i <= pFeatArray.Count - 1; i++)
            {
                pParcelFeature = pFeatArray.get_Element(i) as IFeature;
                ISet pRelatedSet = pRelationshipClass.GetObjectsRelatedToObject(pParcelFeature);
                pRelatedSet.Reset();
                pOwnerRow = pRelatedSet.Next() as IRow;

                if (pOwnerRow != null)
                {

                    if (pOwnerRow.get_Value(pOwnerRow.Fields.FindField("TMK")).ToString() == e.Item.Text)
                    {
                        Utility.FlashFeature(pParcelFeature, axMap.ActiveView.FocusMap);
                        break;
                    }

                }
            }
        }
Example #8
0
 private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (listView1.SelectedItems.Count > 0){
         textBox2.Text = ((Test) listView1.SelectedItems[0].Tag).description;
         textBox1.Text = ((Test) listView1.SelectedItems[0].Tag).validation;
     }
 }
Example #9
0
 /// <summary>
 /// Beim klicken auf ein Item des ListView wird das angeklickte Item zurück gegeben
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void item_click(object sender,ListViewItemSelectionChangedEventArgs e)
 {
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
     movieid = int.Parse(e.Item.SubItems[1].Text);
     orgTitel = e.Item.SubItems[2].Text;
     this.Close();
 }
Example #10
0
      void TorrentList_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
      {
         if (SelectedItems.Count == 1)
         {
            SelectedItems[0].BackColor = Color.DeepSkyBlue;           

            if (_lastSelectedItem != null)
            {
               _lastSelectedItem.BackColor = Color.White;
            }
            
            _lastSelectedItem = SelectedItems[0];
         }
         
         foreach (ToolStripItem menu in ContextMenuStrip.Items)
         {
            if (SelectedItems.Count == 0)
            {
               menu.Enabled = menu.Text == "Add";
            }
            else
            {
               menu.Enabled = true;
            }
         }
      }
Example #11
0
 private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (listView1.SelectedItems.Count != 1)
         return;
     var line = listView1.SelectedItems[0];
     if (line.SubItems[1].Text == "META")
         return;
     StartTimeBox.Text = line.SubItems[1].Text;
     EndTimeBox.Text = line.SubItems[2].Text;
     DialogTextBox.Text = line.Text;
     ListViewItem LastLine = null, NextLine = null;
     if (listView1.SelectedIndices[0] > 0)
         LastLine = listView1.Items[listView1.SelectedIndices[0] - 1];
     if (listView1.SelectedIndices[0] < listView1.Items.Count - 1)
         NextLine = listView1.Items[listView1.SelectedIndices[0] + 1];
     audioPanel1.SetSubtitleLines(
         LastLine == null || LastLine.SubItems[1].Text == "META" ? null : new SubtitleLine
         {
             StartTime = MyTimeParse(LastLine.SubItems[1].Text),
             EndTime = MyTimeParse(LastLine.SubItems[2].Text),
             DialogText = StripTags(LastLine.Text)
         }, new SubtitleLine
         {
             StartTime = MyTimeParse(line.SubItems[1].Text),
             EndTime = MyTimeParse(line.SubItems[2].Text),
             DialogText = StripTags(line.Text)
         }, NextLine == null || NextLine.SubItems[1].Text == "META" ? null : new SubtitleLine
         {
             StartTime = MyTimeParse(NextLine.SubItems[1].Text),
             EndTime = MyTimeParse(NextLine.SubItems[2].Text),
             DialogText = StripTags(NextLine.Text)
         }
     );
 }
 private void ProductsListItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) {
     NativeMethods.SendMessage(
         NativeMethods.GetParent(NativeMethods.GetParent(NativeMethods.GetParent(Handle))),
         (uint)VSConstants.CPDN_SELCHANGED,
         IntPtr.Zero,
         Handle
     );
 }
Example #13
0
        void listViewMainBox_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            e.Item.ImageKey = minusSignKey;

            ListViewControl stats = new ListViewControl();

              //  listViewMainBox.Items.Add(stats);
        }
Example #14
0
 private void TreeControl_SelectedChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     var entity = (TreeControl.Selected as TreeNode).Tag as IBase;
     if (entity is PageScheme)
     {
         SelectedPage = entity as PageScheme;
     }
 }
Example #15
0
 private void leksykonNHListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     string commercialName = e.Item.Text;
     leksykonDescriptionLabel.Text = "Preparaty z grupy: " + commercialName;
     Leksykon_UpdateGrid(
         UnitOfWork.MedicineRepository.GetMedicinesByCommercialName(commercialName)
         );
 }
Example #16
0
 private void listViewFlightSessions_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.IsSelected)
     {
         last_selected_item = e.Item;
         btnOk.Enabled = true;
     }
 }
Example #17
0
 private void lst_devices_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (lst_devices.SelectedItems.Count != 0)
     {
         Scaner s = new Scaner(lst_devices.SelectedItems[0].Text, Scaner.StringToScanerType(lst_devices.SelectedItems[0].SubItems[1].Text), new WinFormsWindowMessageHook(this));
         _selectedscaner = s;
     }
 }
        private void ListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            var selected = ListView.SelectedItems;
            if (selected.Count == 0)
                return;

            ChosenBusinessDay = (DateTime)selected[0].Tag;
        }
Example #19
0
        private void olvProject_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (!e.IsSelected) return;

            var feature = (olvProject.SelectedItem != null) ?  olvProject.SelectedItem.RowObject as Feature : null;

            _state.Project.CurrentFeature = feature;
        }
Example #20
0
        private void leksykonFFListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            string producer = e.Item.Text;
            leksykonDescriptionLabel.Text = "Preparaty firmy: " + producer;

            Leksykon_UpdateGrid(
                UnitOfWork.MedicineRepository.GetMedicinesByProducerName(producer));
        }
Example #21
0
 private void TreeControl_SelectedChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     var entity = (TreeControl.Selected as TreeNode).Tag as IBase;
     if (entity is PageScheme)
     {
         rtbScripts.Text = String.Concat(CommonSeparator.PAGEHEAD, (entity as PageScheme).Id);
     }
 }
Example #22
0
        private void folderView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            e.Item.ImageIndex = e.IsSelected ? 1 : 0;

            if (e.Item.Selected)
                _presenter.FileViewAddFolder(e.Item.Text);
            else
                _presenter.FileViewRemoveFolder(e.Item.Text);
        }
 private void listViewVirtualEffects_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (listViewVirtualEffects.SelectedIndices.Count == 0) {
         buttonRemove.Enabled = false;
     }
     else {
         buttonRemove.Enabled = true;
     }
 }
Example #24
0
 private void lstDownloadedStocks_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     var key = e.Item.Text;
     var data = StockData[key];
     txtQuote.Text =
         string.Format(string.Format("Symbol: {0} - Ask {1} - Bid {2} @ {3}", data.Item1.Symbol, data.Item1.Ask ?? data.Item1.AskRealtime,
             data.Item1.Bid ?? data.Item1.BidRealtime, data.Item1.LastTradeDate));
     lstNews.Items.Clear();
     lstNews.Items.AddRange(data.Item2.Items.Select(x => new ListViewItem(string.Format("{0}: {1} - {2}", x.Author, x.Title, x.DatePublished))).ToArray());
 }
Example #25
0
 void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.IsSelected)
     {
         ColorDialog cd = new ColorDialog();
         cd.ShowDialog(this);
         e.Item.BackColor = cd.Color;
         lc.ChangeColorOfLed(e.ItemIndex, cd.Color);
     }
 }
 private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.IsSelected)
     {
         TreeNode node = (TreeNode)e.Item.Tag;
         WechatHistory.MainForm.SelectNode(node);
         this.Opacity = 0.3;
         this.TopMost = false;
     }
 }
Example #27
0
        /// <summary>
        /// Occurs when an item wants to be selected. 
        /// We allow selection only if the application is Supported
        /// </summary>
        private void appListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            // Ensure unsupported items cannot be selected
            OLVListItem item = (OLVListItem)e.Item;
            AppInstallInfo app = (AppInstallInfo)item.RowObject;

            if (!app.Supported && e.IsSelected) e.Item.Selected = false;

            // Depending on how many items are selected, we enable/disable the Export Selected button
            tsbExport.Enabled = ( appListView.SelectedItems.Count > 0 );
        }
Example #28
0
        private void lvwApplied_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (e.IsSelected)
            {
                PropertyApplied.SelectedObject = e.Item.Tag;

                cmdRemove.Enabled=true;
                _lastselitem = e.Item;

            }
        }
		/// <summary>
		/// Callback called when user has selected a new search result item</summary>
		/// <param name="e">Event arguments</param>
		protected override void OnItemSelectionChanged(ListViewItemSelectionChangedEventArgs e)
		{
			object tag = e.Item.Tag;
			if (m_contextRegistry != null)
			{
				ISelectionContext selectionContext = Adapters.As<ISelectionContext>(m_contextRegistry.ActiveContext);
				if (selectionContext != null)
					SelectionContexts.Set(selectionContext, tag);
			}
			base.OnItemSelectionChanged(e);
		}
Example #30
0
 private void fileListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.IsSelected == true)
     {
         Selected.Add(e.Item.SubItems[1].Text);
     }
     else
     {
         Selected.Remove(e.Item.SubItems[1].Text);
     }
 }