Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            numberOfRunners = DEFAULT_RUNNER_COUNT;
            UrlOfLogin = "******";
            textBoxOfURL.Text = UrlOfLogin;
            textBox1.Text = DEFAULT_RUNNER_COUNT.ToString();
            sing = new Singer();
            totalTryNumber = 0;
        }
Ejemplo n.º 2
0
    public static int IndexOfSinger(this List<Singer> singersList, Singer currentSinger)
    {
        int index = 0;

        for (int i = 0; i < singersList.Count; i++)
        {
            if (singersList[i].Name == currentSinger.Name)
            {
                index = i;
            }
        }

        return index;
    }
Ejemplo n.º 3
0
        internal ProjectSong(Project project, SongQb songQb)
        {
            _lastChanged = DateTime.MinValue;
            _qbLastChanged = DateTime.MinValue;
            _recordChange = false;

            _project = project;
            _songQb = songQb;
            _artist = this.SongQb.Artist;
            _title = this.SongQb.Title;

            if (_project.Defaults.SongVolumeMode == DefaultSettingMode.Game)
                _year = this.SongQb.Year;
            else
                _year = _project.Defaults.Year;

            if (_project.Defaults.SongVolumeMode == DefaultSettingMode.Game)
                _songVolume = this.SongQb.SongVolume;
            else
                _songVolume = _project.Defaults.SongVolume;

            if (_project.Defaults.GuitarVolumeMode == DefaultSettingMode.Game)
                _guitarVolume = this.SongQb.GuitarVolume;
            else
                _guitarVolume = _project.Defaults.GuitarVolume;

            if (_project.Defaults.SingerMode == DefaultSettingMode.Game)
                _singer = this.SongQb.Singer;
            else
                _singer = _project.Defaults.Singer;

            _originalArtist = true; // this.Song.OriginalArtist;

            _minMsBeforeNotesStart = _project.Defaults.MinMsBeforeNotesStart;
            _startPaddingMs = 0;

            _audio = new ProjectSongAudio(_project, this);
            _notes = new ProjectSongNotes(_project, this);

            _audio.PreviewFadeLength = _project.Defaults.PreviewFadeLength;
            _audio.PreviewLength = _project.Defaults.PreviewLength;
            _audio.PreviewStart = _project.Defaults.PreviewStart;
            _audio.PreviewVolume = _project.Defaults.PreviewVolume;
            _audio.PreviewIncludeGuitar = _project.Defaults.PreviewIncludeGuitar;
            _audio.PreviewIncludeRhythm = _project.Defaults.PreviewIncludeRhythm;

            _notes.HoPoMeasure = _project.Defaults.HoPoMeasure;
            _notes.Gh3SustainClipping = _project.Defaults.Gh3SustainClipping;
            _notes.ForceNoStarPower = _project.Defaults.ForceNoStarPower;
        }
Ejemplo n.º 4
0
    public static bool ContainsSinger(this List<Singer> singersList, Singer currentSinger)
    {
        bool found = false;

        for (int i = 0; i < singersList.Count; i++)
        {
            if (singersList[i].Name == currentSinger.Name)
            {
                found = true;
                break;
            }
        }

        return found;
    }
Ejemplo n.º 5
0
        private EQATEC.Analytics.Monitor.IAnalyticsMonitor _Monitor; //web analytics

        #endregion Fields

        #region Constructors

        public Form1()
        {
            _Monitor = EQATEC.Analytics.Monitor.AnalyticsMonitorFactory.Create("0FEF317EDE3844C28CE7AAAA6C07749D");
            Monitor.Start();
            Monitor.VersionAvailable += new EventHandler<EQATEC.Analytics.Monitor.VersionAvailableEventArgs>(_Monitor_VersionAvailable);
            AppDomain.CurrentDomain.UnhandledException += (s, e) => Monitor.TrackException(e.ExceptionObject as Exception);
            Application.ThreadException += (s, e) => Monitor.TrackException(e.Exception);

            InitializeComponent();

            numberOfRunners = DEFAULT_RUNNER_COUNT;
            UrlOfLogin = "******";
            textBoxOfURL.Text = UrlOfLogin;
            textBox1.Text = DEFAULT_RUNNER_COUNT.ToString();
            sing = new Singer();
            totalTryNumber = 0;
        }
