static void Main(string[] args) { int wallWidth; int wallHeight; int wallLenght; int widthRoll; int lenghtRoll; decimal Between; decimal Final; decimal Calculate; ////Student First Name and Surname willl be enter here Console.WriteLine("Please Enter Your Name :"); string userName = Console.ReadLine(); Console.WriteLine("Welcome To Vatebra Academy , "); Console.WriteLine("{0} The Current Time Test Start is {1}", userName, System.DateTime.Now.TimeOfDay); ///// We will be calculating the class wall Console.WriteLine("Q1: Please Enter the Lenght of Class Wall : "); wallLenght = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Q2: Please Enter the Width of Class Wall : "); wallWidth = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Q3: Please Enter the Height of Class Wall : "); wallHeight = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Q4: Please Enter the Width of the Roll : "); widthRoll = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Q5: Please Enter the Lenght of the Roll : "); lenghtRoll = Convert.ToInt32(Console.ReadLine()); /////The Result of the class wall Calculate = (wallWidth * wallHeight) + (wallLenght * wallHeight); Between = (widthRoll * lenghtRoll); Final = Calculate / Between; Console.WriteLine("The Answer is {0} : ", Final.ToString()); Console.WriteLine("Press Any Key to Submit"); Console.ReadKey(); }
/// <summary> /// Busca os conteúdos (objetos e layers de animação) de um arquivo e guarda-os no banco. /// </summary> /// <param name="final">Estrutura, Objetos e Conexões do arquivo inserido</param> /// <param name="file">Instância da Entidade já adicionada ao banco</param> private void SaveContentsForFile(Final final, Files file) { //Desativa conexão com todos os objetos foreach (var con in final.Connections.Where(d => d != null && d.Child != null && d.Parent != null && d.Parent.UID == "0")) { ToggleChildNodes(con, false, final.Connections); } //Ativa cada objeto, salva os dados necessários no banco, desativa o objeto foreach (var con in final.Connections.Where(d => d != null && d.Child != null && d.Parent != null && d.Parent.UID == "0")) { db.ImageContents.Add(new ImageContents() { Id = Guid.NewGuid().ToString(), ContentType = db.ContentType.First(d => d.Name == "Object"), Name = con.Child.Class, File = file, Image = GetImageFromLayer(final, con, final.Connections) }); ToggleChildNodes(con, false, final.Connections); } foreach (var con in final.Connections.Where(d => d != null && d.Child != null && d.Child.MainClass == "AnimationLayer" && d.Child.Class != "BaseLayer")) { var prop70 = con.Child.RelatedNode.Properties.First(d => d.Name == "Properties70").Value as Node; if (prop70.Properties.Any(d => (d.Value as List <string>).Contains("\"Mute\"") && (d.Value as List <string>).Contains("\"bool\"") && (d.Value as List <string>).Contains("1"))) { continue; } db.ImageContents.Add(new ImageContents() { Id = Guid.NewGuid().ToString(), ContentType = db.ContentType.First(d => d.Name == "Animmation"), Name = con.Child.Class, File = file, }); } }
private void Execute_add(object o) { try { Final temp = new Final(); temp.Date = Convert.ToDateTime(date); temp.Money = Convert.ToInt32(price); temp.Product = select_item_product; temp.ProductID = select_item_product.ID; temp.Specific = specification; temp.Person = myProfile; temp.PersonID = myProfile.ID; temp.Type = type; myDB.Finals.Add(temp); myDB.SaveChanges(); Add(); }catch (Exception e) { OpenMessege(e.Message, "Error"); } }
public Initial Generate() { var initial = new Initial { Name = "ServiceMatrix Guidance", }; var guidanceaction = new GuidanceAction { Name = "ServiceMatrix Online Documentation", Link = "http://docs.particular.net/servicematrix/" }; initial.ConnectTo(guidanceaction); var final = new Final { Name = "Final", }; guidanceaction.ConnectTo(final); return(initial); }
async Task <bool> IsFinalized(TInstance instance) { State <TInstance> currentState = await this.GetState(instance).ConfigureAwait(false); return(Final.Equals(currentState)); }
public GrammaticalBasisesFinalResults(Final.GrammaticalBasis.Algorithms.GrammaticalBasises source) { All = source; _helperData = new GrammaticalBasisesHelperData(); }
public override string ToString() => Final.ToString() + " " + Currency;
public override Pose Calculate() { Final.Calculate(); return(Final.value); }
private static string GetYngPingHokchewFinal(Final final, Tone tone) { switch (tone) { // 紧 case Tone.UpLevel: case Tone.UpUp: case Tone.DownLevel: switch (final) { case Final.Ung: return("ung"); case Final.Ua: return("ua"); case Final.Yong: return("yong"); case Final.Iu: return("iu"); case Final.Ang: return("ang"); case Final.Ai: return("ai"); case Final.A: return("a"); case Final.Ing: return("ing"); case Final.Uang: return("uang"); case Final.O: return("o"); case Final.Y: return("y"); case Final.Uoi: return("ui"); case Final.U: return("u"); case Final.Eing: return("eing"); case Final.Uong: return("uong"); case Final.Ui: return("ui"); case Final.Ieu: return("iu"); case Final.Yng: return("yng"); case Final.Ong: return("oung"); case Final.I: return("i"); case Final.Oeng: return("eoyng"); case Final.Au: return("au"); case Final.Uo: return("uo"); case Final.E: return("e"); case Final.Io: return("yo"); case Final.Ie: return("ie"); case Final.Iang: return("iang"); case Final.Oey: return("eoy"); case Final.Oe: return("eo"); case Final.Ieng: return("ieng"); case Final.Ia: return("ia"); case Final.Uai: return("uai"); case Final.Eu: return("eu"); } throw new Exception("The impossible happened"); // 紧入 case Tone.DownAbrupt: switch (final) { case Final.Ung: return("uk"); case Final.Ua: return("uah"); case Final.Yong: return("yok"); case Final.Iu: return("iuh"); case Final.Ang: return("ak"); case Final.Ai: return("aih"); case Final.A: return("ah"); case Final.Ing: return("ik"); case Final.Uang: return("uak"); case Final.O: return("oh"); case Final.Y: return("yh"); case Final.Uoi: return("uih"); case Final.U: return("uh"); case Final.Eing: return("eik"); case Final.Uong: return("uok"); case Final.Ui: return("uih"); case Final.Ieu: return("iuh"); case Final.Yng: return("yk"); case Final.Ong: return("ouk"); case Final.I: return("ih"); case Final.Oeng: return("eoyk"); case Final.Au: return("auh"); case Final.Uo: return("uoh"); case Final.E: return("eh"); case Final.Io: return("yoh"); case Final.Ie: return("ieh"); case Final.Iang: return("iak"); case Final.Oey: return("eoyh"); case Final.Oe: return("eoh"); case Final.Ieng: return("iek"); case Final.Ia: return("ieh"); case Final.Uai: return("uaih"); case Final.Eu: return("euh"); } throw new Exception("The impossible happened"); // 松 case Tone.UpFalling: case Tone.DownFalling: switch (final) { case Final.Ung: return("oung"); case Final.Ua: return("ua"); case Final.Yong: return("yong"); case Final.Iu: return("iu"); case Final.Ang: return("ang"); case Final.Ai: return("ai"); case Final.A: return("a"); case Final.Ing: return("eing"); case Final.Uang: return("uang"); case Final.O: return("oo"); case Final.Y: return("eoy"); case Final.Uoi: return("ui"); case Final.U: return("ou"); case Final.Eing: return("aing"); case Final.Uong: return("uong"); case Final.Ui: return("ui"); case Final.Ieu: return("iu"); case Final.Yng: return("eoyng"); case Final.Ong: return("ooung"); case Final.I: return("ei"); case Final.Oeng: return("ooyng"); case Final.Au: return("au"); case Final.Uo: return("uo"); case Final.E: return("a"); case Final.Io: return("yo"); case Final.Ie: return("ie"); case Final.Iang: return("iang"); case Final.Oey: return("ooy"); case Final.Oe: return("oo"); case Final.Ieng: return("ieng"); case Final.Ia: return("ia"); case Final.Uai: return("uai"); case Final.Eu: return("au"); } throw new Exception("The impossible happened"); // 松入 case Tone.UpAbrupt: switch (final) { case Final.Ung: return("ouk"); case Final.Ua: return("uah"); case Final.Yong: return("yok"); case Final.Iu: return("iuh"); case Final.Ang: return("ak"); case Final.Ai: return("aih"); case Final.A: return("ah"); case Final.Ing: return("eik"); case Final.Uang: return("uak"); case Final.O: return("ooh"); case Final.Y: return("eoyh"); case Final.Uoi: return("uih"); case Final.U: return("ouh"); case Final.Eing: return("aik"); case Final.Uong: return("uok"); case Final.Ui: return("uih"); case Final.Ieu: return("iuh"); case Final.Yng: return("eoyk"); case Final.Ong: return("oouk"); case Final.I: return("eih"); case Final.Oeng: return("ooyk"); case Final.Au: return("auh"); case Final.Uo: return("uoh"); case Final.E: return("ah"); case Final.Io: return("yoh"); case Final.Ie: return("ieh"); case Final.Iang: return("iak"); case Final.Oey: return("ooyh"); case Final.Oe: return("ooh"); case Final.Ieng: return("iek"); case Final.Ia: return("ieh"); case Final.Uai: return("uaih"); case Final.Eu: return("auh"); } throw new Exception("The impossible happened"); } throw new Exception("The impossible happened"); }
public IHttpActionResult CalculateFinalResults() { //Get Current Week? //------------------------------------ var weekId = db.Week.First().Week_Id; //for each already existing item in finals table, we need to create more rows for the next week var previousWeek = weekId - 1; var FinalsForAddtionalRows = db.Finals.Where(x => x.Week == previousWeek).ToList(); FinalsForAddtionalRows.ForEach(x => { Final newFinalRow = new Final(); //newFinalRow.Week = weekId; newFinalRow.PropResult = 0.00M; newFinalRow.KingResult = 0.00M; newFinalRow.WeekTotal = 0.00M; newFinalRow.TeamName = x.TeamName; newFinalRow.YearTotal = x.YearTotal; db.Finals.Add(newFinalRow); }); db.SaveChanges(); /////////////////////////////////////////////////////////////////////////////////// // Calculate Prop Results /////////////////////////////////////////////////////////////////////////////////// //reset back down to 0 first, because i dont want to have multiple clicks f**k things var resultsList = db.Results.Where(x => x.Week == weekId).ToList(); resultsList.ForEach(x => { x.Points1 = 0; x.Points2 = 0; x.Points3 = 0; x.WeekTotal = 0; }); //Go get the right answers INDEXEES ARE F****D FIX ON DB var answer1 = db.Prop.Where(x => x.Week == weekId && x.Id == 1).FirstOrDefault().Answer; var answer2 = db.Prop.Where(x => x.Week == weekId && x.Id == 2).FirstOrDefault().Answer; var answer3 = db.Prop.Where(x => x.Week == weekId && x.Id == 3).FirstOrDefault().Answer; //Go get how many people answered the right question var answer1count = db.Results.Where(x => x.PropBet1 == answer1 && x.Week == weekId).Count(); var answer2count = db.Results.Where(x => x.PropBet2 == answer2 && x.Week == weekId).Count(); var answer3count = db.Results.Where(x => x.PropBet3 == answer3 && x.Week == weekId).Count(); //Take the total count for the answer / 100 decimal answer1Points = 100.00M; decimal answer2Points = 100.00M; decimal answer3Points = 100.00M; if (answer1count > 0) { answer1Points = decimal.Divide(100.00M, answer1count); } if (answer2count > 0) { answer2Points = decimal.Divide(100.00M, answer2count); } if (answer3count > 0) { answer3Points = decimal.Divide(100.00M, answer3count); } //Todo, iterate over each team in the results and see if they answered the right question, if so give them the amount of points var correctTeamsForAnswer1 = db.Results.Where(x => x.PropBet1 == answer1 && x.Week == weekId).ToList(); var correctTeamsForAnswer2 = db.Results.Where(x => x.PropBet2 == answer2 && x.Week == weekId).ToList(); var correctTeamsForAnswer3 = db.Results.Where(x => x.PropBet3 == answer3 && x.Week == weekId).ToList(); correctTeamsForAnswer1.ForEach(x => x.Points1 = answer1Points); correctTeamsForAnswer2.ForEach(x => x.Points2 = answer2Points); correctTeamsForAnswer3.ForEach(x => x.Points3 = answer3Points); var resultsToEdit = db.Results.Where(x => x.Week == weekId).ToList(); resultsToEdit.ForEach(x => x.WeekTotal = x.Points1 + x.Points2 + x.Points3); //save it first so we can access it next db.SaveChanges(); /////////////////////////////////////////////////////////////////////////////////// // Calculate King Results /////////////////////////////////////////////////////////////////////////////////// //Go get the right answers //var answerItem = db.KingAnswers.Where(x => x.Week == weekId).FirstOrDefault(); var answerItem = db.KingAnswers.FirstOrDefault(); //get the right answers from the db var kingAnswer1 = answerItem.Answer1; var kingAnswer2 = answerItem.Answer2; var kingAnswer3 = answerItem.Answer3; //store answers in a list for a .contains where lookup, any other way to do this? List <string> answersList = new List <string>(); answersList.Add(kingAnswer1); answersList.Add(kingAnswer2); answersList.Add(kingAnswer3); //how many people got the right answers var answerCount1 = db.KingResults.Where(x => answersList.Contains(x.Pick1) && x.Week == weekId).Count(); var answerCount2 = db.KingResults.Where(x => answersList.Contains(x.Pick2) && x.Week == weekId).Count(); var answerCount3 = db.KingResults.Where(x => answersList.Contains(x.Pick3) && x.Week == weekId).Count(); var correctTeams = db.KingResults.Where(x => answersList.Contains(x.Pick1) && answersList.Contains(x.Pick2) && answersList.Contains(x.Pick3) && x.Week == weekId).ToList(); var correctTeamCount = db.KingResults.Where(x => answersList.Contains(x.Pick1) && answersList.Contains(x.Pick2) && answersList.Contains(x.Pick3) && x.Week == weekId).Count(); //Kings is worth 200 decimal kingPoints = 200.00M; if (correctTeamCount > 0) { kingPoints = 200.00M / correctTeamCount; } correctTeams.ForEach(x => x.WeekTotal = kingPoints); //save the database db.SaveChanges(); /////////////////////////////////////////////////////////////////////////////////// // Calculate Final On-going Results /////////////////////////////////////////////////////////////////////////////////// //props var resultsForFinals = db.Results.Where(x => x.Week == weekId).ToList(); var finalsCached = db.Finals.Where(x => x.Week == weekId).ToList(); //for each prop result, get weekly total and add it to the f*****g FINAL class resultsForFinals.ForEach(x => { var finalItem = finalsCached.Where(y => y.TeamName == x.TeamName).First(); finalItem.PropResult = x.WeekTotal; }); //kings var kingsList = db.KingResults.Where(x => x.Week == weekId).ToList(); kingsList.ForEach(x => { var finalItem = finalsCached.Where(y => y.TeamName == x.TeamName).First(); finalItem.KingResult = x.WeekTotal; }); //save db.SaveChanges(); //then do it again and save to the ongoing total var finalsList = db.Finals.Where(x => x.Week == weekId).ToList(); finalsList.ForEach(x => { x.WeekTotal = x.KingResult + x.PropResult; }); db.SaveChanges(); finalsList.ForEach(x => { x.YearTotal = x.YearTotal + x.WeekTotal; }); db.SaveChanges(); return(Ok("Success yo")); }
protected override void OnInitialize() { base.OnInitialize(); this.Name = "GuidanceWorkflow"; var initial1 = new Initial { Name = "Solution Builder Guidance", }; this.ConnectTo(initial1); var fork2 = new Fork { Name = "First Time Users", Description = "These topics are aimed at the first time users of Solution Builder.", }; initial1.ConnectTo(fork2); var fork3 = new Fork { Name = "Understanding", Description = "This section helps you understand what Solution Builder is, what Pattern Toolkits are, why they are useful, and who should use them.", }; fork2.ConnectTo(fork3); var guidanceaction4 = new GuidanceAction { Name = "What is Solution Builder?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisSolutionBuilder.mht", }; fork3.ConnectTo(guidanceaction4); var fork5 = new Fork { Name = "Using Pattern Toolkits", }; guidanceaction4.ConnectTo(fork5); var guidanceaction6 = new GuidanceAction { Name = "Pre-requisites for Using Pattern Toolkits", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/PrerequisitesforUsingPatternToolkits.mht", }; fork5.ConnectTo(guidanceaction6); var guidanceaction7 = new GuidanceAction { Name = "Installing a Pattern Toolkit", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/InstallingaPatternToolkit.mht", }; guidanceaction6.ConnectTo(guidanceaction7); var guidanceaction8 = new GuidanceAction { Name = "Browsing & Managing Installed Pattern Toolkits", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/BrowsingManagingInstalledPatternToolkits.mht", }; guidanceaction7.ConnectTo(guidanceaction8); var guidanceaction9 = new GuidanceAction { Name = "Using Pattern Toolkits", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/UsingPatternToolkits.mht", }; guidanceaction8.ConnectTo(guidanceaction9); var guidanceaction10 = new GuidanceAction { Name = "Viewing & Configuring Solution Elements ", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/ViewingConfiguringSolutionElements.mht", }; guidanceaction9.ConnectTo(guidanceaction10); var guidanceaction11 = new GuidanceAction { Name = "Running Automation", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/RunningAutomation.mht", }; guidanceaction10.ConnectTo(guidanceaction11); var join12 = new Join { Name = "Join1", }; guidanceaction11.ConnectTo(join12); var join13 = new Join { Name = "Join2", }; join12.ConnectTo(join13); var fork14 = new Fork { Name = "Concepts", }; join13.ConnectTo(fork14); var guidanceaction15 = new GuidanceAction { Name = "What are Patterns?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatarePatterns.mht", }; fork14.ConnectTo(guidanceaction15); var guidanceaction16 = new GuidanceAction { Name = "What are Pattern Toolkits?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatarePatternToolkits.mht", }; guidanceaction15.ConnectTo(guidanceaction16); var guidanceaction17 = new GuidanceAction { Name = "What is a Solution Element?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisaSolutionElement.mht", }; guidanceaction16.ConnectTo(guidanceaction17); var guidanceaction18 = new GuidanceAction { Name = "What are Related Items?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatareRelatedItems.mht", }; guidanceaction17.ConnectTo(guidanceaction18); var fork19 = new Fork { Name = "Guidance", }; guidanceaction18.ConnectTo(fork19); var guidanceaction20 = new GuidanceAction { Name = "What is Guidance?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisGuidance.mht", }; fork19.ConnectTo(guidanceaction20); var guidanceaction21 = new GuidanceAction { Name = "What is a Guidance Workflow?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisaGuidanceWorkflow.mht", }; guidanceaction20.ConnectTo(guidanceaction21); var guidanceaction22 = new GuidanceAction { Name = "What is a Guidance Document?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisaGuidanceDocument.mht", }; guidanceaction21.ConnectTo(guidanceaction22); var guidanceaction23 = new GuidanceAction { Name = "What is the Guidance Explorer?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatistheGuidanceExplorer.mht", }; guidanceaction22.ConnectTo(guidanceaction23); var guidanceaction24 = new GuidanceAction { Name = "What is the Guidance Browser?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatistheGuidanceBrowser.mht", }; guidanceaction23.ConnectTo(guidanceaction24); var join25 = new Join { Name = "Join3", }; guidanceaction24.ConnectTo(join25); var fork26 = new Fork { Name = "Automation", }; join25.ConnectTo(fork26); var guidanceaction27 = new GuidanceAction { Name = "What is Automation?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatisAutomation.mht", }; fork26.ConnectTo(guidanceaction27); var guidanceaction28 = new GuidanceAction { Name = "What are Artifact Links?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/WhatareArtifactLinks.mht", }; guidanceaction27.ConnectTo(guidanceaction28); var join29 = new Join { Name = "Join4", }; guidanceaction28.ConnectTo(join29); var join30 = new Join { Name = "Join5", }; join29.ConnectTo(join30); var join31 = new Join { Name = "Join6", }; join30.ConnectTo(join31); var fork32 = new Fork { Name = "How To: Guides", Description = "The ‘How To’ guides provide background information, tips and instructions for performing the most common activities with the Solution Builder tool window.", }; join31.ConnectTo(fork32); var fork33 = new Fork { Name = "Using", Description = "Installing and developing solutions with pattern toolkits using Solution Builder.", }; fork32.ConnectTo(fork33); var guidanceaction34 = new GuidanceAction { Name = "Understanding: What are Pattern Toolkits?", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/UnderstandingWhatarePatternToolkits.mht", }; fork33.ConnectTo(guidanceaction34); var guidanceaction35 = new GuidanceAction { Name = "How To: Install/Uninstall Pattern Toolkits", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToInstallUninstallPatternToolkits.mht", }; guidanceaction34.ConnectTo(guidanceaction35); var guidanceaction36 = new GuidanceAction { Name = "How To: Use a Pattern", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToUseaPattern.mht", }; guidanceaction35.ConnectTo(guidanceaction36); var guidanceaction37 = new GuidanceAction { Name = "How To: Add New Solution Elements", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToAddNewSolutionElements.mht", }; guidanceaction36.ConnectTo(guidanceaction37); var guidanceaction38 = new GuidanceAction { Name = "How To: Control the display of Solution Elements", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToControlthedisplayofSolutionElements.mht", }; guidanceaction37.ConnectTo(guidanceaction38); var guidanceaction39 = new GuidanceAction { Name = "How To: Work with Multiple Views", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToWorkwithMultipleViews.mht", }; guidanceaction38.ConnectTo(guidanceaction39); var guidanceaction40 = new GuidanceAction { Name = "How To: Find the Guidance", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToFindtheGuidance.mht", }; guidanceaction39.ConnectTo(guidanceaction40); var guidanceaction41 = new GuidanceAction { Name = "How To: Run Automation", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToRunAutomation.mht", }; guidanceaction40.ConnectTo(guidanceaction41); var guidanceaction42 = new GuidanceAction { Name = "How To: Use Drag and Drop", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToUseDragandDrop.mht", }; guidanceaction41.ConnectTo(guidanceaction42); var guidanceaction43 = new GuidanceAction { Name = "How To: Navigate to or Open Solution Items", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToNavigatetoorOpenSolutionItems.mht", }; guidanceaction42.ConnectTo(guidanceaction43); var guidanceaction44 = new GuidanceAction { Name = "How To: Validate Solution Elements", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToValidateSolutionElements.mht", }; guidanceaction43.ConnectTo(guidanceaction44); var guidanceaction45 = new GuidanceAction { Name = "How To: Fix Related Items", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToFixRelatedItems.mht", }; guidanceaction44.ConnectTo(guidanceaction45); var guidanceaction46 = new GuidanceAction { Name = "How To: Troubleshoot Pattern Problems", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/HowToTroubleshootPatternProblems.mht", }; guidanceaction45.ConnectTo(guidanceaction46); var join47 = new Join { Name = "Join7", }; guidanceaction46.ConnectTo(join47); var guidanceaction48 = new GuidanceAction { Name = "Authoring", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/Authoring.mht", }; join47.ConnectTo(guidanceaction48); var join49 = new Join { Name = "Join8", }; guidanceaction48.ConnectTo(join49); var fork50 = new Fork { Name = "Reference", }; join49.ConnectTo(fork50); var guidanceaction51 = new GuidanceAction { Name = "Troubleshooting Toolkits", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/TroubleshootingToolkits.mht", }; fork50.ConnectTo(guidanceaction51); var fork52 = new Fork { Name = "Environment", Description = "The development and tooling environment for using, authoring and customizing Pattern Toolkits.", }; guidanceaction51.ConnectTo(fork52); var guidanceaction53 = new GuidanceAction { Name = "Visual Studio Experimental Instance", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/VisualStudioExperimentalInstance.mht", }; fork52.ConnectTo(guidanceaction53); var guidanceaction54 = new GuidanceAction { Name = "Solution Builder", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/SolutionBuilder.mht", }; guidanceaction53.ConnectTo(guidanceaction54); var guidanceaction55 = new GuidanceAction { Name = "Add New Solution Element Dialog", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/AddNewSolutionElementDialog.mht", }; guidanceaction54.ConnectTo(guidanceaction55); var guidanceaction56 = new GuidanceAction { Name = "Pattern Model Designer", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/PatternModelDesigner.mht", }; guidanceaction55.ConnectTo(guidanceaction56); var guidanceaction57 = new GuidanceAction { Name = "Guidance Workflow Explorer", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/GuidanceWorkflowExplorer.mht", }; guidanceaction56.ConnectTo(guidanceaction57); var guidanceaction58 = new GuidanceAction { Name = "Solution Explorer", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/SolutionExplorer.mht", }; guidanceaction57.ConnectTo(guidanceaction58); var guidanceaction59 = new GuidanceAction { Name = "Properties Window", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/PropertiesWindow.mht", }; guidanceaction58.ConnectTo(guidanceaction59); var guidanceaction60 = new GuidanceAction { Name = "Add/New Project/Item Dialog", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/AddNewProjectItemDialog.mht", }; guidanceaction59.ConnectTo(guidanceaction60); var guidanceaction61 = new GuidanceAction { Name = "Extension Manager", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/ExtensionManager.mht", }; guidanceaction60.ConnectTo(guidanceaction61); var guidanceaction62 = new GuidanceAction { Name = "Options", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/Options.mht", }; guidanceaction61.ConnectTo(guidanceaction62); var guidanceaction63 = new GuidanceAction { Name = "Tracing Window", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/TracingWindow.mht", }; guidanceaction62.ConnectTo(guidanceaction63); var join64 = new Join { Name = "Join9", }; guidanceaction63.ConnectTo(join64); var join65 = new Join { Name = "Join10", }; join64.ConnectTo(join65); var guidanceaction66 = new GuidanceAction { Name = "More Information", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/MoreInformation.mht", }; join65.ConnectTo(guidanceaction66); var fork67 = new Fork { Name = "Known Issues", Description = "This is a list of the critical known issues in the current version of NuPattern.", }; guidanceaction66.ConnectTo(fork67); var guidanceaction68 = new GuidanceAction { Name = "Build error: “store must be open for this operation”", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/Builderrorstoremustbeopenforthisoperation.mht", }; fork67.ConnectTo(guidanceaction68); var join69 = new Join { Name = "Join11", }; guidanceaction68.ConnectTo(join69); var guidanceaction70 = new GuidanceAction { Name = "Feedback", Link = "content://93373818-600f-414b-8181-3a0cb79fa785/GeneratedCode/Guidance/Content/Feedback.mht", }; join69.ConnectTo(guidanceaction70); var final71 = new Final { Name = "ActivityFinal1", }; guidanceaction70.ConnectTo(final71); this.OnPostInitialize(); }
/// <summary> /// 从戚林八音的音韵地位推导出现代福州市区读音。 /// /// 现代福州市区读音用榕拼 0.4.0 表示。 /// /// https://yngping.zingzeu.org/spec/v0.4.0-preview2/hukziu.html /// </summary> public static string ToYngPingHokchew(Initial initial, Final final, Tone tone) { return(CikLingInitialToYngPing[initial] + GetYngPingHokchewFinal(MaybeYoToUo(initial, final), tone) + CikLingToneToYngPing[tone]); }
/// <summary> /// 八音转榕拼(戚林八音音系)。 /// </summary> /// <returns></returns> public static string FanqieToYngping(Initial initial, Final final, Tone tone) { return(GetInitialString(initial) + GetFinalString(final, tone) + GetToneNumber(tone)); }
private static string GetFinalString(Final final, Tone tone) { switch (tone) { case Tone.UpAbrupt: case Tone.DownAbrupt: switch (final) { case Final.A: return("ah"); case Final.Ang: return("ak"); case Final.Ia: return("iah"); case Final.Iang: return("iak"); case Final.Ua: return("uah"); case Final.Uang: return("uak"); case Final.O: return("oh"); case Final.Ong: return("ok"); case Final.Io: return("ioh"); case Final.Yong: return("iok"); case Final.Uo: return("uoh"); case Final.Uong: return("uok"); case Final.Oe: return("eoh"); case Final.Oeng: return("eok"); case Final.E: return("eh"); case Final.Eing: return("ek"); case Final.Ie: return("ieh"); case Final.Ieng: return("iek"); case Final.I: return("ih"); case Final.Ing: return("ik"); case Final.U: return("uh"); case Final.Ung: return("uk"); case Final.Y: return("yh"); case Final.Yng: return("yk"); } throw new ArgumentException("Not allowed"); default: switch (final) { case Final.A: return("a"); case Final.Ia: return("ia"); case Final.Ua: return("ua"); case Final.Uai: return("uai"); case Final.Ai: return("ai"); case Final.Au: return("au"); case Final.O: return("o"); case Final.Io: return("io"); case Final.Uo: return("uo"); case Final.Uoi: return("uoi"); case Final.Oey: return("oi"); case Final.Oe: return("eo"); case Final.E: return("e"); case Final.Ie: return("ie"); case Final.Ieu: return("ieu"); case Final.Eu: return("eu"); case Final.I: return("i"); case Final.Iu: return("iu"); case Final.U: return("u"); case Final.Ui: return("ui"); case Final.Y: return("y"); case Final.Ang: return("ang"); case Final.Iang: return("iang"); case Final.Uang: return("uang"); case Final.Ong: return("ong"); case Final.Yong: return("iong"); case Final.Uong: return("uong"); case Final.Oeng: return("oeng"); case Final.Eing: return("eng"); case Final.Ieng: return("ieng"); case Final.Ing: return("ing"); case Final.Ung: return("ung"); case Final.Yng: return("yng"); } throw new ArgumentException("Not allowed"); } }
static void ScriptWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {//returns WorkerData Final.Add((WorkerData)e.Result); }
public void LoadNextDay() { FindObjectOfType <Sound>().ButtonSound(); int sceneIndex = FindObjectOfType <GameController>().sceneIndex; if (currentSalary >= 0) { PlayerPrefs.SetInt("Money", currentSalary); if (debtT.isOn) { PlayerPrefs.SetInt("Debt", 0); PlayerPrefs.SetInt("DaysDebt", 2); } else { if (currentDebt == 0) { PlayerPrefs.SetInt("Debt", currentDebt); PlayerPrefs.SetInt("DaysDebt", DataHolder.daysDebt); } else if (DataHolder.daysDebt > 1) { PlayerPrefs.SetInt("Debt", currentDebt); PlayerPrefs.SetInt("DaysDebt", DataHolder.daysDebt - 1); } else { Debug.Log("Game Over! Debt"); Final f = Instantiate(final, GameObject.Find("FinalsContainer").transform).GetComponent <Final>(); f.showFinal(Final.FinalType.debt); return; } } PlayerPrefs.SetInt("Authority", currentAuthority); if (rentT.isOn) { if (DataHolder.daysHome < 3) { PlayerPrefs.SetInt("DaysHome", DataHolder.daysHome + 1); } else { PlayerPrefs.SetInt("DaysHome", DataHolder.daysHome); } } else { if (DataHolder.daysHome > 1) { PlayerPrefs.SetInt("DaysHome", DataHolder.daysHome - 1); } else { Debug.Log("Game Over! Rent"); Final f = Instantiate(final, GameObject.Find("FinalsContainer").transform).GetComponent <Final>(); if (currentAuthority >= 70) { f.showFinal(Final.FinalType.homeHigh); } else { f.showFinal(Final.FinalType.homeLow); } return; } } if (foodT.isOn) { if (DataHolder.daysFood < 3) { PlayerPrefs.SetInt("DaysFood", DataHolder.daysFood + 1); } else { PlayerPrefs.SetInt("DaysFood", DataHolder.daysFood); } } else { if (DataHolder.daysFood > 1) { PlayerPrefs.SetInt("DaysFood", DataHolder.daysFood - 1); } else { Debug.Log("Game Over! Food"); Final f = Instantiate(final, GameObject.Find("FinalsContainer").transform).GetComponent <Final>(); f.showFinal(Final.FinalType.food); return; } } if (sceneIndex == 5) { if (currentAuthority >= 90) { Final f = Instantiate(final, GameObject.Find("FinalsContainer").transform).GetComponent <Final>(); f.showFinal(Final.FinalType.high); } else { Final f = Instantiate(final, GameObject.Find("FinalsContainer").transform).GetComponent <Final>(); f.showFinal(Final.FinalType.low); } return; } else { FindObjectOfType <SceneTransitions>().LoadScene(sceneIndex + 1); } } }
private void AltToggle(object sender, RoutedEventArgs e) { // Mimicing radio buttons so you cant toggle a button off if (AltOption.IsChecked == false) { AltOption.IsChecked = true; return; } SimpleOption.IsChecked = false; OrbOption.IsChecked = false; Properties.Settings.Default.Simple = SimpleOption.IsChecked; Properties.Settings.Default.Orb = OrbOption.IsChecked; Properties.Settings.Default.Alt = AltOption.IsChecked; if (AltOption.IsChecked) { Report1.SetResourceReference(ContentProperty, "AnsemReportOld1"); Report2.SetResourceReference(ContentProperty, "AnsemReportOld2"); Report3.SetResourceReference(ContentProperty, "AnsemReportOld3"); Report4.SetResourceReference(ContentProperty, "AnsemReportOld4"); Report5.SetResourceReference(ContentProperty, "AnsemReportOld5"); Report6.SetResourceReference(ContentProperty, "AnsemReportOld6"); Report7.SetResourceReference(ContentProperty, "AnsemReportOld7"); Report8.SetResourceReference(ContentProperty, "AnsemReportOld8"); Report9.SetResourceReference(ContentProperty, "AnsemReportOld9"); Report10.SetResourceReference(ContentProperty, "AnsemReportOld10"); Report11.SetResourceReference(ContentProperty, "AnsemReportOld11"); Report12.SetResourceReference(ContentProperty, "AnsemReportOld12"); Report13.SetResourceReference(ContentProperty, "AnsemReportOld13"); Fire1.SetResourceReference(ContentProperty, "FireOld"); Fire2.SetResourceReference(ContentProperty, "FireOld"); Fire3.SetResourceReference(ContentProperty, "FireOld"); Blizzard1.SetResourceReference(ContentProperty, "BlizzardOld"); Blizzard2.SetResourceReference(ContentProperty, "BlizzardOld"); Blizzard3.SetResourceReference(ContentProperty, "BlizzardOld"); Thunder1.SetResourceReference(ContentProperty, "ThunderOld"); Thunder2.SetResourceReference(ContentProperty, "ThunderOld"); Thunder3.SetResourceReference(ContentProperty, "ThunderOld"); Cure1.SetResourceReference(ContentProperty, "CureOld"); Cure2.SetResourceReference(ContentProperty, "CureOld"); Cure3.SetResourceReference(ContentProperty, "CureOld"); Reflect1.SetResourceReference(ContentProperty, "ReflectOld"); Reflect2.SetResourceReference(ContentProperty, "ReflectOld"); Reflect3.SetResourceReference(ContentProperty, "ReflectOld"); Magnet1.SetResourceReference(ContentProperty, "MagnetOld"); Magnet2.SetResourceReference(ContentProperty, "MagnetOld"); Magnet3.SetResourceReference(ContentProperty, "MagnetOld"); Valor.SetResourceReference(ContentProperty, "ValorOld"); Wisdom.SetResourceReference(ContentProperty, "WisdomOld"); Limit.SetResourceReference(ContentProperty, "LimitOld"); Master.SetResourceReference(ContentProperty, "MasterOld"); Final.SetResourceReference(ContentProperty, "FinalOld"); TornPage1.SetResourceReference(ContentProperty, "TornPageOld"); TornPage2.SetResourceReference(ContentProperty, "TornPageOld"); TornPage3.SetResourceReference(ContentProperty, "TornPageOld"); TornPage4.SetResourceReference(ContentProperty, "TornPageOld"); TornPage5.SetResourceReference(ContentProperty, "TornPageOld"); Lamp.SetResourceReference(ContentProperty, "GenieOld"); Ukulele.SetResourceReference(ContentProperty, "StitchOld"); Baseball.SetResourceReference(ContentProperty, "ChickenLittleOld"); Feather.SetResourceReference(ContentProperty, "PeterPanOld"); Nonexistence.SetResourceReference(ContentProperty, "ProofOfNonexistenceOld"); Connection.SetResourceReference(ContentProperty, "ProofOfConnectionOld"); Peace.SetResourceReference(ContentProperty, "ProofOfPeaceOld"); PromiseCharm.SetResourceReference(ContentProperty, "PromiseCharmOld"); broadcast.Report.SetResourceReference(ContentProperty, "AnsemReportOld"); broadcast.Peace.SetResourceReference(ContentProperty, "ProofOfPeaceOld"); broadcast.Nonexistence.SetResourceReference(ContentProperty, "ProofOfNonexistenceOld"); broadcast.Connection.SetResourceReference(ContentProperty, "ProofOfConnectionOld"); broadcast.PromiseCharm.SetResourceReference(ContentProperty, "PromiseCharmOld"); broadcast.Fire.SetResourceReference(ContentProperty, "FireAlt"); broadcast.Blizzard.SetResourceReference(ContentProperty, "BlizzardAlt"); broadcast.Thunder.SetResourceReference(ContentProperty, "ThunderAlt"); broadcast.Cure.SetResourceReference(ContentProperty, "CureAlt"); broadcast.Reflect.SetResourceReference(ContentProperty, "ReflectAlt"); broadcast.Magnet.SetResourceReference(ContentProperty, "MagnetAlt"); broadcast.Valor.SetResourceReference(ContentProperty, "ValorAlt"); broadcast.Wisdom.SetResourceReference(ContentProperty, "WisdomAlt"); broadcast.Limit.SetResourceReference(ContentProperty, "LimitAlt"); broadcast.Master.SetResourceReference(ContentProperty, "MasterAlt"); broadcast.Final.SetResourceReference(ContentProperty, "FinalAlt"); broadcast.Baseball.SetResourceReference(ContentProperty, "ChickenLittleAlt"); broadcast.Lamp.SetResourceReference(ContentProperty, "GenieAlt"); broadcast.Ukulele.SetResourceReference(ContentProperty, "StitchAlt"); broadcast.Feather.SetResourceReference(ContentProperty, "PeterPanAlt"); ((Grid)((Grid)broadcast.Fire.Parent).Parent).RowDefinitions[0].Height = new GridLength(0, GridUnitType.Star); ((Grid)((Grid)broadcast.Fire.Parent).Parent).RowDefinitions[2].Height = new GridLength(0, GridUnitType.Star); ((Grid)broadcast.Valor.Parent).RowDefinitions[1].Height = new GridLength(5, GridUnitType.Star); ((Grid)broadcast.Valor.Parent).RowDefinitions[2].Height = new GridLength(5, GridUnitType.Star); ((Grid)broadcast.Lamp.Parent).RowDefinitions[1].Height = new GridLength(8, GridUnitType.Star); } }
protected override void OnInitialize() { base.OnInitialize(); this.Name = "GuidanceWorkflow"; var initial1 = new Initial { Name = "Hands-On Labs for Creating Pattern Toolkits", }; this.ConnectTo(initial1); var fork2 = new Fork { Name = "Hands-On Lab: Getting Started", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/HandsOnLabGettingStarted.mht", }; initial1.ConnectTo(fork2); var fork3 = new Fork { Name = "Setup for Getting Started Lab", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/SetupforGettingStartedLab.mht", }; fork2.ConnectTo(fork3); var guidanceaction4 = new GuidanceAction { Name = "Prepare the Experimental Instance of Visual Studio", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/PreparetheExperimentalInstanceofVisualStudio.mht", }; fork3.ConnectTo(guidanceaction4); var join5 = new Join { Name = "Join1", }; guidanceaction4.ConnectTo(join5); var fork6 = new Fork { Name = "Part 1: Create a Pattern Toolkit Project", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part1CreateaPatternToolkitProject.mht", }; join5.ConnectTo(fork6); var guidanceaction7 = new GuidanceAction { Name = "Add the Widget Element to the Pattern Model", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddtheWidgetElementtothePatternModel.mht", }; fork6.ConnectTo(guidanceaction7); var guidanceaction8 = new GuidanceAction { Name = "Build and Run the Toolkit", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildandRuntheToolkit.mht", }; guidanceaction7.ConnectTo(guidanceaction8); var guidanceaction9 = new GuidanceAction { Name = "Create a New Solution", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaNewSolution.mht", }; guidanceaction8.ConnectTo(guidanceaction9); var guidanceaction10 = new GuidanceAction { Name = "Add a new Widget Solution to Solution Builder", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddanewWidgetSolutiontoSolutionBuilder.mht", }; guidanceaction9.ConnectTo(guidanceaction10); var guidanceaction11 = new GuidanceAction { Name = "Widget Solutions are added to Solution Builder", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/WidgetSolutionsareaddedtoSolutionBuilder.mht", }; guidanceaction10.ConnectTo(guidanceaction11); var guidanceaction12 = new GuidanceAction { Name = "Add More Widgets to Solution Builder", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddMoreWidgetstoSolutionBuilder.mht", }; guidanceaction11.ConnectTo(guidanceaction12); var guidanceaction13 = new GuidanceAction { Name = "What Have We Done?", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/WhatHaveWeDone.mht", }; guidanceaction12.ConnectTo(guidanceaction13); var join14 = new Join { Name = "Join2", }; guidanceaction13.ConnectTo(join14); var fork15 = new Fork { Name = "Part 2: Add Project and Item Templates", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part2AddProjectandItemTemplates.mht", }; join14.ConnectTo(fork15); var guidanceaction16 = new GuidanceAction { Name = "Add a Project Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddaProjectTemplate.mht", }; fork15.ConnectTo(guidanceaction16); var guidanceaction17 = new GuidanceAction { Name = "Create a VS Template Launch Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaVSTemplateLaunchPoint.mht", }; guidanceaction16.ConnectTo(guidanceaction17); var guidanceaction18 = new GuidanceAction { Name = "Rename the Template Launch Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/RenametheTemplateLaunchPoint.mht", }; guidanceaction17.ConnectTo(guidanceaction18); var guidanceaction19 = new GuidanceAction { Name = "Configure the Template Launch Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheTemplateLaunchPoint.mht", }; guidanceaction18.ConnectTo(guidanceaction19); var guidanceaction20 = new GuidanceAction { Name = "Build and Test", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildandTest.mht", }; guidanceaction19.ConnectTo(guidanceaction20); var guidanceaction21 = new GuidanceAction { Name = "Add an Item Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddanItemTemplate.mht", }; guidanceaction20.ConnectTo(guidanceaction21); var guidanceaction22 = new GuidanceAction { Name = "Create a Command for Unfolding the Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaCommandforUnfoldingtheTemplate.mht", }; guidanceaction21.ConnectTo(guidanceaction22); var guidanceaction23 = new GuidanceAction { Name = "Rename the Command", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/RenametheCommand.mht", }; guidanceaction22.ConnectTo(guidanceaction23); var guidanceaction24 = new GuidanceAction { Name = "Configure the Command", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheCommand.mht", }; guidanceaction23.ConnectTo(guidanceaction24); var guidanceaction25 = new GuidanceAction { Name = "Create a Launch Point to trigger the Unfold Command", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaLaunchPointtotriggertheUnfoldCommand.mht", }; guidanceaction24.ConnectTo(guidanceaction25); var guidanceaction26 = new GuidanceAction { Name = "Enable Navigation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/EnableNavigation.mht", }; guidanceaction25.ConnectTo(guidanceaction26); var guidanceaction27 = new GuidanceAction { Name = "Build, Run and Create Widget Classes", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildRunandCreateWidgetClasses.mht", }; guidanceaction26.ConnectTo(guidanceaction27); var guidanceaction28 = new GuidanceAction { Name = "Where Are We Now?", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/WhereAreWeNow.mht", }; guidanceaction27.ConnectTo(guidanceaction28); var join29 = new Join { Name = "Join3", }; guidanceaction28.ConnectTo(join29); var fork30 = new Fork { Name = "Part 3: Generating Code with T4 Templates", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part3GeneratingCodewithT4Templates.mht", }; join29.ConnectTo(fork30); var guidanceaction31 = new GuidanceAction { Name = "Add a New T4 Text Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddaNewT4TextTemplate.mht", }; fork30.ConnectTo(guidanceaction31); var guidanceaction32 = new GuidanceAction { Name = "Add a Command for Running the T4 Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddaCommandforRunningtheT4Template.mht", }; guidanceaction31.ConnectTo(guidanceaction32); var guidanceaction33 = new GuidanceAction { Name = "Configure the Command for Running the T4 Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheCommandforRunningtheT4Template.mht", }; guidanceaction32.ConnectTo(guidanceaction33); var guidanceaction34 = new GuidanceAction { Name = "Create a Launch Point to Trigger Code Generation With a Menu", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaLaunchPointtoTriggerCodeGenerationWithaMenu.mht", }; guidanceaction33.ConnectTo(guidanceaction34); var guidanceaction35 = new GuidanceAction { Name = "Build and Test the Context Menu Launch Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildandTesttheContextMenuLaunchPoint.mht", }; guidanceaction34.ConnectTo(guidanceaction35); var guidanceaction36 = new GuidanceAction { Name = "Create a Launch Point to Trigger Code Generation On Project Build", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaLaunchPointtoTriggerCodeGenerationOnProjectBuild.mht", }; guidanceaction35.ConnectTo(guidanceaction36); var guidanceaction37 = new GuidanceAction { Name = "Build and Test the Build Event Launch Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildandTesttheBuildEventLaunchPoint.mht", }; guidanceaction36.ConnectTo(guidanceaction37); var guidanceaction38 = new GuidanceAction { Name = "What Have We Got Now?", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/WhatHaveWeGotNow.mht", }; guidanceaction37.ConnectTo(guidanceaction38); var join39 = new Join { Name = "Join4", }; guidanceaction38.ConnectTo(join39); var fork40 = new Fork { Name = "Part 4: Create Guidance", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part4CreateGuidance.mht", }; join39.ConnectTo(fork40); var guidanceaction41 = new GuidanceAction { Name = "Examine the Guidance Document", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ExaminetheGuidanceDocument.mht", }; fork40.ConnectTo(guidanceaction41); var guidanceaction42 = new GuidanceAction { Name = "Edit the Guidance Document", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/EdittheGuidanceDocument.mht", }; guidanceaction41.ConnectTo(guidanceaction42); var guidanceaction43 = new GuidanceAction { Name = "Build the Guidance", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildtheGuidance.mht", }; guidanceaction42.ConnectTo(guidanceaction43); var guidanceaction44 = new GuidanceAction { Name = "Associate the Guidance with the Pattern", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AssociatetheGuidancewiththePattern.mht", }; guidanceaction43.ConnectTo(guidanceaction44); var guidanceaction45 = new GuidanceAction { Name = "Build and Test the Guidance", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/BuildandTesttheGuidance.mht", }; guidanceaction44.ConnectTo(guidanceaction45); var join46 = new Join { Name = "Join5", }; guidanceaction45.ConnectTo(join46); var guidanceaction47 = new GuidanceAction { Name = "Hands-On Lab 1 Review", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/HandsOnLab1Review.mht", }; join46.ConnectTo(guidanceaction47); var join48 = new Join { Name = "Join6", }; guidanceaction47.ConnectTo(join48); var fork49 = new Fork { Name = "Hands-On Lab: Building Better Pattern Toolkits", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/HandsOnLabBuildingBetterPatternToolkits.mht", }; join48.ConnectTo(fork49); var fork50 = new Fork { Name = "Part 1: Modeling Variability in a Pattern", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part1ModelingVariabilityinaPattern.mht", }; fork49.ConnectTo(fork50); var guidanceaction51 = new GuidanceAction { Name = "The Difference between Modeling a Pattern and Modeling Variability", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TheDifferencebetweenModelingaPatternandModelingVariability.mht", }; fork50.ConnectTo(guidanceaction51); var guidanceaction52 = new GuidanceAction { Name = "Think About Variability", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ThinkAboutVariability.mht", }; guidanceaction51.ConnectTo(guidanceaction52); var guidanceaction53 = new GuidanceAction { Name = "Create a new Pattern Toolkit for ASP.NET MVC", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateanewPatternToolkitforASPNETMVC.mht", }; guidanceaction52.ConnectTo(guidanceaction53); var guidanceaction54 = new GuidanceAction { Name = "Verify the Development Environment", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/VerifytheDevelopmentEnvironment.mht", }; guidanceaction53.ConnectTo(guidanceaction54); var guidanceaction55 = new GuidanceAction { Name = "Add Controllers to the Pattern Model", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddControllerstothePatternModel.mht", }; guidanceaction54.ConnectTo(guidanceaction55); var guidanceaction56 = new GuidanceAction { Name = "Verify the User Experience", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/VerifytheUserExperience.mht", }; guidanceaction55.ConnectTo(guidanceaction56); var guidanceaction57 = new GuidanceAction { Name = "Add Actions to the Pattern Model", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddActionstothePatternModel.mht", }; guidanceaction56.ConnectTo(guidanceaction57); var guidanceaction58 = new GuidanceAction { Name = "Test the Action", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TesttheAction.mht", }; guidanceaction57.ConnectTo(guidanceaction58); var guidanceaction59 = new GuidanceAction { Name = "Add Data to an Action", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddDatatoanAction.mht", }; guidanceaction58.ConnectTo(guidanceaction59); var join60 = new Join { Name = "Join7", }; guidanceaction59.ConnectTo(join60); var fork61 = new Fork { Name = "Part 2: Extension Points", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part2ExtensionPoints.mht", }; join60.ConnectTo(fork61); var guidanceaction62 = new GuidanceAction { Name = "Create an Extension Point for Views", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateanExtensionPointforViews.mht", }; fork61.ConnectTo(guidanceaction62); var guidanceaction63 = new GuidanceAction { Name = "Test the Extension Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TesttheExtensionPoint.mht", }; guidanceaction62.ConnectTo(guidanceaction63); var guidanceaction64 = new GuidanceAction { Name = "Register the Extension Point in Visual Studio", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/RegistertheExtensionPointinVisualStudio.mht", }; guidanceaction63.ConnectTo(guidanceaction64); var guidanceaction65 = new GuidanceAction { Name = "Add a New Pattern Toolkit to the Solution", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddaNewPatternToolkittotheSolution.mht", }; guidanceaction64.ConnectTo(guidanceaction65); var guidanceaction66 = new GuidanceAction { Name = "Designate the SearchView Pattern as Extending View", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/DesignatetheSearchViewPatternasExtendingView.mht", }; guidanceaction65.ConnectTo(guidanceaction66); var guidanceaction67 = new GuidanceAction { Name = "Add Extension Properties to Search View", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddExtensionPropertiestoSearchView.mht", }; guidanceaction66.ConnectTo(guidanceaction67); var guidanceaction68 = new GuidanceAction { Name = "Test the Implemented Extension Point", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TesttheImplementedExtensionPoint.mht", }; guidanceaction67.ConnectTo(guidanceaction68); var join69 = new Join { Name = "Join8", }; guidanceaction68.ConnectTo(join69); var fork70 = new Fork { Name = "Part 3: Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part3Validation.mht", }; join69.ConnectTo(fork70); var guidanceaction71 = new GuidanceAction { Name = "Enable Validation of the Whole Pattern", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/EnableValidationoftheWholePattern.mht", }; fork70.ConnectTo(guidanceaction71); var guidanceaction72 = new GuidanceAction { Name = "Test Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TestValidation.mht", }; guidanceaction71.ConnectTo(guidanceaction72); var guidanceaction73 = new GuidanceAction { Name = "Using Built-In Cardinality Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/UsingBuiltInCardinalityValidation.mht", }; guidanceaction72.ConnectTo(guidanceaction73); var guidanceaction74 = new GuidanceAction { Name = "Test Cardinality Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TestCardinalityValidation.mht", }; guidanceaction73.ConnectTo(guidanceaction74); var guidanceaction75 = new GuidanceAction { Name = "Add Validation to a Node in the Pattern Model", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddValidationtoaNodeinthePatternModel.mht", }; guidanceaction74.ConnectTo(guidanceaction75); var guidanceaction76 = new GuidanceAction { Name = "Test Property Rule Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TestPropertyRuleValidation.mht", }; guidanceaction75.ConnectTo(guidanceaction76); var join77 = new Join { Name = "Join9", }; guidanceaction76.ConnectTo(join77); var fork78 = new Fork { Name = "Part 4: Custom Validation Commands", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part4CustomValidationCommands.mht", }; join77.ConnectTo(fork78); var guidanceaction79 = new GuidanceAction { Name = "Add a New Custom-Coded Validation Rule", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/AddaNewCustomCodedValidationRule.mht", }; fork78.ConnectTo(guidanceaction79); var guidanceaction80 = new GuidanceAction { Name = "Configure the Custom-Coded Validation Rule", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheCustomCodedValidationRule.mht", }; guidanceaction79.ConnectTo(guidanceaction80); var guidanceaction81 = new GuidanceAction { Name = "Test the Custom Validation", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TesttheCustomValidation.mht", }; guidanceaction80.ConnectTo(guidanceaction81); var join82 = new Join { Name = "Join10", }; guidanceaction81.ConnectTo(join82); var fork83 = new Fork { Name = "Part 5: Wizards", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part5Wizards.mht", }; join82.ConnectTo(fork83); var guidanceaction84 = new GuidanceAction { Name = "Configure Validation Rules", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfigureValidationRules.mht", }; fork83.ConnectTo(guidanceaction84); var guidanceaction85 = new GuidanceAction { Name = "Create a new Properties Page", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateanewPropertiesPage.mht", }; guidanceaction84.ConnectTo(guidanceaction85); var guidanceaction86 = new GuidanceAction { Name = "Create a New Configuration Wizard", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaNewConfigurationWizard.mht", }; guidanceaction85.ConnectTo(guidanceaction86); var guidanceaction87 = new GuidanceAction { Name = "Configure the Wizard", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheWizard.mht", }; guidanceaction86.ConnectTo(guidanceaction87); var guidanceaction88 = new GuidanceAction { Name = "Configure the Launch Points", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheLaunchPoints.mht", }; guidanceaction87.ConnectTo(guidanceaction88); var guidanceaction89 = new GuidanceAction { Name = "Test the Wizard", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TesttheWizard.mht", }; guidanceaction88.ConnectTo(guidanceaction89); var join90 = new Join { Name = "Join11", }; guidanceaction89.ConnectTo(join90); var fork91 = new Fork { Name = "Part 6: Working with Project Templates and Item Templates", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Part6WorkingwithProjectTemplatesandItemTemplates.mht", }; join90.ConnectTo(fork91); var guidanceaction92 = new GuidanceAction { Name = "Export a New MVC Project Template from Visual Studio", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ExportaNewMVCProjectTemplatefromVisualStudio.mht", }; fork91.ConnectTo(guidanceaction92); var guidanceaction93 = new GuidanceAction { Name = "Import the Project Template into the Toolkit Project", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ImporttheProjectTemplateintotheToolkitProject.mht", }; guidanceaction92.ConnectTo(guidanceaction93); var guidanceaction94 = new GuidanceAction { Name = "Configure the Project Template to Unfold with the Toolkit", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheProjectTemplatetoUnfoldwiththeToolkit.mht", }; guidanceaction93.ConnectTo(guidanceaction94); var guidanceaction95 = new GuidanceAction { Name = "Test Custom Project Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TestCustomProjectTemplate.mht", }; guidanceaction94.ConnectTo(guidanceaction95); var guidanceaction96 = new GuidanceAction { Name = "Create a New Controller Item Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/CreateaNewControllerItemTemplate.mht", }; guidanceaction95.ConnectTo(guidanceaction96); var guidanceaction97 = new GuidanceAction { Name = "Export the Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ExporttheTemplate.mht", }; guidanceaction96.ConnectTo(guidanceaction97); var guidanceaction98 = new GuidanceAction { Name = "Import the Item Template into the Toolkit Project", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ImporttheItemTemplateintotheToolkitProject.mht", }; guidanceaction97.ConnectTo(guidanceaction98); var guidanceaction99 = new GuidanceAction { Name = "Configure the Item Template to Unfold with the Controller Node", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/ConfiguretheItemTemplatetoUnfoldwiththeControllerNode.mht", }; guidanceaction98.ConnectTo(guidanceaction99); var guidanceaction100 = new GuidanceAction { Name = "Test Custom Item Template", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/TestCustomItemTemplate.mht", }; guidanceaction99.ConnectTo(guidanceaction100); var join101 = new Join { Name = "Join12", }; guidanceaction100.ConnectTo(join101); var join102 = new Join { Name = "Join13", }; join101.ConnectTo(join102); var guidanceaction103 = new GuidanceAction { Name = "Feedback", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Feedback.mht", }; join102.ConnectTo(guidanceaction103); var guidanceaction104 = new GuidanceAction { Name = "Notes", Link = "content://5d64cfe6-a6ff-4e73-a000-c6a8832740ff/GeneratedCode/Guidance/Content/Notes.mht", }; guidanceaction103.ConnectTo(guidanceaction104); var final105 = new Final { Name = "ActivityFinal1", }; guidanceaction104.ConnectTo(final105); this.OnPostInitialize(); }
public void HaveTheRightNumberOfMatchesAfterRun() { var final = new Final(FakeMovieGenerator.GetListWithTwoMovies()); Assert.Equal(1, final.Matches.Count); }
public async Task <IHttpActionResult> Novo() { //Verifica se há um usuário válido logado. ApplicationUser user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user == null) { return(Unauthorized()); } // Checar se o request é multipart/form-data. if (!Request.Content.IsMimeMultipartContent("form-data")) { throw new HttpResponseException(HttpStatusCode.UnsupportedMediaType); } //Processo de leitura do arquivo// string root = HttpContext.Current.Server.MapPath("~/App_Data"); var provider = new MultipartFormDataStreamProvider(root); await Request.Content.ReadAsMultipartAsync(provider); string CategoryID = provider.FormData["categoryId"]; string CSVTags = provider.FormData["tags"]; string Filename = provider.FormData["filename"]; //Análise e estruturação do arquivo TextParser parser = new TextParser(); byte[] binaryData = File.ReadAllBytes(provider.FileData[0].LocalFileName); Node fbxFile; try { fbxFile = parser.ParseFromStream(new MemoryStream(binaryData)); } catch (Exception ex) { return(BadRequest("Arquivo FBX inválido. - " + ex.Message)); } //Carregamento da lista de objetos existentes no arquivo var objects = new List <FBXObject>(); foreach (Property prop in (fbxFile.Properties.First(d => d.Name == "Objects").Value as Node).Properties) { var obj = FBXObject.GetFBXObjectFromObjectNode(prop.Value as Node); objects.Add(obj); } //Pega todas as conexões existentes e seus objetos. FBXObject rootNode = new FBXObject() { UID = "0", Name = "Root" }; var connections = FBXConnection.GetConnectionsFromConnectionNode(fbxFile.Properties. First(D => D.Name == "Connections").Value as Node, objects, rootNode).ToList(); //Objeto final a ser armazenado contendo estrutura, objetos e conexões Final final = new Final(connections, objects, fbxFile); MemoryStream memory = new MemoryStream(); (new BinaryFormatter()).Serialize(memory, final); //Dado a ser guardado no banco var file = new Files() { Id = Guid.NewGuid().ToString(), BinaryFile = binaryData, ApplicationUser = db.Users.First(d => d.Id == user.Id), Name = Filename, FinalInformation = memory.GetBuffer(), Category = db.Categories.First(d => d.Id == CategoryID), UpdateDateTime = DateTime.Now }; db.Files.Add(file); db.SaveChanges(); SaveTagsForFile(CSVTags, file); SaveContentsForFile(final, file); db.SaveChanges(); return(Ok(file.Id)); }
public static string ToHanzi(Initial initial, Final final, Tone tone) { return(InitialToHanzi[initial] + FinalToHanzi[final] + " " + ToneToHanzi[tone]); }
/// <summary> /// 从戚林八音的声韵母推导出现代福州市区读音。假定声调为上平。 /// /// 现代福州市区读音用榕拼 0.4.0 表示。 /// /// https://yngping.zingzeu.org/spec/v0.4.0-preview2/hukziu.html /// </summary> /// <returns>推测的现代福州市区读音。不含声调。</returns> public static string ToYngPingHokchewToneless(Initial initial, Final final) { return(CikLingInitialToYngPing[initial] + GetYngPingHokchewFinal( MaybeYoToUo(initial, final), Tone.UpLevel)); }
public void Verificar_se_retorna_erro_se_nao_receber_nenhum_filme() { var final = new Final(); Assert.Throws <NullReferenceException>(() => final.Iniciar()); }
static void Main(string[] args) { Final.Final(); }
public List_view_final_my(Final _final) { final = _final; category_my = final.Product.Categories.ToList(); }
public override int GetHashCode() => Final.GetHashCode() ^ Initial.GetHashCode() ^ Currency.GetHashCode();
public void DeveValidarAQuantidadeDeFilmeQuandoForIgualAOitoNaFinal() { var final = new Final(Filmes); Assert.AreEqual(Filmes.Count(), final.Filmes.Count()); }
internal override Node Bind(Binder b) { b.OpenScope(); if (AssignExpr != null) { b.Bind(ref AssignExpr); IterInit = AssignExpr; } else { b.Bind(ref ForDecl); IterDecl = ForDecl; AssignExpr = ForDecl.Initializer as AssignExpr; } Expr Iter; Iter = AssignExpr.Left; Iter.RequireGetAccess(); b.Bind(ref Final); Final.RequireGetAccess(); if (Step != null) { b.Bind(ref Step); Step.RequireGetAccess(); } else { Step = LiteralExpr.Bound(Constant.Create(1)); } switch (Dir.Type) { case TokenType.UPTO: WhileExpr = BinaryExpr.Bound(Iter, Dir, Final, BinaryOperatorKind.LessThanOrEqual, b.Options.Binding); IncrExpr = AssignOpExpr.Bound(Iter, Step, BinaryOperatorKind.Addition, b); break; case TokenType.DOWNTO: WhileExpr = BinaryExpr.Bound(Iter, Dir, Final, BinaryOperatorKind.GreaterThanOrEqual, b.Options.Binding); IncrExpr = AssignOpExpr.Bound(Iter, Step, BinaryOperatorKind.Subtraction, b); break; case TokenType.TO: var step_pos = BinaryExpr.Bound(Step, Dir, LiteralExpr.Bound(Constant.Create(0)), BinaryOperatorKind.GreaterThanOrEqual, b.Options.Binding); var whileExprUpTo = BinaryExpr.Bound(Iter, Dir, Final, BinaryOperatorKind.LessThanOrEqual, b.Options.Binding); var whileExprDownTo = BinaryExpr.Bound(Iter, Dir, Final, BinaryOperatorKind.GreaterThanOrEqual, b.Options.Binding); WhileExpr = IifExpr.Bound(step_pos, whileExprUpTo, whileExprDownTo, b.Options.Binding); IncrExpr = AssignOpExpr.Bound(Iter, Step, BinaryOperatorKind.Addition, b); break; default: throw Error(ErrorCode.Internal); } b.Convert(ref WhileExpr, Compilation.Get(NativeType.Boolean)); b.Bind(ref Stmt); b.CloseScope(); return(null); }
public void MiddleButtonNext_Click(object sender, EventArgs e) { Final final = new Final(); // Navigate to Page 3 on click this.NavigationService.Navigate(new Uri("Final.xaml", UriKind.Relative)); }
bool IsFinalized(TInstance instance) { State <TInstance> currentState = this.GetState(instance).Result; return(Final.Equals(currentState)); }
private void button2_Click(object sender, EventArgs e) { t.Stop(); if (chooseRight == 1) { if (radioButton1.Checked == true) { MessageBox.Show("Correct! This questions' points have been added to your score."); Game.score += pointValue; } else { label1.Visible = false; label2.Visible = false; label3.Visible = false; MessageBox.Show("Incorrect! No points have been added to your score."); System.Threading.Thread.Sleep(2000); } } if (chooseRight == 2) { if (radioButton2.Checked == true) { MessageBox.Show("Correct! This questions' points have been added to your score."); Game.score += pointValue; } else { lblDisplay.Visible = false; label2.Visible = false; label3.Visible = false; MessageBox.Show("Incorrect! No points have been added to your score."); System.Threading.Thread.Sleep(2000); } } if (chooseRight == 3) { if (radioButton3.Checked == true) { MessageBox.Show("Correct! This questions' points have been added to your score."); Game.score += pointValue; } else { label1.Visible = false; lblDisplay.Visible = false; label3.Visible = false; MessageBox.Show("Incorrect! No points have been added to your score."); System.Threading.Thread.Sleep(2000); } } if (chooseRight == 4) { if (radioButton4.Checked == true) { MessageBox.Show("Correct! This questions' points have been added to your score."); Game.score += pointValue; } else { label1.Visible = false; label2.Visible = false; lblDisplay.Visible = false; MessageBox.Show("Incorrect! No points have been added to your score."); System.Threading.Thread.Sleep(2000); } } if (questionNumber == 3) { if (Game.roundCounter > 1) { MessageBox.Show("Advancing to the final round"); Final final = new Final(); final.Show(); } else { Start round2 = new Start(); round2.Show(); } } if (questionNumber == 4) { Result result = new Result(); result.Show(); } this.Close(); }