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

C# Title类代码示例

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

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



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

示例1: CreateTitles

        //int filmno;
        public void CreateTitles()
        {
            Console.WriteLine("Creating titles");
            totalfilms = 100;
            totaltvprograms = 100;
            seriesperprogram = 5;
            episodesperseries = 8;

            // Test to create a title withou type specified
            Title ttt1 = new Title();
            ttt1.Name = "Test without titletype";
            TitleCollectionManager.AddTitle(ttt1);

            Title ttmovies = new Title();
            ttmovies.Name = "Movies";
            ttmovies.TitleType = TitleTypes.Collection | TitleTypes.Root;
            TitleCollectionManager.AddTitle(ttmovies);

            Title tttv = new Title();
            tttv.Name = "TV";
            tttv.TitleType = TitleTypes.TVShow | TitleTypes.Root;
            TitleCollectionManager.AddTitle(tttv);

            for (int i = 0; i < totalfilms; i++)
            {
                CreateFilm(ttmovies.Id, i);
            }

            for (int i = 0; i < totaltvprograms; i++)
            {
                CreateTVProgram(tttv.Id, i);
            }
            Console.WriteLine("Job Done. Press enter");
            Console.ReadKey();
        }
开发者ID:peeboo,项目名称:open-media-library,代码行数:36,代码来源:CreateTestTitles.cs


示例2: AD2LoadContent

 protected override void AD2LoadContent()
 {
     //The State starts in the title.
     GameState = State.Title;
     //Load the title.
     T = new Title();
 }
开发者ID:CorruptData,项目名称:Breakout,代码行数:7,代码来源:Breakout.cs


示例3: SiteExportBuilder

 //--- Constructors ---
 public SiteExportBuilder(Title relToTitle) {
     _uris = new Dictionary<XUri, object>();
     _id = 0;
     _requestDoc = new XDoc("requests");
     _manifestDoc = new XDoc("manifest");
     _relToTitle = relToTitle;
 }
开发者ID:StackableRegiments,项目名称:metl2011,代码行数:8,代码来源:SiteExportBuilder.cs


