private void OnRestoreJsonCommandExecuted()
        {
            Message = "";
            IsBusy  = false;

            var code = GetWeb("https://jianghanxia.gitee.io/jpalchemisthan/ver");
            var verj = JToken.Parse(GetEncWeb("https://alchemist.gu3.jp", "/chkver2", $"{{\"ver\":\"{code}\"}}"));

            Task.Factory.StartNew(async() =>
            {
                try
                {
                    var path = DependencyService.Get <ISystem>().GetLocalFilePath();

                    await GetFileAsync($"https://alchemist-dlc2.gu3.jp/assets/{verj.SelectToken("body.environments.alchemist.assets")}/ios/a8a590fa",
                                       Path.Combine(path, "a8a590fa"));
                    await GetFileAsync($"https://alchemist-dlc2.gu3.jp/assets/{verj.SelectToken("body.environments.alchemist.assets")}/ios/f8ed758b",
                                       Path.Combine(path, "f8ed758b"));

                    IsBusy  = true;
                    Message = "还原数据完成";
                }
                catch (Exception ee)
                {
                    Message = ee.Message;
                    IsBusy  = true;
                }
            });
        }
        public override async Task <SelectPictureResult> ExecuteAsync(ChoosePictureRequest request)
        {
            var retResult = new SelectPictureResult();

            //NOTE: send suspend event BEFORE page_disappearing event fires to page is not removed from the view stack
            //...   resume will be called by generic life-cycle

            if (!MediaPicker.IsPickPhotoSupported)
            {
                retResult.Notification.Add("No camera available :(");
                retResult.TaskResult = TaskResult.Failed;
                return(retResult);
            }

            var options = new PickMediaOptions();

            options.CompressionQuality = 100;

            var mediaFile = await MediaPicker.PickPhotoAsync(options);

            if (mediaFile != null)
            {
                byte[] image = null;
                using (MemoryStream ms = new MemoryStream())
                {
                    mediaFile.GetStream().CopyTo(ms);
                    image = ms.ToArray();
                }

                if (request.MaxPixelDimension.HasValue)
                {
                    IResizeImageCommand resizeCommand = DS.Get <IResizeImageCommand>();

                    ResizeImageContext context = new ResizeImageContext
                    {
                        Height                  = request.MaxPixelDimension.Value,
                        Width                   = request.MaxPixelDimension.Value,
                        OriginalImage           = image,
                        UpScaleIfImageIsSmaller = request.UpscaleImageIfSmaller
                    };
                    var resizeResult = await resizeCommand.ExecuteAsync(context);

                    if (resizeResult.IsValid())
                    {
                        image = resizeResult.ResizedImage;
                    }
                }

                retResult.Image = image;

                retResult.TaskResult = TaskResult.Success;
            }
            else
            {
                retResult.TaskResult = TaskResult.Canceled;
                retResult.Notification.Add("Select picture canceled");
            }

            return(retResult);
        }
