当前位置: 首页>>代码示例>>C#>>正文


C# System.Collections.ObjectModel.ObservableCollection.Insert方法代码示例

本文整理汇总了C#中System.Collections.ObjectModel.ObservableCollection.Insert方法的典型用法代码示例。如果您正苦于以下问题:C# System.Collections.ObjectModel.ObservableCollection.Insert方法的具体用法?C# System.Collections.ObjectModel.ObservableCollection.Insert怎么用?C# System.Collections.ObjectModel.ObservableCollection.Insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Collections.ObjectModel.ObservableCollection的用法示例。


在下文中一共展示了System.Collections.ObjectModel.ObservableCollection.Insert方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GroupEditorDialog

        public GroupEditorDialog(Common.SignalGroup group)
        {
            InitializeComponent();

            RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems();
            System.Collections.ObjectModel.ObservableCollection<RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection<WPFCommon.BrushSelectionHolder>(colors);
            colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null));
            cbGroupColor.ItemsSource = colorList;
            
            _group = group;
            SetupForCurrentGroup();
        }
开发者ID:JoeGilkey,项目名称:RadioLog,代码行数:12,代码来源:GroupEditorDialog.xaml.cs

示例2: StreamSourceEditorDialog

        public StreamSourceEditorDialog(RadioLog.Common.SignalSource src)
        {
            if (src == null)
                throw new ArgumentNullException();

            InitializeComponent();

            _src = src;

            RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems();
            System.Collections.ObjectModel.ObservableCollection<RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection<WPFCommon.BrushSelectionHolder>(colors);
            colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null));
            cbSourceColor.ItemsSource = colorList;
            if (string.IsNullOrEmpty(_src.SourceColor))
                cbSourceColor.SelectedIndex = 0;
            else
                cbSourceColor.SelectedValue = _src.SourceColor;

            tbSourceName.Text = _src.SourceName;
            tbStreamURL.Text = _src.SourceLocation;
            sRecordingKickTime.Value = _src.RecordingKickTime;
            tsRecordingEnabled.IsChecked = _src.RecordAudio;
            tsPriority.IsChecked = _src.IsPriority;
            cbDecodeMDC1200.IsChecked = _src.DecodeMDC1200;
            cbDecodeGEStar.IsChecked = _src.DecodeGEStar;
            cbDecodeFleetSync.IsChecked = _src.DecodeFleetSync;
            cbRemoveNoise.IsChecked = _src.RemoveNoise;
            sDisplayOrder.Value = _src.DisplayOrder;

            LoadDeviceLists();
            cbNoiseFloor.ItemsSource = _noiseFloorList;
            cbNoiseFloor.SelectedValue = _src.NoiseFloor;
            sCustomNoiseFloor.Value = _src.CustomNoiseFloor;
            cbWaveOutDev.ItemsSource = _waveOutList;
            if (_waveOutList.Count > 0 && !string.IsNullOrWhiteSpace(_src.WaveOutDeviceName))
            {
                cbWaveOutDev.SelectedItem = (_waveOutList.FirstOrDefault(l => l.DeviceName == _src.WaveOutDeviceName));
            }
            if (string.IsNullOrWhiteSpace(_src.WaveOutDeviceName) || cbWaveOutDev.SelectedIndex < 0)
            {
                cbWaveOutDev.SelectedIndex = 0;
            }

            switch (_src.RecordingType)
            {
                case Common.SignalRecordingType.Fixed: cbRecordingStyle.SelectedIndex = 1; break;
                default: cbRecordingStyle.SelectedIndex = 0; break;
            }
            UpdateForSelectedRecordingStyle();

            DisplayQRCode(_src.SourceLocation);
        }
开发者ID:JoeGilkey,项目名称:RadioLog,代码行数:52,代码来源:StreamSourceEditorDialog.xaml.cs

示例3: NewSourceDialog

        public NewSourceDialog()
        {
            InitializeComponent();

            LoadDeviceLists();
            cbMultiLineIn.ItemsSource = _channelList;
            cbGroup.ItemsSource = GetMainViewModel().SignalGroups;
            cbGroup.SelectedValue = Guid.Empty;
            cbGroup.IsEnabled = Common.AppSettings.Instance.UseGroups;

            _initDone = true;

            if (_channelList.Count > 0)
            {
                cbMultiLineIn.SelectedIndex = 0;
                rbLineIn.IsEnabled = true;
            }
            else
            {
                rbLineIn.IsEnabled = false;
            }

            RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems();
            System.Collections.ObjectModel.ObservableCollection<RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection<WPFCommon.BrushSelectionHolder>(colors);
            colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null));
            cbSourceColor.ItemsSource = colorList;
            cbSourceColor.SelectedIndex = 0;
            sDisplayOrder.Value = 10;

            SelectedSourceType = Common.SignalingSourceType.Streaming;

            if (Clipboard.ContainsText(TextDataFormat.Html))
            {
                string strUrl = Clipboard.GetText(TextDataFormat.Html);
                if (!string.IsNullOrWhiteSpace(strUrl))
                {
                    strUrl = strUrl.Trim();
                    if (strUrl.EndsWith(".m3u", StringComparison.InvariantCultureIgnoreCase))
                    {
                        tbStreamURL.Text = strUrl;
                    }
                }
            }
        }
开发者ID:JoeGilkey,项目名称:RadioLog,代码行数:44,代码来源:NewSourceDialog.xaml.cs

示例4: AddColorSelectionCombo

        protected void AddColorSelectionCombo(string itemKey, string itemTitle)
        {
            RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems();
            System.Collections.ObjectModel.ObservableCollection<RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection<WPFCommon.BrushSelectionHolder>(colors);
            colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null));

            ResponderApps.EditorDisplay.ComboBoxEditorItem cbColor = new ResponderApps.EditorDisplay.ComboBoxEditorItem(itemKey, itemTitle);
            cbColor.ItemsSource = colorList;
            cbColor.DisplayMemberPath = "BrushName";
            cbColor.SelectedValuePath = "BrushKey";
            cbColor.SelectedIndex = 0;
            this.editControl.AddEditorItem(cbColor);
        }
开发者ID:JoeGilkey,项目名称:RadioLog,代码行数:13,代码来源:BaseEditDisplayWindow.xaml.cs


注:本文中的System.Collections.ObjectModel.ObservableCollection.Insert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。