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


C# Title类代码示例

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


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


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