System.Windows.Forms.CurrencyManager.Refresh()

Here are the examples of the csharp api class System.Windows.Forms.CurrencyManager.Refresh() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

10 Examples 7

1. Example

Project: sharpshell
Source File: FileDialogPlacesEditor.cs
private void selectedPlaceProps_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
            {
                FileDialogPlaceBase place = (FileDialogPlaceBase)placesListBox.SelectedItem;
                ((CurrencyManager)placesListBox.BindingContext[m_places]).Refresh();

                bool multipleLines;
                ToolStripButton placeButton = (ToolStripButton)placesBar.Items[placesListBox.SelectedIndex];
                placeButton.Text = FileDialog.InsertLineBreaks(place.Text, out multipleLines);
                placeButton.Padding = new Padding(0, multipleLines ? 3 : 8, 0, multipleLines ? 0 : 8);
                if (e.ChangedItem.Label == "Path")
                    placeButton.Image = ShellImageList.GetImage(place.PIDL);
            }

2. Example

Project: Afterglow
Source File: MainForm.cs
internal void RefreshProfiles()
        {
            ((CurrencyManager)lbProfiles.BindingContext[lbProfiles.DataSource]).Refresh();
        }

3. Example

Project: ReClass.NET
Source File: LogForm.cs
private void RefreshDataBinding()
		{
			var cm = entriesDataGridView.BindingContext[items] as CurrencyManager;
			cm?.Refresh();
		}

4. Example

Project: WinLess
Source File: mainForm.cs
private void compileResultsDataGridView_DataChanged()
        {
            ((CurrencyManager)compileResultsDataGridView.BindingContext[compileResultsDataGridView.DataSource]).Refresh();
        }

5. Example

Project: revitpythonshell
Source File: ConfigureCommandsForm.cs
private void RefreshBindingContext(ListBox listBox, object dataSource)
        {
            ((CurrencyManager)listBox.BindingContext[dataSource]).Refresh();
        }

6. Example

Project: WinLess
Source File: mainForm.cs
private void foldersListBox_DataChanged()
        {
            ((CurrencyManager)foldersListBox.BindingContext[foldersListBox.DataSource]).Refresh();
            filesDataGridView_DataChanged();
        }

7. Example

Project: WinLess
Source File: mainForm.cs
private void filesDataGridView_DataChanged()
        {
            List<Models.File> files = (List<Models.File>)filesDataGridView.DataSource;
            files.Sort((x, y) => string.Compare(x.FullPath, y.FullPath));
            ((CurrencyManager)filesDataGridView.BindingContext[filesDataGridView.DataSource]).Refresh();
        }

8. Example

Project: sharpshell
Source File: FileDialogPlacesEditor.cs
private void AddPlace(FileDialogPlaceBase place)
            {
                m_places.Add(place);
                ((CurrencyManager)placesListBox.BindingContext[m_places]).Refresh();

                bool multipleLines;
                ToolStripButton placeButton = new ToolStripButton(FileDialog.InsertLineBreaks(place.Text, out multipleLines));
                placeButton.Image = ShellImageList.GetImage(place.PIDL);
                placeButton.ImageAlign = ContentAlignment.BottomCenter;
                placeButton.Margin = new Padding(1, 0, 0, 0);
                placeButton.Padding = new Padding(0, multipleLines ? 3 : 8, 0, multipleLines ? 0 : 8);
                placeButton.Tag = place;
                placeButton.TextImageRelation = TextImageRelation.ImageAboveText;
                placesBar.Items.Add(placeButton);

                placesListBox.ClearSelected();
                placesListBox.SelectedIndex = placesListBox.Items.Count - 1;
            }

9. Example

Project: sharpshell
Source File: FileDialogPlacesEditor.cs
private void MovePlace(int fromIndex, int toIndex)
            {
                FileDialogPlaceBase place = (FileDialogPlaceBase)placesListBox.Items[fromIndex];
                ToolStripItem placeButton = placesBar.Items[fromIndex];

                m_places.RemoveAt(fromIndex);
                placesBar.Items.RemoveAt(fromIndex);

                m_places.Insert(toIndex, place);
                placesBar.Items.Insert(toIndex, placeButton);

                ((CurrencyManager)placesListBox.BindingContext[m_places]).Refresh();
            }

10. Example

Project: sharpshell
Source File: FileDialogPlacesEditor.cs
private void RemovePlace(int index)
            {
                m_places.RemoveAt(index);
                placesBar.Items.RemoveAt(index);

                ((CurrencyManager)placesListBox.BindingContext[m_places]).Refresh();

                if (placesListBox.Items.Count > 0)
                {
                    placesListBox.ClearSelected();
                    index = Math.Max(0, Math.Min(index, placesListBox.Items.Count - 1));
                    placesListBox.SelectedIndex = index;
                }
            }