Пример #3
0
        public MainPageViewModel(INavigationService navigationService, IBackgroundService backgroundService)
            : base(navigationService)
        {
            try
            {
                Title = "Main Page";
                _backgroundService = backgroundService;
                var whenNotRunning = this.WhenAnyValue(x => x.BackgroundRunning, running => running == false);
                var whenRunning    = this.WhenAnyValue(x => x.BackgroundRunning, running => running == true);

                StartServiceCommand = ReactiveCommand.Create(StartService, whenNotRunning);
                StopServiceCommand  = ReactiveCommand.Create(StopService, whenRunning);
                BackgroundRunning   = _backgroundService.IsRunning;
                var subscription = _backgroundService
                                   .WhenBackgroundServiceStateChange
                                   .ToPropertyEx(this, x => x.BackgroundRunning);
                _disposed.Add(subscription);

                _geolocatorService = DependencyService.Resolve <IGeolocationService>();
                var sub = _geolocatorService
                          .WhenPositionChange
                          .Subscribe(OnPositionChanged);
                _disposed.Add(sub);
                IsGpsEnabled = CrossGeolocator.Current.IsGeolocationEnabled;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Пример #4
0
        private async Task GetMealOrderStatus()
        {
            try
            {
                if (CrossConnectivity.Current.IsConnected == true)
                {
                    try
                    {
                        MealOrderStatusCollection = new ObservableCollection <meal_order_status>();


                        HttpClient httpClient = new System.Net.Http.HttpClient();

                        DateTime dt = SelectedDate;

                        string format_date             = dt.ToString("dd-MM-yyyy", CultureInfo.InvariantCulture);
                        var    SelectedMealStatusIndex = StatusList.IndexOf(StatusList.First(x => x == SelectedMealStatus));

                        HttpRequestMessage  request  = new HttpRequestMessage(HttpMethod.Get, Library.URL + "/" + Library.METHODE_GETMEALORDERSTATUS + "/" + SelectedWard.ID + "/" + format_date + "/" + SelectedMealTime.ID + "/" + SelectedMealStatusIndex.ToString() + "/" + Library.KEY_USER_SiteCode);
                        HttpResponseMessage response = await httpClient.SendAsync(request);

                        var data = await response.Content.ReadAsStringAsync();

                        MealOrderStatusCollection = JsonConvert.DeserializeObject <ObservableCollection <meal_order_status> >(data);
                        if (!MealOrderStatusCollection.Any())
                        {
                            IsPageEnabled = false;
                            DependencyService.Get <INotify>().ShowToast("No records found!!");
                            return;
                        }

                        int srNo = 1;
                        foreach (var item in MealOrderStatusCollection)
                        {
                            item.SrNo = srNo++;
                        }

                        // stop
                    }
                    catch (Exception excp)
                    {
                        // stop progressring
                    }
                }
                else
                {
                    await PageDialog.DisplayAlertAsync("Alert!!", "Server is not accessible, please check internet connection.", "OK");
                }
            }
            catch (Exception excp)
            {
                // stop progressring
            }
        }
Пример #5
0
 private void FillMealTime()
 {
     try
     {
         var db = DependencyService.Get <IDBInterface>().GetConnection();
         MealTimeList     = new List <mstr_meal_time>(db.Query <mstr_meal_time>("Select * From mstr_meal_time where status_id ='1' order by ID"));
         SelectedMealTime = MealTimeList.FirstOrDefault();
     }
     catch (Exception exp)
     {
         PageDialog.DisplayAlertAsync("Alert!!", exp.Message, "OK");
     }
 }
Пример #6
0
        public LoginPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService)
        {
            _navigationService = navigationService;
            _pageDialogService = pageDialogService;

            _firebaseAuth = DependencyService.Get<IFirebaseAuthentication>();

            if (!string.IsNullOrEmpty(Settings.UserEmail))
            {
                Email = Settings.UserEmail;
            }
            
        }
        private void FillWard()
        {
            try
            {
                var db = DependencyService.Get <IDBInterface>().GetConnection();

                WardData     = new List <mstr_ward_details>(db.Query <mstr_ward_details>("Select ID,ward_name From mstr_ward_details where ward_type_name not like '%staff%' and status_id ='1' order by ID"));
                SelectedWard = WardData.FirstOrDefault();
            }
            catch (Exception exp)
            {
                PageDialog.DisplayAlertAsync("Alert!!", exp.Message, "OK");
            }
        }
Пример #8
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                CrossMedia.Current.Initialize();
                Xamarin.Forms.Forms.Init(e);

                DependencyService.Register <ISaveFileStreamCommand, UWPSaveFileStreamCommand>();
                DependencyService.Register <IAnalyseImageCommand, UWPAnalyseImageCommand>();
                DependencyService.Register <IResizeImageCommand, UWPResizeImageCommand>();

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }
        private void OnRestoreHanCommandExecuted()
        {
            Message          = "";
            IsBusy           = false;
            IsDownload       = true;
            DownloadProgress = 0;

            var code = GetWeb("https://jianghanxia.gitee.io/jpalchemisthan/ver");
            var verj = JToken.Parse(GetEncWeb("https://alchemist.gu3.jp", "/chkver2", $"{{\"ver\":\"{code}\"}}"));

            Task.Factory.StartNew(async() =>
            {
                try
                {
                    await GetFileAsync($"https://alchemist-dlc2.gu3.jp/assets/{verj.SelectToken("body.environments.alchemist.assets")}/ios/ASSETLIST",
                                       Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "ASSETLIST"));

                    var collection = GetCollection(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "ASSETLIST"));

                    var path = DependencyService.Get <ISystem>().GetLocalFilePath();
                    var cloc = collection.Where(i => i.Path.StartsWith("Loc/"));
                    var nc   = cloc.Count();
                    int ii   = 0;
                    foreach (var item in cloc)
                    {
                        await GetFileAsync($"https://alchemist-dlc2.gu3.jp/assets/{verj.SelectToken("body.environments.alchemist.assets")}/ios/{item.IDStr}",
                                           Path.Combine(path, item.IDStr));
                        DownloadProgress = ii / (float)nc;
                        ii += 1;
                    }

                    IsDownload = false;
                    IsBusy     = true;
                    Message    = "还原文本完成";
                }
                catch (Exception ee)
                {
                    Message    = ee.Message;
                    IsDownload = false;
                    IsBusy     = true;
                }
            });
        }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                DS.Register <IAnalyseImageCommand, UWPAnalyseImageCommand>();
                DS.Register <IResizeImageCommand, UWPResizeImageCommand>();
                DS.Register <IConvertImageCommand, UWPConvertImageCommand>();
                DS.Register <IImageTools, UWPImageTools>();
                CrossMedia.Current.Initialize();

                XForms.Init(e);

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }
Пример #11
0
        private async Task TakePhotoCommandHandler()
        {
            try
            {
                await CrossMedia.Current.Initialize();

                if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
                {
                    await _pageDialogService.DisplayAlertAsync("No Camera", ":( No camera available.", "OK");

                    return;
                }

                var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
                {
                    Directory = "Sample",
                    Name      = "test.jpg"
                });

                if (file == null)
                {
                    return;
                }

                var stream = DependencyService.Get <IDeviceInfoService>().GetFileStream(file);

                var card = await OcrReader.ReadBusinessCard(stream);

                var parameters = new NavigationParameters
                {
                    { "CardDetails", card }
                };
                await _navigationService.NavigateAsync("DetailPage", parameters);
            }
            catch (Exception e)
            {
                await _pageDialogService.DisplayAlertAsync("Error", e.Message, "Cancel");
            }
        }
        public MainPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService)
        {
            ServicePointManager.ServerCertificateValidationCallback = CheckValidationResult;

            NavigationService = navigationService;
            PageDialogService = pageDialogService;

            DownloadDataCommand = new DelegateCommand(async() =>
            {
                try
                {
                    Message = "";
                    IsBusy  = false;
                    await GetFileAsync("https://jianghanxia.gitee.io/jpalchemisthan/JPResult.xlsx", Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "JPResult.xlsx"));
                    //await GetFileAsync("https://jianghanxia.gitee.io/jpalchemisthan/JSONWord.gz", Path.Combine(DependencyService.Get<ISystem>().GetPersonalPath(), "JSONWord.gz"));
                    await PageDialogService.DisplayAlertAsync("完成", "完成数据下载", "OK");
                    IsBusy = true;
                }
                catch (Exception ee)
                {
                    Message = ee.Message;
                    IsBusy  = true;
                }
            });

            DownloadSYFontCommand = new DelegateCommand(async() =>
            {
                try
                {
                    Message = "";
                    IsBusy  = false;
                    await GetFileAsync("https://jianghanxia.gitee.io/jpalchemisthan/SY", Path.Combine(DependencyService.Get <ISystem>().GetLocalFilePath(), "0c9a8047"));
                    await PageDialogService.DisplayAlertAsync("完成", "完成字体下载", "OK");
                    IsBusy = true;
                }
                catch (Exception ee)
                {
                    Message = ee.Message;
                    IsBusy  = true;
                }
            });
            DownloadWRFontCommand = new DelegateCommand(async() =>
            {
                try
                {
                    Message = "";
                    IsBusy  = false;
                    await GetFileAsync("https://jianghanxia.gitee.io/jpalchemisthan/WR", Path.Combine(DependencyService.Get <ISystem>().GetLocalFilePath(), "0c9a8047"));
                    await PageDialogService.DisplayAlertAsync("完成", "完成字体下载", "OK");
                    IsBusy = true;
                }
                catch (Exception ee)
                {
                    Message = ee.Message;
                    IsBusy  = true;
                }
            });

            HHCommand          = new DelegateCommand(OnHHCommandExecuted);
            JsonCommand        = new DelegateCommand(OnJsonCommandExecuted);
            RestoreHanCommand  = new DelegateCommand(OnRestoreHanCommandExecuted);
            RestoreJsonCommand = new DelegateCommand(OnRestoreJsonCommandExecuted);
        }
        private void OnHHCommandExecuted()
        {
            Message          = "";
            IsBusy           = false;
            IsDownload       = true;
            DownloadProgress = 0;

            Task.Factory.StartNew(() =>
            {
                try
                {
                    if (!File.Exists(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "JPResult.xlsx")))
                    {
                        Message = "先下载数据";
                        return;
                    }

                    List <CBItem> cb = new List <CBItem>();
                    Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
                    using (var stream = File.Open(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "JPResult.xlsx"), FileMode.Open, FileAccess.Read))
                    {
                        using (var reader = ExcelReaderFactory.CreateReader(stream))
                        {
                            do
                            {
                                while (reader.Read())
                                {
                                    if (!string.IsNullOrWhiteSpace(reader.GetString(4)))
                                    {
                                        cb.Add(new CBItem {
                                            IDstr = reader.GetString(0), ID = reader.GetString(2), Chinese = reader.GetString(4)
                                        });
                                    }
                                }
                            } while (reader.NextResult());
                        }
                    }

                    var fl = cb.Select(i => i.IDstr).Distinct();
                    var nc = fl.Count();
                    int ii = 0;

                    var path = DependencyService.Get <ISystem>().GetLocalFilePath();
                    Parallel.ForEach(fl, (file) =>
                    {
                        if (File.Exists(Path.Combine(path, file)))
                        {
                            var fcb  = cb.Where(i => i.IDstr == file);
                            var fstr = DateTime.Now.Ticks.ToString();
                            using (var sReader = new StreamReader(new ZlibStream(new FileStream(Path.Combine(path, file), FileMode.Open), CompressionMode.Decompress),
                                                                  Encoding.UTF8))
                            {
                                using (var f = File.Open(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), fstr), FileMode.Create))
                                {
                                    using (var result = new StreamWriter(new ZlibStream(f, CompressionMode.Compress, CompressionLevel.BestCompression), Encoding.UTF8))
                                    {
                                        while (!sReader.EndOfStream)
                                        {
                                            var res = sReader.ReadLine();

                                            var a = res.Split(new[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
                                            if (a.Length > 1 && res != "\r")
                                            {
                                                var h = fcb.Where(i => i.ID == a[0]);
                                                if (h.Any())
                                                {
                                                    a[1] = h.First().Chinese;
                                                }

                                                var concat = string.Join("\t", a);
                                                result.WriteLine(concat);
                                            }
                                            else
                                            {
                                                result.WriteLine(res);
                                            }
                                        }
                                    }
                                }
                            }

                            File.Copy(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), fstr), Path.Combine(path, file), true);
                            File.Delete(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), fstr));
                        }

                        DownloadProgress = ii / (float)nc;
                        ii += 1;
                    });

                    IsDownload = false;
                    IsBusy     = true;
                    Message    = "完成文本汉化";
                }
                catch (Exception ee)
                {
                    Message    = ee.Message;
                    IsDownload = false;
                    IsBusy     = true;
                }
            });
        }
        private void OnJsonCommandExecuted()
        {
            Message          = "";
            IsBusy           = false;
            IsDownload       = true;
            DownloadProgress = 0;

            if (!File.Exists(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "JSONWord.gz")))
            {
                Message = "先下载数据";
                return;
            }

            Task.Factory.StartNew(() =>
            {
                try
                {
                    List <CBItem> cb = new List <CBItem>();
                    using (var sReader =
                               new StreamReader(
                                   new GZipStream(File.Open(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "JSONWord.gz"), FileMode.Open), CompressionMode.Decompress),
                                   Encoding.UTF8))
                    {
                        while (!sReader.EndOfStream)
                        {
                            var res = sReader.ReadLine();
                            var a   = res.Split('\t');
                            cb.Add(new CBItem {
                                IDstr = a[0], ID = a[1], Chinese = a[2]
                            });
                        }
                    }

                    var fl = cb.Select(i => i.IDstr).Distinct();

                    var path = DependencyService.Get <ISystem>().GetLocalFilePath();
                    foreach (var file in fl)
                    {
                        if (File.Exists(Path.Combine(path, file)))
                        {
                            var fcb = cb.Where(i => i.IDstr == file);
                            var nc  = fcb.Count();
                            int ii  = 0;

                            using (var sReader = new StreamReader(new ZlibStream(new FileStream(Path.Combine(path, file), FileMode.Open), CompressionMode.Decompress), Encoding.UTF8))
                            {
                                var json = JToken.Parse(sReader.ReadToEnd());

                                foreach (var cbi in fcb)
                                {
                                    var s = json.SelectToken(cbi.ID);
                                    s?.Replace(cbi.Chinese);

                                    DownloadProgress = ii / (float)nc;
                                    ii += 1;
                                }

                                var sd = json.ToString(Formatting.None);

                                byte[] byteArray    = Encoding.UTF8.GetBytes(sd);
                                MemoryStream stream = new MemoryStream(byteArray);
                                using (var f = File.Open(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "temp"), FileMode.Create))
                                {
                                    using (var result = new ZlibStream(f, CompressionMode.Compress, CompressionLevel.BestCompression))
                                    {
                                        byte[] buffer = new byte[4096];
                                        int n;
                                        while ((n = stream.Read(buffer, 0, buffer.Length)) != 0)
                                        {
                                            result.Write(buffer, 0, n);
                                        }
                                    }
                                }
                            }

                            File.Copy(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "temp"), Path.Combine(path, file), true);
                            File.Delete(Path.Combine(DependencyService.Get <ISystem>().GetPersonalPath(), "temp"));
                        }
                    }

                    IsDownload = false;
                    IsBusy     = true;
                    Message    = "完成数据汉化";
                }
                catch (Exception ee)
                {
                    Message    = ee.Message;
                    IsDownload = false;
                    IsBusy     = true;
                }
            });
        }