Ejemplo n.º 6
0
        internal ProjectDefaults()
        {
            _minMsBeforeNotesStart = 2000;
            _gh3SustainClipping = true;
            _forceMono = false;
            _forceDownSample = 33075;
            _previewFadeLength = 1000;
            _previewLength = 20000;
            _previewStart = 60000;
            _previewVolume = 100;
            _previewIncludeGuitar = true;
            _previewIncludeRhythm = true;
            _singer = Singer.Male;
            _hopoMeasure = 2.95F;
            _forceNoStarPower = false;
            _songVolume = 0;
            _guitarVolume = 0;
            _year = "";
            _smartModeCrowdImport = false;
            _songVolumeMode = DefaultSettingMode.Game;
            _guitarVolumeMode = DefaultSettingMode.Game;
            _yearMode = DefaultSettingModeBlank.Game;
            _singerMode = DefaultSettingMode.Game;
            _gameId = Game.GH3_Wii;
            _languageId = "";
            _audioExportPlugin = "";
            _audioImportPlugin = "";
            _fileCopyPlugin = "";
            _workingFolder = "";
            _audioGuitarVolume = 100;
            _audioRhythmVolume = 100;
            _audioSongVolume = 100;
            _reapplyAll = false;

            _projectHistory = new List<string>();
        }
Ejemplo n.º 7
0
    static void Main(string[] args)
    {
        var collection = new Dictionary<string, List<Singer>>();

        while (true)
        {
            string currentLine = Console.ReadLine();

            if (currentLine == "End")
            {
                break;
            }

            Match concertMatch = Regex.Match(currentLine, "\\[email protected]([a-zA-Z\\s]*?)\\s[0-9]");
            Match singerMatch = Regex.Match(currentLine, "([a-zA-Z\\s]+)@");
            Match tickets = Regex.Match(currentLine, "(\\s[0-9]+)\\s*?([0-9]+)");
            string[] inputSplit = currentLine.Split(new char[0], StringSplitOptions.RemoveEmptyEntries);

            if (concertMatch.Groups.Count != 2 || singerMatch.Groups.Count != 2 || tickets.Groups.Count != 3)
            {
                continue;
            }
            else
            {
                string name = singerMatch.Groups[1].Value.Trim();
                string concert = concertMatch.Groups[1].Value.Trim();
                int ticketPrice = int.Parse(tickets.Groups[1].Value);
                int ticketCount = int.Parse(tickets.Groups[2].Value);

                long currentSale = ticketCount * ticketPrice;

                Singer currentSinger = new Singer(name);

                if (!collection.ContainsKey(concert))
                {
                    collection.Add(concert, new List<Singer>());
                }

                if (!collection[concert].ContainsSinger(currentSinger))
                {
                    collection[concert].Add(currentSinger);
                }

                int singerIndex = collection[concert].IndexOfSinger(currentSinger);
                collection[concert][singerIndex].Sales += currentSale;
            }

        }

        foreach (var item in collection)
        {
            Console.WriteLine("{0}", item.Key);
            var sortedSingers = item.Value.OrderByDescending(x => x.Sales);
            foreach (Singer currentSinger in sortedSingers)
            {
                Console.WriteLine("#  {0} -> {1}", currentSinger.Name, currentSinger.Sales);
            }
        }
    }
        protected virtual string GetSingerReport(Singer singer)
        {
            StringBuilder singerInfo = new StringBuilder();
            singerInfo.Append(singer.Name + ": ");
            if (singer.Songs.Any())
            {
                var songs = singer.Songs
                  .Select(s => s.Title)
                  .OrderBy(s => s);
                singerInfo.Append(string.Join("; ", songs));
            }
            else
            {
                singerInfo.Append("no songs");
            }

            return singerInfo.ToString();
        }
 protected virtual void ExecuteInsertPerformerCommand(string[] commandWords)
 {
     switch (commandWords[2])
     {
         case "singer":
             var singer = new Singer(commandWords[3]);
             this.InsertPerformer(singer);
             break;
         default:
             break;
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 新しいインスタンスを生成します。
 /// </summary>
 /// <param name="singer">歌手オブジェクト</param>
 /// <param name="audience">観客オブジェクト</param>
 public House(Singer singer, Audience audience)
 {
     this.Singer = singer;
     this.Audience = audience;
     this.LimitCount = 0;
 }
Ejemplo n.º 11
0
 public static Singer CreateSinger(int ID)
 {
     Singer singer = new Singer();
     singer.ID = ID;
     return singer;
 }