当前位置: 首页>>代码示例>>C#>>正文


C# IWindowManager.ShowDialog方法代码示例

本文整理汇总了C#中IWindowManager.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# IWindowManager.ShowDialog方法的具体用法?C# IWindowManager.ShowDialog怎么用?C# IWindowManager.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IWindowManager的用法示例。


在下文中一共展示了IWindowManager.ShowDialog方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AlbumViewModel

        public AlbumViewModel(Album album)
        {
            _events = IoC.Get<IEventAggregator>();
            _windowManager = IoC.Get<IWindowManager>();
            Model = album;
            Tracks = new ReactiveList<TrackViewModel>();
            Tracks.AddRange(album.Tracks.Select(x => new TrackViewModel(x)));

            AddAlbumToPlaylistCommand = new ReactiveCommand();
            AddAlbumToPlaylistCommand.Subscribe(param => _events.Publish(Tracks.Select(x => x.Track).ToList()));

            EditorEditAlbumsCommand = new ReactiveCommand();
            EditorEditAlbumsCommand.Subscribe(
                param => _windowManager.ShowDialog(new AlbumTagEditorViewModel(Tracks.Select(x => x.Track.Model).ToList())));
        }
开发者ID:gfdittmer,项目名称:MiSharp,代码行数:15,代码来源:AlbumViewModel.cs

示例2: ArtistViewModel

        public ArtistViewModel(Artist artist)
        {
            Model = artist;
            Albums = artist.Albums;
            _events = IoC.Get<IEventAggregator>();
            _windowManager = IoC.Get<IWindowManager>();

            AddArtistToPlaylistCommand = new ReactiveCommand();
            AddArtistToPlaylistCommand.Subscribe(
                param => _events.Publish(Albums.SelectMany(x => x.Tracks).Select(x => x).ToList()));

            EditorEditArtistsCommand = new ReactiveCommand();
            EditorEditArtistsCommand.Subscribe(param => _windowManager.ShowDialog(
                new ArtistTagEditorViewModel(Albums.SelectMany(x => x.Tracks).Select(x => x.Model).ToList())));
        }
开发者ID:gfdittmer,项目名称:MiSharp,代码行数:15,代码来源:ArtistViewModel.cs

示例3: ShowAddNewUser

        public static void ShowAddNewUser(SimpleContainer container, IWindowManager windowManager)
        {
            var askUser =
                            container.GetInstance(typeof(SpecifyValueViewModel),
                                                   "SpecifyValueViewModel") as
                            SpecifyValueViewModel;

            if (askUser == null)
            {
                Common.ShowMessageBox("EPIC FAIL", "RUN AROUND WITH NO REASON",
                                      false, true);
                return;
            }

            askUser.ShowComboBox = false;
            askUser.Message = "Please enter your username (this will be used to log changes made to the data)";
            askUser.Title = "Add New User";

            windowManager.ShowDialog(askUser);
            var user = askUser.Text;
            if (!String.IsNullOrWhiteSpace(user))
            {
                UserHelper.Add(user);
            }
        }
开发者ID:rwlamont,项目名称:AllItUp,代码行数:25,代码来源:Common.cs

示例4: RequestReason

        public static ChangeReason RequestReason(SimpleContainer container, IWindowManager windowManager, int defaultReasonNumber)
        {
            var specify = (SpecifyValueViewModel)container.GetInstance(typeof(SpecifyValueViewModel), "SpecifyValueViewModel");
            specify.Title = "Log Reason";
            specify.Message = "Please specify a reason for this change:";
            specify.ShowComboBox = true;
            specify.ComboBoxItems = ChangeReason.ChangeReasons.Where(x => !x.Reason.StartsWith("[Importer]")).Select(x => x.Reason).ToList();
            specify.ShowCancel = true;

            var defaultReason = ChangeReason.ChangeReasons.FirstOrDefault(x => x.ID == defaultReasonNumber);

            if (defaultReason != null)
                specify.ComboBoxSelectedIndex = specify.ComboBoxItems.IndexOf(defaultReason.Reason);

            windowManager.ShowDialog(specify);

            if (specify.WasCanceled)
                return null;

            return ChangeReason.ChangeReasons.FirstOrDefault(x => x.Reason == specify.Text) ?? ChangeReason.AddNewChangeReason(specify.Text);
        }
