コード例 #1
0
        private async void ListModules_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ListModules.SelectedItem != null)
            {
                var module = (ModuleInfosShow)ListModules.SelectedItem;
                switch (currentSelectedButton)
                {
                case 0:
                    await Task.Run(() =>
                    {
                        new AddonExecutor(module.Module.ID, new SCEELibs.SCEELibs(module.Module.ID)).ExecuteDefaultFunction(AddonExecutorFuncTypes.main);
                    });

                    break;

                case 1:
                    await ModulesWriteManager.SetCurrentThemeIDAsync(module.Module.ID, false);

                    if (module.Module.ContainMonacoTheme)
                    {
                        await ModulesWriteManager.SetCurrentMonacoThemeIDAsync(module.Module.ID, false);
                    }

                    Messenger.Default.Send(new SMSNotification {
                        Type = TypeUpdateModule.CurrentThemeUpdated, ID = module.Module.ID
                    });
                    LoadModules();
                    break;
                }
            }
        }
コード例 #2
0
ファイル: Theme.cs プロジェクト: neuronton/SerrisCodeEditor
 public async void setMonacoEditorTheme(int ID)
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                                                 async() =>
     {
         await ModulesWriteManager.SetCurrentMonacoThemeIDAsync(ID, true);
     });
 }