コード例 #1
0
ファイル: IPC.cs プロジェクト: notperry1234567890/osu
 public void ChangeMode(OsuModes mode)
 {
     GameBase.Scheduler.Add(delegate
     {
         GameBase.ChangeMode(mode);
     });
 }
コード例 #2
0
ファイル: IPC.cs プロジェクト: notperry1234567890/osu
 public void HandleArguments(string args)
 {
     GameBase.Scheduler.Add(delegate
     {
         if (args.StartsWith("osu://"))
         {
             GameBase.BringToFront();
             ChatEngine.HandleLink(args);
         }
         else
         {
             //file handling.
             OsuModes gs = GameBase.ReceiveFile(args);
             if (gs != OsuModes.Unknown)
             {
                 if (GameBase.IsMinimized && GameBase.Form.Visible)
                 {
                     GameBase.Form.WindowState = FormWindowState.Normal;
                     GameBase.BringToFront();
                 }
                 GameBase.ChangeMode(gs, true);
             }
         }
     });
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: al590/NexDirect
        private async void search(bool newSearch)
        {
            try
            {
                searchingLoading.Visibility = Visibility.Visible;

                string        searchText = lastSearchText = newSearch ? searchBox.Text : lastSearchText;
                OsuRankStatus rankedVal  = lastRankedVal = newSearch ? (rankedStatusBox.SelectedItem as KVItem <OsuRankStatus>).Value : lastRankedVal;
                OsuModes      modeVal    = lastModeVal = newSearch ? (modeSelectBox.SelectedItem as KVItem <OsuModes>).Value : lastModeVal;

                BloodcatIdFilter?viaVal  = null;
                bool             osuMode = SettingManager.Get("useOfficialOsu");
                if (!osuMode)
                {
                    viaVal = lastBloodcatNumbersFilterVal = newSearch ? (searchViaSelectBox.Visibility == Visibility.Hidden ? null : (BloodcatIdFilter?)(searchViaSelectBox.SelectedItem as KVItem <BloodcatIdFilter>).Value) : lastBloodcatNumbersFilterVal;
                }

                searchCurrentPage = newSearch ? 1 : (searchCurrentPage + 1);

                SearchResultSet results;
                if (osuMode)
                {
                    results = await Osu.Search(searchText, rankedVal, modeVal, searchCurrentPage);
                }
                else
                {
                    results = await Bloodcat.Search(searchText, rankedVal, modeVal, viaVal, searchCurrentPage);
                }

                lastSearchResults = results;

                populateBeatmaps(results.Results, newSearch);
            }
            catch (Osu.SearchNotSupportedException) { MessageBox.Show("Sorry, this mode of Ranking search is currently not supported via the official osu! servers."); }
            catch (Osu.CookiesExpiredException)
            {
                if (await DownloadManagement.TryRenewOsuCookies())
                {
                    search(newSearch); // success, try at it again
                }
                return;
            }
            catch (Exception ex) { MessageBox.Show("There was an error searching for beatmaps...\n\n" + ex.ToString()); }
            finally { searchingLoading.Visibility = Visibility.Hidden; }
        }
コード例 #4
0
 internal void ChangeMode(OsuModes mode)
 {
     GameBase.PerformanceMonitor.BeginCollecting(FrameTimeType.IPC);
     runAction(() => ipcClient.ChangeMode(mode));
     GameBase.PerformanceMonitor.EndCollecting(FrameTimeType.IPC);
 }
コード例 #5
0
 public void ChangeMode(OsuModes mode)
 {
 }