• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Documents.List类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Documents.List的典型用法代码示例。如果您正苦于以下问题:C# List类的具体用法?C# List怎么用?C# List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



List类属于System.Windows.Documents命名空间,在下文中一共展示了List类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RouteDetailsPanoramaPage

        public RouteDetailsPanoramaPage()
        {
            InitializeComponent();

            pins = new List<Pushpin>();

            var clusterer = new PushpinClusterer(map1, pins, this.Resources["ClusterTemplate"] as DataTemplate);

            SystemTray.SetIsVisible(this, true);

            if (watcher == null)
            {
                //---get the highest accuracy---
                watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High)
                {
                    //---the minimum distance (in meters) to travel before the next
                    // location update---
                    MovementThreshold = 10
                };

                //---event to fire when a new position is obtained---
                watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(watcher_PositionChanged);

                //---event to fire when there is a status change in the location
                // service API---
                watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_StatusChanged);
                watcher.Start();

                map1.Center = new GeoCoordinate(58.383333, 26.716667);
                map1.ZoomLevel = 15;
                map1.Mode = new MyMapMode();
            }
        }
开发者ID:madisp,项目名称:Omnibuss,代码行数:33,代码来源:RouteDetailsPanoramaPage.xaml.cs


示例2: DashboardView

        public DashboardView()
        {
            InitializeComponent();

            AndonManager = new AndonManager(StationList, null, Andonmanager.AndonManager.MODE.MASTER);

            AndonManager.start();
            StationList = new Queue<int>();

            Plans = new Plans();
            PlanGrid.DataContext = Plans;

            Actuals = new Models.Actuals();
            ActualGrid.DataContext = Actuals;

            AppTimer = new Timer(1000);
            AppTimer.AutoReset = false;
            AppTimer.Elapsed += AppTimer_Elapsed;

            EfficiencyWatch = new Stopwatch();

            using (PSBContext DBContext = new PSBContext())
            {

                Shifts = DBContext.Shifts.ToList();

                foreach (Shift s in Shifts)
                {
                    s.Update();
                }

            }

            AppTimer.Start();
        }
开发者ID:JugaadSolutions,项目名称:ProductionScoreBoard,代码行数:35,代码来源:DashboardView.xaml.cs


示例3: Parse

        protected override List<CodeLexem> Parse(SourcePart text)
        {
            var list = new List<CodeLexem>();

            while (text.Length > 0)
            {
                var lenght = text.Length;

                TryExtract(list, ref text, ByteOrderMark);
                TryExtract(list, ref text, "[", LexemType.Symbol);
                TryExtract(list, ref text, "{", LexemType.Symbol);

                if (TryExtract(list, ref text, "\"", LexemType.Quotes))
                {
                    ParseJsonPropertyName(list, ref text); // Extract Name
                    TryExtract(list, ref text, "\"", LexemType.Quotes);
                    TryExtract(list, ref text, ":", LexemType.Symbol);
                    TrySpace(list, ref text);
                    TryExtractValue(list, ref text); // Extract Value
                }

                ParseSymbol(list, ref text); // Parse extras
                TrySpace(list, ref text);
                TryExtract(list, ref text, "\r\n", LexemType.LineBreak);
                TryExtract(list, ref text, "\n", LexemType.LineBreak);
                TryExtract(list, ref text, "}", LexemType.Symbol);
                TryExtract(list, ref text, "]", LexemType.Symbol);

                if (lenght == text.Length)
                    break;
            }

            return list;
        }
开发者ID:4lx,项目名称:Profiler,代码行数:34,代码来源:JsonParser.cs