示例4: PutTitle

        public IHttpActionResult PutTitle(int id, Title title)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != title.Id)
            {
                return BadRequest();
            }


            try
            {
                _TitleService.Update(title);
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TitleExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
开发者ID:DureSameen,项目名称:RoomReservation2,代码行数:31,代码来源:TitlesController.cs


示例5: MainMenu

        public MainMenu(string titleId)
        {
            InitializeComponent();

            buttonPlay.Click += new RoutedEventHandler(buttonPlay_Click);
            buttonRate.Click += new RoutedEventHandler(buttonRate_Click);
            buttonQueue.Click += new RoutedEventHandler(buttonQueue_Click);

            buttonGoBack.Click += new RoutedEventHandler(buttonGoBack_Click);
            buttonSearch.Click += new RoutedEventHandler(buttonSearch_Click);
            buttonExit.Click += new RoutedEventHandler(buttonExit_Click);

            if (string.IsNullOrWhiteSpace(titleId))
            {
                buttonPlay.Opacity = 0.5;
                buttonPlay.IsEnabled = false;

                buttonQueue.Opacity = 0.5;
                buttonQueue.IsEnabled = false;

                buttonRate.Opacity = 0.5;
                buttonRate.IsEnabled = false;

                buttonGoBack.Focus();
            }
            else
            {
                buttonPlay.Focus();

                currentTitle = QuikPixCore.Current.GetTitle(titleId);
            }
        }
开发者ID:ebouwsema,项目名称:quikpix,代码行数:32,代码来源:MainMenu.xaml.cs


示例6: initHeightPlot

        protected void initHeightPlot()
        {
            if (cmc == null) { cmc = new CommomMethodsClass(PersonInfo); }

            List<Double> hVal = new List<Double>();
            List<DateTime> dts = new List<DateTime>();
            List<Height> heights = cmc.GetValues<Height>(Height.TypeId);
            if (heights != null)
            {
                for (int i = 0; i < heights.Count; i++)
                {
                    hVal.Add(heights[i].Value.DisplayValue.Value);
                    dts.Add(heights[i].When.ToDateTime());
                }
            }

            Title chartTitle1 = new Title();
            chartTitle1.Text = "Height in Inches";
            hgraph.Titles.Add(chartTitle1);

            Series series4 = new Series("Spline1");
            series4.ChartType = SeriesChartType.Spline;
            series4.Points.DataBindXY(dts, hVal);
            series4.IsValueShownAsLabel = true;
            hgraph.Series.Add(series4);

            //hide grid lines
            hgraph.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
            hgraph.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false;
        }
开发者ID:bidwej,项目名称:GTHealthInformatics,代码行数:30,代码来源:myKidPage.aspx.cs


示例7: CreateHistoryFile

		private void CreateHistoryFile( Title c )
		{
			string filePath;
			FileInfo titleFile;
			Log( " --" + c.TitleID + " History Cleared" );
			filePath = Path.Combine( m_options.Data.MyDocsDir.FullName, m_options.Mod.Path );
			filePath = Path.Combine( filePath, "history/titles" );
			filePath = Path.Combine( filePath, c.TitleID + ".txt" ).Replace( '\\', '/' );

			titleFile = new FileInfo( filePath );
			StreamWriter writ = new StreamWriter( titleFile.Open( FileMode.Create, FileAccess.Write ),
												  Encoding.GetEncoding( 1252 ) );

			//if ( !c.TitleID.StartsWith( "c_" ) )
			//{													 
			//	writ.WriteLine("1.1.1={");

			//	if( c.TitleID.StartsWith( "d_" ) )
			//		writ.WriteLine( "\tde_jure_liege=k_null_title" );
			//	else
			//		writ.WriteLine( "\tde_jure_liege=0" );

			//	writ.WriteLine("}");
			//}

			writ.Dispose();
		}
开发者ID:Measter,项目名称:TitleGenerator,代码行数:27,代码来源:ClearHistoryShared.cs


示例8: ConvertToViewModel

        public static EmployeeViewModel ConvertToViewModel(this Employee employee, Department department, Employee manager, Salary salary, Title title)
        {
            var employeeViewModel = new EmployeeViewModel
            {
                BirthDate = employee.BirthDate.Value.ToShortDateString(),
                CurrentManager = string.Empty,
                Id = employee.PersistenceId.ToString(),
                FirstName = employee.FirstName,
                Gender = employee.Gender.DisplayName,
                HireDate = employee.HireDate.Value.ToShortDateString(),
                LastName = employee.LastName,
            };

            if (manager != null)
            {
                employeeViewModel.CurrentManager = manager.FirstName + " " + manager.LastName;
            }

            if (department != null)
            {
                employeeViewModel.CurrentDepartment = department.Name;
            }
            if (salary != null)
            {
                employeeViewModel.CurrentSalary = salary.Amount.ToString();
            }
            if (title != null)
            {
                employeeViewModel.CurrentTitle = title.Name;
            }

            return employeeViewModel;
        }
开发者ID:Cooker2007,项目名称:EmployeeManagementSystem,代码行数:33,代码来源:ConversionHelper.cs


示例9: CreateChart

        public Chart CreateChart(string title ,  List<string> xData , Dictionary<string ,List<int>>yData ,int width , int height , string xTitle = "null" , string yTitle = "null" ,int backgroundColor = 0x9fc5e8)
        {
            Chart chart = new Chart();

            if (!Show3DStyle)
            {
                chart.Width = width;
                chart.Height = height;
                chart.RenderType = RenderType.ImageTag;
                chart.Palette = ChartColorPalette.BrightPastel;
                Title t = new Title(title, Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), Color.FromArgb(23,33,24));
                chart.Titles.Add(t);
                chart.ChartAreas.Add("Series 1");
                if (xTitle != "null")
                {
                    chart.ChartAreas["Series 1"].AxisX.Title = xTitle;
                }
                if (yTitle != "null")
                {
                    chart.ChartAreas["Series 1"].AxisY.Title = yTitle;
                }
                chart.ChartAreas["Series 1"].BackColor = Color.FromArgb((backgroundColor+0x64000000));
                chart.ChartAreas["Series 1"].AxisX.MajorGrid.LineWidth = 0;
                foreach(var item in yData)
                {
                    string column = item.Key;
                    chart.Series.Add(column);
                    switch (SheetType)
                    {
                        case ChartType.Column:
                            chart.Series[column].ChartType = SeriesChartType.Column;
                            break;
                        case ChartType.Line:
                            chart.Series[column].ChartType = SeriesChartType.Line;
                            break;
                        case ChartType.Pie:
                            chart.Series[column].ChartType = SeriesChartType.Pie;
                            break;
                        default:
                            break;
                    }
                    chart.Series[column].Points.DataBindXY(xData, item.Value);
                    chart.Series[column].Label = "#VAL";
                }
                chart.BorderSkin.SkinStyle = BorderSkinStyle.None;
                //chart.BorderlineWidth = 2;
                //chart.BorderlineColor = System.Drawing.Color.Gray;
                //chart.BorderColor = System.Drawing.Color.Red;
                chart.BorderlineDashStyle = ChartDashStyle.NotSet;
                chart.BorderWidth = 2;
                chart.Legends.Add("Legend1");

                return chart;
            }
            else
            {
                return chart;
            }
        }
