Пример #1
0
        public override void ShowDialog()
        {
            // Test this ....
            // Deberia tomar el culture del main app
            // Thread.CurrentThread.CurrentCulture = new CultureInfo("es-ES");   // en
            // Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");   // en-US

            // System.Windows.Window
            //RadWindow thisWindow = new UserControlDataForm();
            //thisWindow.Header = "Localidades ABM";
            //thisWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            //thisWindow.ResizeMode = System.Windows.ResizeMode.CanMinimize;

            // Test this .....
            //thisWindow.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);

            // 2017-08-02
            var viewModel = new UI.UserControlBase.ViewModel.UserControlViewModel(this);

            // TODO:
            viewModel.SaveEvent += ViewModel_SaveEvent;

            // var testOne = new UserControlView(viewModel);
            RadWindow testOne = new UserWindowView(viewModel);

            //testOne.Owner = this;   // TODO: MainApp here!
            testOne.Header = "Localidades ABM";
            testOne.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            testOne.Height = 400;
            testOne.Width  = 300;
            //testOne.ResizeMode = System.Windows.ResizeMode.CanMinimize;
            //testOne.DataContext = viewModel;

            testOne.ShowDialog();
            //this.userForm.ShowDialog(thisWindow);
        }
Пример #2
0
        void UserDataList_Edit(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
        {
            UserWindowView uv = new UserWindowView(M.AddEdit.User);

            uv.ShowDetached();
        }