开发者ID:rwlamont,项目名称:AllItUp,代码行数:21,代码来源:Common.cs

示例5: Execute

        public void Execute(IWindowManager windowManager, IQuestionDialog questionDialog)
        {
            var question = new Question(
                null,
                Text,
                _possibleAnswers
                );

            questionDialog.Setup(
                Caption,
                new[] {question}
                );

            questionDialog.WasShutdown += delegate{
                if(_handleResult != null)
                    _handleResult(question.Answer);
                else if(question.Answer == Answer.No || question.Answer == Answer.Cancel)
                {
                    Completed(this, new CancelResult());
                    return;
                }

                Completed(this, null);
            };

            windowManager.ShowDialog(questionDialog, null, null);
        }
开发者ID:Buthrakaur,项目名称:WpfModularApp,代码行数:27,代码来源:MessageBoxResult.cs

示例6: MantenerAlmacenViewModel

        public MantenerAlmacenViewModel(IWindowManager windowmanager)
        {
            _windowManager = windowmanager;
            uSQL = new UbigeoSQL();
            tSQL = new TiendaSQL();
            pxaSQL = new ProductoSQL();
            aSQL = new AlmacenSQL();
            tzSQL = new TipoZonaSQL();
            int existe = aSQL.existeCentral();
            Editar = true;

            if (existe > 0)
            {
                Almacenes central = aSQL.BuscarAlmacen(-1, -1, 3);
                accion = 2;
                Editar = false;
                /* idTienda = t.IdTienda;  */
                /*carga de la informacion general*/
                TxtNombre = central.Nombre;
                TxtTelefono = central.Telefono;
                TxtDir = central.Direccion;
                List<Ubigeo> u = uSQL.buscarUbigeo2(central.IdUbigeo);

                /*carga de los combobox*/
                CmbDpto = uSQL.BuscarDpto();
                Index1 = CmbDpto.FindIndex(x => x.CodDpto == u[0].CodDpto);
                SelectedDpto = u[0].CodDpto;
                Index2 = CmbProv.FindIndex(x => x.CodProv == u[0].CodProv);
                SelectedProv = u[0].CodProv;
                Index3 = CmbDist.FindIndex(x => x.CodDist == u[0].CodDist);

                Content = "Ver distribución";
                TxtNumColumns = central.NroColumnas.ToString();
                TxtNumRows = central.NroFilas.ToString();
                TxtAltura = central.Altura.ToString();

                lstZonas = tzSQL.ObtenerZonasxAlmacen(central.IdAlmacen, 3);
                _windowManager.ShowDialog(new AlertViewModel(_windowManager, "El almacen central ya existe"));
            }
            else if (existe == 0)
            {
                CmbZonas = (new TipoZonaSQL()).BuscarZona();
                CmbDpto = uSQL.BuscarDpto();
                Content = "Generar distribución";
            }
            else
            {
                _windowManager.ShowDialog(new AlertViewModel(_windowManager, "Ocurrió un problema"));
            }
        }
开发者ID:alfonsobp,项目名称:made-in-house,代码行数:50,代码来源:MantenerAlmacenViewModel.cs

示例7: CreateNewCase

 public static bool CreateNewCase(object rootModel, IWindowManager windowManager)
 {
     _logger.InfoFormat("Creating a new case");
     return windowManager.ShowDialog(rootModel).GetValueOrDefault(false);
 }
开发者ID:KonstantinDavidov,项目名称:mytestRep,代码行数:5,代码来源:BusinessLogicHelper.cs


注:本文中的IWindowManager.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。