示例4: btnVector3D_Click

        /// <summary>
        /// Tests for Vector3D class
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnVector3D_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
            watch.Start();

            txtVector3D.Text = "Starting test suite for the Vektor3D class.\r\n\r\n";

            // Sample data
            List<Eksam.Vektor3D> vectors = new List<Vektor3D>{
                new Vektor3D(),
                new Vektor3D(1,1,1),
                new Vektor3D(0,-1,0),
                new Vektor3D(2.2, 1.2, 3.1),
                new Vektor3D(10,4,3),
                null
            };

            // Go over all defined operations and input combinations
            foreach (Vektor3D vector in vectors)
            {
                foreach (Vektor3D secondVector in vectors)
                {
                    txtVector3D.Text += vector + " + " + secondVector + " = " + (vector + secondVector) + "\r\n";
                    txtVector3D.Text += vector + " - " + secondVector + " = " + (vector - secondVector) + "\r\n";
                    txtVector3D.Text += vector + " == " + secondVector + " ... " + (vector == secondVector) + "\r\n";
                    txtVector3D.Text += vector + vector + " (length " + (vector == null ? 0 : vector.Length()) + ") > " + secondVector + " (length " + (secondVector == null ? 0 : secondVector.Length()) + ")" + " ... " + (vector > secondVector) + "\r\n";
                    txtVector3D.Text += vector + vector + " (length " + (vector == null ? 0 : vector.Length()) + ") < " + secondVector + " (length " + (secondVector == null ? 0 : secondVector.Length()) + ")" + " ... " + (vector < secondVector) + "\r\n";
                }
            }

            watch.Stop();
            double elapsed = watch.ElapsedMilliseconds;
            txtVector3D.Text += "\r\nTest suite finished, time elapsed: " + elapsed + "ms.";
        }
开发者ID:anroots,项目名称:ITK-projects,代码行数:39,代码来源:MainWindow.xaml.cs


示例5: GenerateRules

        public List<IPrimitiveConditionData> GenerateRules(List<TouchPoint2> points)
        {
            List<IPrimitiveConditionData> result = new List<IPrimitiveConditionData>();
            TouchTime ruleData = new TouchTime();

            ruleData.Unit = "secs";
            foreach (TouchPoint2 point in points)
            {
                if (point.Action == TouchAction.Move)
                {
                    if (point.Tag == null) {
                        if (point.isFinger)
                        {
                            double length = TrigonometricCalculationHelper.CalculatePathLength(point);
                            if (length >= 5)
                                continue;
                        }

                    }
                    ruleData.Value = point.Age.Seconds;
                    result.Add(ruleData);
                }

            }

            return result;
        }
开发者ID:tuliosouza,项目名称:ASG,代码行数:27,代码来源:TouchTimeValidator.cs


示例6: BindFeatures

        private void BindFeatures(List<HalanVersionInfo> products)
        {
            foreach( HalanVersionInfo inf in products ) {

            string v = inf.LatestVersion.ToString(2);

            Paragraph para = new Paragraph();
            para.Inlines.Add(new Bold(new Run(string.Format("{0} v{1}", inf.Product, v))));

            if( inf.ReleaseDate > DateTime.MinValue )
              para.Inlines.Add( new Run(string.Concat(", Released: ", inf.ReleaseDate.ToShortDateString())) );

            tbFeatures.Document.Blocks.Add(para);

            var list = new System.Windows.Documents.List();

            foreach( var f in inf.Features )
              list.ListItems.Add( new ListItem(new Paragraph(new Run(f))) );

            tbFeatures.Document.Blocks.Add(list);

            if( !_url.IsValid() )
              _url = inf.Url;
              }
        }
开发者ID:rmueller,项目名称:ServiceBusMQManager,代码行数:25,代码来源:NewVersionDialog.xaml.cs


示例7: EditAlat

        public EditAlat(Alat alat)
        {
            InitializeComponent();
            this.alat = alat;

            status = new List<KV>();
            status.Add(new KV("Baik", 1));
            status.Add(new KV("Rusak", 0));
            comboBox_Status.ItemsSource = status;
            comboBox_Status.DisplayMemberPath = "Key";
            comboBox_Status.SelectedValuePath = "Value";
            comboBox_Status.SelectedValue = (alat.KondisiAlat) ? 1 : 0;

            textbox_Laboratorium.Text = alat.Lokasi;

            string query = "SELECT * FROM master_inventory_type";
            using (MySqlCommand cmd = new MySqlCommand(query, db.ConnectionManager.Connection)) {
                try {
                    DataTable dataSet = new DataTable();
                    using (MySqlDataAdapter dataAdapter = new MySqlDataAdapter(cmd)) {
                        dataAdapter.Fill(dataSet);
                        comboBox_Jenis_Barang.ItemsSource = dataSet.DefaultView;
                        comboBox_Jenis_Barang.DisplayMemberPath = dataSet.Columns["nama"].ToString();
                        comboBox_Jenis_Barang.SelectedValuePath = dataSet.Columns["id"].ToString();
                        comboBox_Jenis_Barang.SelectedValue = alat.IdJenis;
                    }
                }
                catch (MySql.Data.MySqlClient.MySqlException ex) {
                    MessageBox.Show(ex.Message);
                }
            }
        }