开发者ID:MrJiang724,项目名称:Product-Management-System,代码行数:59,代码来源:SheetHelper.cs


示例10: CollectionItem

        public CollectionItem(Title title, IModelItem owner)
            : base(owner)
        {
            this._titleObj = title;
            //this.InternalMovieItem = new Library.MovieItem(title, null);

            this.ItemType = 0;
            if(OMLEngine.Settings.OMLSettings.ShowUnwatchedIcon)
                this.OverlayContentTemplate = "resx://Library/Library.Resources/V3_Controls_BrowseGalleryItem#UnwatchedOverlay";
            if (this._titleObj.WatchedCount == 0)
                this.isUnwatched = true;

            DateTime releaseDate = Convert.ToDateTime(_titleObj.ReleaseDate.ToString("MMMM dd, yyyy"));// new DateTime(2000, 1, 1);
            //invalid dates
            if (releaseDate.Year != 1 && releaseDate.Year != 1900)
                this.MetadataTop = releaseDate.Year.ToString();
            else
                this.MetadataTop = "";

            this.ItemId = 1;
            string starRating = Convert.ToString(Math.Round((Convert.ToDouble(_titleObj.UserStarRating.HasValue ? _titleObj.UserStarRating.Value : 0) * 0.8), MidpointRounding.AwayFromZero));
            this.StarRating = starRating;
            string extendedMetadata = string.Empty;

            this.SortName = title.SortName;

            //this.Metadata = this.InternalMovieItem.Rating.Replace("PG13", "PG-13").Replace("NC17", "NC-17");
            this.Metadata = _titleObj.ParentalRating;
            if (string.IsNullOrEmpty(_titleObj.ParentalRating))
                this.Metadata = "Not Rated";
            if (_titleObj.Runtime.ToString() != "0")
                this.Metadata += string.Format(", {0} minutes", _titleObj.Runtime.ToString());
            this.Tagline = _titleObj.Synopsis;

            this.Description = title.Name;

            //TODO: not sure how to read this yet...
            //temporarially disabled due to bug in eagerloading
            //this.SimpleVideoFormat = _titleObj.VideoFormat.ToString();

            this.Invoked += delegate(object sender, EventArgs args)
            {
                //stub details for CollectionItem
                CollectionPage page = new CollectionPage(this);
                OMLProperties properties = new OMLProperties();
                properties.Add("Application", OMLApplication.Current);
                //properties.Add("UISettings", new UISettings());
                //properties.Add("Settings", new Settings());
                properties.Add("I18n", I18n.Instance);
                //v3 main gallery
                //Library.Code.V3.GalleryPage gallery = new Library.Code.V3.GalleryPage(new List<OMLEngine.TitleFilter>(), "OML");
                ////description
                //gallery.Description = "OML";
                Command CommandContextPopOverlay = new Command();
                properties.Add("CommandContextPopOverlay", CommandContextPopOverlay);
                properties.Add("Page", page);
                OMLApplication.Current.Session.GoToPage(@"resx://Library/Library.Resources/V3_GalleryPage", properties);
            };
        }
