private void ButtonConnection_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            //Window winConn =   CKernelTerminal.OpenChildWindow<ConnectionsWindow>();

            Window winConn = CKernelTerminal.GetViewModelDispatcherInstance().
                             OpenChildWindow <ConnectionsWindow>(showAtStartup: false);

            if (winConn != null)
            {
                _mainWindow.SuspendTopMost(winConn);
                winConn.ShowDialog();
            }
        }
Esempio n. 2
0
        private void VM_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //   System.Threading.Thread.Sleep(0);

            DataGrid dg = (DataGrid)sender;

            int ind = dg.SelectedIndex;

            if (ind >= 0)
            {
                var el = (ModelStockRecord)dg.SelectedItem;


                ViewModelDetailedVM vm = (ViewModelDetailedVM)
                                         CKernelTerminal.GetViewModelDispatcherInstance().GetViewModelChilInst <ViewModelDetailedVM>();

                vm.ConIdToShow = el.ConId;
            }
        }
        public void OpenDetailedVM()
        {
            try
            {
                ViewModelDetailedVM vm = (ViewModelDetailedVM)
                                         CKernelTerminal.GetViewModelDispatcherInstance().GetViewModelChilInst <ViewModelDetailedVM>();

                // int ind = VMControlDatagrid.VM.SelectedIndex;


                CKernelTerminal.OpenChildWindow <DetailedVMWindow>();
                vm.BindGrid();

                /* CKernelTerminal kernTeminal = CKernelTerminal.GetKernelTerminalInstance();
                 *
                 *
                 *
                 *
                 * DetailedVMWindow win =
                 *  (DetailedVMWindow)kernTeminal.ViewModelDispatcher.OpenChildWindow<DetailedVMWindow>();
                 *
                 *
                 * win.Left = this.Left + 10;
                 * win.Top = this.Top + 10;
                 */
                //  win.Left = this.Left - 100;

                //    win.Left = 2800;
                //  win.Top = 400;

                // win.Show();
            }

            catch (Exception e)
            {
                Error("VMWindow.OpenDetailedVM", e);
            }
        }