开发者ID:squilliams,项目名称:inventralalab,代码行数:32,代码来源:EditAlat.xaml.cs


示例8: GetSymbolResourceDictionaryEntriesAsync

        public override void GetSymbolResourceDictionaryEntriesAsync(GeometryType geometryType, object userState)
        {
            if (m_symbolResourceDictionaries != null)
            {
                List<SymbolResourceDictionaryEntry> resourceDictionaries = new List<SymbolResourceDictionaryEntry>();
                foreach (SymbolResourceDictionaryEntry entry in m_symbolResourceDictionaries)
                {
                    if (entry.GeometryType == geometryType || (entry.GeometryType == GeometryType.Point && geometryType == GeometryType.MultiPoint))
                        resourceDictionaries.Add(entry);
                }
                OnGetResourceDictionariesCompleted(new GetSymbolResourceDictionaryEntriesCompletedEventArgs() { SymbolResourceDictionaries = resourceDictionaries, UserState = userState });
                return;
            }

            #region Validation
            if (ConfigFileUrl == null)
            {
                base.OnGetResourceDictionariesFailed(new ExceptionEventArgs(Resources.Strings.ExceptionConfigFileUrlMustBeSpecified, userState));
                return;
            }

            if (SymbolFolderParentUrl == null)
            {
                base.OnGetResourceDictionariesFailed(new ExceptionEventArgs(Resources.Strings.ExceptionSymbolFolderParentUrlMustBeSpecified, userState));
                return;
            }
            #endregion

            getSymbolResourceDictionaryEntries(geometryType, userState, (o, e) => {                
                OnGetResourceDictionariesCompleted(e);
            }, (o, e) => {
                    OnGetResourceDictionariesFailed(e);
            });
        }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:34,代码来源:FileSymbolConfigProvider.cs


示例9: SignatureWindow

        public SignatureWindow(string signature)
        {
            var digitalSignatureCollection = new List<object>();
            digitalSignatureCollection.Add(new ComboBoxItem() { Content = "" });
            digitalSignatureCollection.AddRange(Settings.Instance.Global_DigitalSignatureCollection.Select(n => new DigitalSignatureComboBoxItem(n)).ToArray());

            InitializeComponent();

            {
                var icon = new BitmapImage();

                icon.BeginInit();
                icon.StreamSource = new FileStream(Path.Combine(App.DirectoryPaths["Icons"], "Amoeba.ico"), FileMode.Open, FileAccess.Read, FileShare.Read);
                icon.EndInit();
                if (icon.CanFreeze) icon.Freeze();

                this.Icon = icon;
            }

            _signatureComboBox.ItemsSource = digitalSignatureCollection;

            for (int index = 0; index < Settings.Instance.Global_DigitalSignatureCollection.Count; index++)
            {
                if (Settings.Instance.Global_DigitalSignatureCollection[index].ToString() == signature)
                {
                    _signatureComboBox.SelectedIndex = index + 1;

                    break;
                }
            }
        }
开发者ID:networkelements,项目名称:Amoeba,代码行数:31,代码来源:SignatureWindow.xaml.cs


示例10: BindFeatures

        private void BindFeatures(List<HalanVersionInfo> products)
        {
            foreach( HalanVersionInfo inf in products ) {

            string title = string.Format("{0} {1}.{2:D2}", inf.Product.Replace("ServiceBusMQManager", "Service Bus MQ Manager"),
                                                        inf.LatestVersion.Major, inf.LatestVersion.Minor);

            Paragraph para = new Paragraph();
            para.Inlines.Add(new Bold(
                               new Run(title) { FontSize = 19 } ));

            if( inf.ReleaseDate > DateTime.MinValue )
              para.Inlines.Add( new Run(string.Concat(", Released: ", inf.ReleaseDate.ToShortDateString())) );

            tbFeatures.Document.Blocks.Add(para);

            var list = new System.Windows.Documents.List();

            foreach( var f in inf.Features )
              list.ListItems.Add( new ListItem(new Paragraph(new Run(f))) );

            tbFeatures.Document.Blocks.Add(list);

            if( !_url.IsValid() )
              _url = inf.Url;
              }
        }
开发者ID:thirkcircus,项目名称:ServiceBusMQManager,代码行数:27,代码来源:NewVersionDialog.xaml.cs