开发者ID:peeboo,项目名称:open-media-library,代码行数:59,代码来源:CollectionItem.cs


示例11: CreateFilm

 public void CreateFilm(int parent, int no)
 {
     Title tt = new Title();
     tt.Name = "Film " + no.ToString();
     tt.TitleType = TitleTypes.Movie;
     tt.ParentTitleId = parent;
     TitleCollectionManager.AddTitle(tt);
 }
开发者ID:peeboo,项目名称:open-media-library,代码行数:8,代码来源:CreateTestTitles.cs


示例12: UserOptions

 public UserOptions(Folding foldingMode, Title titleMode, 
     bool moveToNewForder, string secondDirPath)
 {
     FoldingMode = foldingMode;
     TitleMode = titleMode;
     MoveToNewFolder = moveToNewForder;
     SecondDirPath = secondDirPath;
 }
开发者ID:CandyOgre,项目名称:MusicPerfectizr,代码行数:8,代码来源:UserOptions.cs


示例13: OpenFlashChart

 public OpenFlashChart()
 {
     title = new Title("Chart Title");
     Elements = new List<ChartBase>();
     //x_axis = new XAxis();
     //y_axis= new YAxis();
     //y_axis_right = new YAxis();
 }
开发者ID:reyrahadian,项目名称:PFM,代码行数:8,代码来源:OpenFlashChart.cs


示例14: CreateTVEpisode

 public void CreateTVEpisode(int parent, int programno, int seriesno, int episodeno)
 {
     Title tt = new Title();
     tt.Name = "TV P" + programno.ToString() + " S" + seriesno.ToString() + " E" + episodeno.ToString();
     tt.TitleType = TitleTypes.Episode;
     tt.ParentTitleId = parent;
     TitleCollectionManager.AddTitle(tt);
 }
开发者ID:peeboo,项目名称:open-media-library,代码行数:8,代码来源:CreateTestTitles.cs


示例15: Index

 //
 // GET: /Title/
 public ActionResult Index(Title title)
 {
     using (TitlesEntities dbContext = new TitlesEntities())
     {
         Title model = dbContext.Titles.Where(t => t.TitleId == title.TitleId).FirstOrDefault();
         return View(model);
     }
 }
开发者ID:kimamo,项目名称:TBS,代码行数:10,代码来源:TitleController.cs


示例16: EnumHelper_Parse_ReturnsCorrectEnum

        public void EnumHelper_Parse_ReturnsCorrectEnum(string value, Title title)
        {
            //act
            var result = EnumHelper<Title>.Parse(value);

            //assert
            result.Should().Be(title);
        }
开发者ID:letmeproperty,项目名称:Applications,代码行数:8,代码来源:EnumHelper_TestFixture.cs


示例17: MiniTitleDisplayItem

        public MiniTitleDisplayItem(Title title)
        {
            if (title == null)
                throw new ArgumentNullException("title");

            this.BoxArt = title.BoxArtSmall;
            this.Title = title.RegularTitle;
        }
