Exemplo n.º 1
0
        public void AddWithOr(SymbolModel model)
        {
            var alterationModel = new AlterationModel();

            alterationModel.Symbols.Add(model);
            Alterations.Add(alterationModel);
        }
Exemplo n.º 2
0
        private void CopyInfo()
        {
            var versionInfo =
                $"ID: {ID}\nAuthor: {Author}\nMessage: {Message}\nDate/Time: {Timestamp.ToString()}\n\nFile(s) changed: \n\n";

            versionInfo = Alterations.Aggregate(versionInfo, (current, alteration) => current + $"{alteration.Name}\t{alteration.AlterationType}\n");
            System.Windows.Clipboard.SetDataObject(versionInfo);
        }
Exemplo n.º 3
0
        private void GeneratePatchFile()
        {
            if (!Alterations.Any())
            {
                return;
            }
            List <string> allfiles = Alterations.Select(x => x.Name).ToList();

            // Diff with the previous version
            Utilities.GeneratePatchFile(allfiles, m_Area.Root.FullName, m_Version.ID.ToString());
        }
Exemplo n.º 4
0
        static async Task ReplaceAlterations(QnAMaker client)
        {
            var alt = new Alterations();

            alt.wordAlterations.Add(new Wordalteration()
            {
                alterations = new List <string>()
                {
                    "qnamaker",
                    "qna maker",
                    "banco de soluções"
                }
            });

            alt.wordAlterations.Add(new Wordalteration()
            {
                alterations = new List <string>()
                {
                    "botframework",
                    "bot framework",
                    "bote"
                }
            });

            alt.wordAlterations.Add(new Wordalteration()
            {
                alterations = new List <string>()
                {
                    "webchat",
                    "web chat",
                    "chate"
                }
            });

            await client.ReplaceAlterations(alt);
        }
Exemplo n.º 5
0
        public void AddKeyChange(double noteTime, Key key, double lowEReference_Y)
        {
            if (key == null) return;

            _alterations = Alterations.CreateFromFifths(key.Fifths);

            _currentKey = key;

            if (key.Fifths < 0)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 2, ScoreLayoutDetails.DefaultNoteHeight * 0);
            }
            if (key.Fifths < -1)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 3.5, ScoreLayoutDetails.DefaultNoteHeight * 1);
            }
            if (key.Fifths < -2)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 1.5, ScoreLayoutDetails.DefaultNoteHeight * 2);
            }
            if (key.Fifths < -3)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 3, ScoreLayoutDetails.DefaultNoteHeight * 3);
            }
            if (key.Fifths < -4)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 1, ScoreLayoutDetails.DefaultNoteHeight * 4);
            }
            if (key.Fifths < -5)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 2.5, ScoreLayoutDetails.DefaultNoteHeight * 5);
            }
            if (key.Fifths < -6)
            {
                AddKeyItem(noteTime, FlatGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 0.5, ScoreLayoutDetails.DefaultNoteHeight * 6);
            }
            //support up to -11....

            if (key.Fifths > 0)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 4, ScoreLayoutDetails.DefaultNoteHeight * 0);
            }
            if (key.Fifths > 1)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 2.5, ScoreLayoutDetails.DefaultNoteHeight * 1);
            }
            if (key.Fifths > 2)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 4.5, ScoreLayoutDetails.DefaultNoteHeight * 2);
            }
            if (key.Fifths > 3)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 3, ScoreLayoutDetails.DefaultNoteHeight * 3);
            }
            if (key.Fifths > 4)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 1.5, ScoreLayoutDetails.DefaultNoteHeight * 4);
            }
            if (key.Fifths > 5)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 3.5, ScoreLayoutDetails.DefaultNoteHeight * 5);
            }
            if (key.Fifths > 6)
            {
                AddKeyItem(noteTime, SharpGlyph(), lowEReference_Y - ScoreLayoutDetails.LineSpacing_Y * 2, ScoreLayoutDetails.DefaultNoteHeight * 6);
            }
            //support up to 11....
        }
Exemplo n.º 6
0
 public KeyRenderHelper(RenderHelper renderHelper)
 {
     _renderHelper = renderHelper;
     _currentKey = null;
     _alterations = new Alterations();
 }
Exemplo n.º 7
0
 public void Lambda()
 {
     Alterations.Add(new AlterationModel());
 }
Exemplo n.º 8
0
 public Option(string name, params string[] alterations)
 {
     Name = name;
     Alterations.AddRange(alterations);
 }