示例11: EditForm_Saving

        /// <summary>
        /// 保存单据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void EditForm_Saving(object sender, SavingEventArgs e)
        {
            List<string> msgs = new List<string>();
            T_FB_SUMSETTINGSMASTER entCurr = this.OrderEntity.Entity as T_FB_SUMSETTINGSMASTER;
            entCurr.CHECKSTATES = 0;
            entCurr.EDITSTATES = 1;
            
            if (string.IsNullOrWhiteSpace(entCurr.OWNERID) || string.IsNullOrWhiteSpace(entCurr.OWNERNAME))
            {
                msgs.Add("汇总人不能为空");
                e.Action = Actions.Cancel;
                CommonFunction.ShowErrorMessage(msgs);
                return;
            }

            ObservableCollection<FBEntity> details = this.OrderEntity.GetRelationFBEntities(typeof(T_FB_SUMSETTINGSDETAIL).Name);

            ObservableCollection<FBEntity> list0 = new ObservableCollection<FBEntity>();
          
            //明细为为0的不能提交
            if (details.ToList().Count <= 1)
            {
                msgs.Add("预算汇总设置中添加的公司至少超过一家");
            }
            if (msgs.Count > 0)
            {
                e.Action = Actions.Cancel;
                CommonFunction.ShowErrorMessage(msgs);
            }
        }
开发者ID:JuRogn,项目名称:OA,代码行数:35,代码来源:SumSettingsForm.cs


示例12: MainWindow

 public MainWindow()
 {
     InitializeComponent();
     IniMyStuff();
     txtToday.Text = DateTime.Today.ToShortDateString();
     mitatut = new List<MittausData>();
 }
开发者ID:MikPak,项目名称:IIO11300,代码行数:7,代码来源:MainWindow.xaml.cs


示例13: WPF_Graph

 public WPF_Graph()
 {
     InitializeComponent();
     if (null == VValue)
         VValue = new List<string>();
     this.Loaded += WPF_Graph_Loaded;
 }
开发者ID:zhi81048486,项目名称:DoWorkSource,代码行数:7,代码来源:WPF_Graph.xaml.cs


示例14: MainWindow

        /* Constructor
         *
         * Initializes the window and calls the data provider to initialize
         * airports lists. Creates the autocomplete boxes. In case the connection
         * to the database is unavailable, displays an information and exits.
         */
        public MainWindow()
        {
            SplashScreen splash = new SplashScreen("SplashScreen.png");
            splash.Show(true);
            InitializeComponent();
            try
            {
                EtosPRODataProvider provider = new EtosPRODataProvider(this);
                airportsFullList = provider.GetFullAirportsList();
                airportCodes = provider.GetAirportsCodesList();

                SearchDepartureBox = new AutoCompleteBox();
                SearchDepartureBox.FilterMode = AutoCompleteFilterMode.Contains;
                SearchDepartureBox.ItemsSource = airportsFullList;
                SearchDeparturePanel.Children.Add(SearchDepartureBox);

                SearchArrivalBox = new AutoCompleteBox();
                SearchArrivalBox.FilterMode = AutoCompleteFilterMode.Contains;
                SearchArrivalBox.ItemsSource = airportsFullList;
                SearchArrivalPanel.Children.Add(SearchArrivalBox);
            }
            catch (SqlException e)
            {
                splash.Close(TimeSpan.Zero);
                ErrorWindow error = new ErrorWindow("Could not connect to the server! The application will exit.\n\n" +
                                                    "Verify your connection or contact the developers.");
                error.Show();
                this.Hide();
            }
            splash.Close(TimeSpan.FromSeconds(1));
        }
开发者ID:mehulsbhatt,项目名称:etospro,代码行数:37,代码来源:MainWindow.xaml.cs


示例15: Convert

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var htmlText = value as string;
            if (string.IsNullOrWhiteSpace(htmlText))
                return value;

            var splits = Regex.Split(htmlText, "<a ");
            var result = new List<Inline>();
            foreach (var split in splits)
            {
                if (!split.StartsWith("href=\""))
                {
                    result.AddRange(FormatText(split));
                    continue;
                }

                var match = Regex.Match(split, "^href=\"(?<url>(.+?))\" class=\".+?\">(?<text>(.*?))</a>(?<content>(.*?))$", RegexOptions.Singleline);
                if (!match.Success)
                {
                    result.Add(new Run(split));
                    continue;
                }
                var hyperlink = new Hyperlink(new Run(match.Groups["text"].Value))
                {
                    NavigateUri = new Uri(match.Groups["url"].Value)
                };
                hyperlink.RequestNavigate += Hyperlink_RequestNavigate;
                result.Add(hyperlink);

                result.AddRange(FormatText(match.Groups["content"].Value));
            }
            return result;
        }