开发者ID:ebouwsema,项目名称:quikpix,代码行数:8,代码来源:MiniTitleDisplayItem.cs


示例18: LoadDisk

 public void LoadDisk(Title title, Disk disk)
 {
     _currentDisk = disk;
     _currentTitle = title;
     if (disk == null)
         diskSource.DataSource = typeof(Disk);
     else
         diskSource.DataSource = _currentDisk;
 }
开发者ID:peeboo,项目名称:open-media-library,代码行数:9,代码来源:DiskEditorCtrl.cs


示例19: SaveJobTitle

        private void SaveJobTitle()
        {
            Title item = new Title();
            item.Name = tbxName.Text.Trim();
            item.Remark = tbxRemark.Text.Trim();

            DB.Titles.Add(item);
            DB.SaveChanges();
        }
开发者ID:jonneyfan,项目名称:nleaps,代码行数:9,代码来源:title_new.aspx.cs


示例20: CreatPieChart

        public static ChartControl CreatPieChart(SolidColorBrush forecolor, string ChartTitle, List<ChartDataChartCommonData> dtchart)
        {
            mausac = 0;
            ChartControl abc = new ChartControl();
            SimpleDiagram2D dg1 = new SimpleDiagram2D();
            //liabc.Titles.Clear();
            //Tao Tile cho Chart
            Title nt = new Title();
            nt.Content = ChartTitle;
            nt.Foreground = forecolor;
            abc.Titles.Add(nt);
            //Tinh so Series
            List<string> countsr = (from p in dtchart group p by p.Series into g select g.Key).ToList();
            //Creat Diagram
            abc.Diagram = dg1;
            GridControl dtl = new GridControl();
            for (int i = 0; i < countsr.Count; i++)
            {
                PieSeries2D dgs1 = new PieSeries2D();
                dgs1.HoleRadiusPercent = 0;//Thiet lap khoang trong tu tam hinh tron den duong tron
                dgs1.ArgumentScaleType = ScaleType.Auto;
                foreach (ChartDataChartCommonData dr in dtchart)//Tao cac point
                {
                    if (dr.Series == countsr.ElementAt(i))
                    {
                        //Tao Series
                        SeriesPoint sr1 = new SeriesPoint();
                        sr1.Argument = dr.Agrument + ":" + dr.Value.ToString();
                        sr1.Value = dr.Value;
                        sr1.Tag = mausac.ToString();
                        dgs1.Points.Add(sr1);
                        mausac++;
                    }
                }
                dgs1.Label = new SeriesLabel();//Tao Label cho Diagram
                PieSeries.SetLabelPosition(dgs1.Label, PieLabelPosition.TwoColumns);
                dgs1.Label.RenderMode = LabelRenderMode.RectangleConnectedToCenter;
                dgs1.LabelsVisibility = true;//Hien thi Lablel cho tung vung
                PointOptions pn1 = new PointOptions();
                pn1.PointView = PointView.ArgumentAndValues;
                pn1.Pattern = "{A} ({V})";//Tao mau chu thich
                NumericOptions nbm1 = new NumericOptions();//Tao Kieu hien thi
                nbm1.Format = NumericFormat.Percent;
                pn1.ValueNumericOptions = nbm1;
                PieSeries2D.SetPercentOptions(pn1, new PercentOptions() { ValueAsPercent = true, PercentageAccuracy = 5 });//Quy dinh ty le phan tram chinh xac
                dgs1.PointOptions = pn1;
                dg1.Series.Add(dgs1);
                //Tao chu thich
                dgs1.LegendPointOptions = pn1;

            }
            abc.Legend = new Legend();
            //End tao chu thich
            //Set mau sac cho seriespont
            abc.CustomDrawSeriesPoint += abc_CustomDrawSeriesPoint;
            return abc;
        }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:57,代码来源:CommonChart.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# TitleInfo类代码示例发布时间:2022-05-24
下一篇:
C# TipoArquivo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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