Пример #15
0
        public SecondPageViewModel()
        {
            _musicPlayer = DependencyService.Get <IMusicPlayer>();

            _timer                 = new CountDownTimer(TimeSpan.FromSeconds(300));
            _timer.Interval        = TimeSpan.FromSeconds(1);
            _timer.IntervalPassed += _timer_IntervalPassed;

            Plus1MinCommand = new DelegateCommand(() => {
                _timer.CurrentTime.Add(TimeSpan.FromMinutes(1));
                UpdateTimer();
            });

            Plus10SecCommand = new DelegateCommand(() => {
                _timer.CurrentTime.Add(TimeSpan.FromSeconds(10));
                UpdateTimer();
            });

            Minus10SecCommand = new DelegateCommand(() => {
                _timer.CurrentTime.Subtract(TimeSpan.FromSeconds(10));
                UpdateTimer();
            });


            Minus1MinCommand = new DelegateCommand(() => {
                _timer.CurrentTime.Subtract(TimeSpan.FromMinutes(1));
                UpdateTimer();
            });


            StartTimerCommand = new DelegateCommand(() => {
                _timer.Start();
                UpdateTimer();
            });


            StopTimerCommand = new DelegateCommand(() => {
                _timer.Stop();
                UpdateTimer();
            });


            ResetTimerCommand = new DelegateCommand(() => {
                _timer.Reset();
                UpdateTimer();
            });

            BGMStopCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
            });

            BGMOpeningCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("openingBGM");
            });

            BGMRoleCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("confirmBGM");
            });

            BGMMorningCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("morningBGM");
            });
            BGMDayTimeCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("discussionBGM");
            });

            BGMVoteCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("voteBGM");
            });

            BGMExecuteCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("executionBGM");
            });

            BGMNightCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("nightBGM");
            });


            BGMVillagerWinCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("victoryBGM_villagers");
            });

            BGMWerewolfWinCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("victoryBGM_werewolf");
            });

            BGMThirdPartyWinCommand = new DelegateCommand(() => {
                _musicPlayer.Stop();
                _musicPlayer.PlayAsync("victoryBGM_3rdParty");
            });
        }