开发者ID:caesay,项目名称:Hurricane,代码行数:33,代码来源:HtmlToInlinesConverter.cs


示例16: Rotation

 public Rotation() { } // here for XML deserialization
 public Rotation(string name, string filler, string execute, params string[] priorities)
 {
     Name = name;
     Filler = filler;
     Execute = execute;
     SpellPriority = new List<string>(priorities);
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:8,代码来源:Rotation.cs


示例17: MainWindow

        public MainWindow()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            InitializeComponent();

            DateTime lastDate = new DateTime(2011, 11, 15);
            double lastVal = 20;

            List<ChartDataObject> dataSouce = new List<ChartDataObject>();
            for (int i = 0; i < 5; ++i)
            {
                ChartDataObject obj = new ChartDataObject { Date = lastDate.AddMonths(1), Value = lastVal++ };
                dataSouce.Add(obj);
                lastDate = obj.Date;
            }
            LineSeries series = (LineSeries)this.chart1.Series[0];
            series.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Date" };
            series.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Value" };
            series.ItemsSource = dataSouce;

            series = (LineSeries)this.chart2.Series[0];
            series.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Date" };
            series.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Value" };
            series.ItemsSource = dataSouce;
        }
开发者ID:jigjosh,项目名称:xaml-sdk,代码行数:25,代码来源:MainWindow.xaml.cs


示例18: ConnectorCreationAdorner

 public ConnectorCreationAdorner(UIElement adornedElement, List<Point> linkPoints)
     : base(adornedElement)
 {
     Debug.Assert(adornedElement != null, "adornedElement is null");
     this.IsHitTestVisible = false;
     this.linkPoints = linkPoints;
 }
开发者ID:xiluo,项目名称:document-management,代码行数:7,代码来源:ConnectorCreationAdorner.cs


示例19: btnChangeLanguage_Click

        void btnChangeLanguage_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Window wdw = Window.GetWindow(this);

                wdw.Cursor = Cursors.Wait;
                List<JMMServerBinary.Contract_TvDBLanguage> lans = JMMServerVM.Instance.clientBinaryHTTP.GetTvDBLanguages();
                List<TvDB_LanguageVM> languages = new List<TvDB_LanguageVM>();
                foreach (JMMServerBinary.Contract_TvDBLanguage lan in lans)
                    languages.Add(new TvDB_LanguageVM(lan));
                wdw.Cursor = Cursors.Arrow;

                SelectTvDBLanguage frm = new SelectTvDBLanguage();
                frm.Owner = wdw;
                frm.Init(languages);
                bool? result = frm.ShowDialog();
                if (result.Value)
                {
                    // update info
                    JMMServerVM.Instance.TvDB_Language = frm.SelectedLanguage;
                    JMMServerVM.Instance.SaveServerSettingsAsync();
                }
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
开发者ID:scorpioncoder,项目名称:jmmclient,代码行数:29,代码来源:TvDBSettings.xaml.cs


示例20: StartNewGame

        public void StartNewGame(bool isFirstGame)
        {
            NextLevel = 1;
            if (!isFirstGame)
            {
                bw.Dispose();
                bw2.Dispose();
            }
            Pathing = new Pathing();
            Money = new Money();
            Level = new Level();
            myCreeps = new Creeps();
            Player = new Player();
            Money.CashChange += Source_CashChange;
            Player.LifeChange += Source_LifeChange;
            DisplayMoney = 1000;
            DisplayLives = 5;
            NextLevel = 1;
            ReadyForNextLevel = true;
            AllTowers = new List<Tower>();
            CurrentLevel = 0;

            // Listener for change money
            myCreeps.CreepDied += myCreeps_CreepDied;
        }
开发者ID:psionicpotato,项目名称:Tower-Defense-Mayhem,代码行数:25,代码来源:MainWindow.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Documents.Paragraph类代码示例发布时间:2022-05-26
下一篇:
C# Documents.Inline类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap