public void GetSelectedItem()
 {
     switch (mvm.SelectedItem.MenuName)
     {
         case "Turnos":
             TableroView control;
             if (!StockSingleton.Instance.DictionaryControl.ContainsKey("CUADRANTE"))
             {
                 control = new TableroView();
                 StockSingleton.Instance.DictionaryControl.Add("CUADRANTE", control);
             }
             StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["CUADRANTE"];
             break;
         case "Nuevo Asunto":
             NuevoAsuntoTurnoView nuevoTurno;
             if (!StockSingleton.Instance.DictionaryControl.ContainsKey("NT"))
             {
                 nuevoTurno = new NuevoAsuntoTurnoView();
                 StockSingleton.Instance.DictionaryControl.Add("NT", nuevoTurno);
                 //StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["NT"];
             }
             nuevoTurno = StockSingleton.Instance.DictionaryControl["NT"] as NuevoAsuntoTurnoView;
             nuevoTurno.Init(Usuario.User);
             StockSingleton.Instance.SelectedItem = nuevoTurno;
             break;
         case "Borrador":
             HistorialAsuntosDataGrid grid = new HistorialAsuntosDataGrid();
             grid.init("Borrador");
             StockSingleton.Instance.SelectedItem = grid;
             break;
         case "Reportes":
             PantallaReportes reportes;
             if (!StockSingleton.Instance.DictionaryControl.ContainsKey("REPORTES"))
             {
                 reportes = new PantallaReportes();
                 StockSingleton.Instance.DictionaryControl.Add("REPORTES", reportes);
             }
             StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["REPORTES"];
             break;
         case "Tablero":
             Tablero2View tablero;
             if (!StockSingleton.Instance.DictionaryControl.ContainsKey("TABLERO"))
             {
                 tablero = new Tablero2View();
                 StockSingleton.Instance.DictionaryControl.Add("TABLERO", tablero);
             }
             else
             {
                 tablero = StockSingleton.Instance.DictionaryControl["TABLERO"] as Tablero2View;
                 tablero.Refresh();
             }
             StockSingleton.Instance.SelectedItem = tablero;
             break;
         default:
             break;
     }
 }
 private void grdTodos_MouseUp(object sender, MouseButtonEventArgs e)
 {
     HistorialAsuntosDataGrid ha;
     //TA = Todos Asuntos
     if (!StockSingleton.Instance.DictionaryControl.ContainsKey("TA"))
     {
         ha = new HistorialAsuntosDataGrid();
         ha.init("Todos los Asuntos");
         StockSingleton.Instance.DictionaryControl.Add("TA", ha);
     }
     StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["TA"];
 }
 private void grdAtendidos_MouseUp(object sender, MouseButtonEventArgs e)
 {
     HistorialAsuntosDataGrid ha;
     e.Handled = true;
     ////AU = Asuntos Urgentes
     if (!StockSingleton.Instance.DictionaryControl.ContainsKey("AA"))
     {
         ha = new HistorialAsuntosDataGrid();
         ha.init("Asuntos Atendidos");
         StockSingleton.Instance.DictionaryControl.Add("AA", ha);
     }
     StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["AA"];
 }
        private void grdUrgentes_MouseUp(object sender, MouseButtonEventArgs e)
        {
            #region Codigo Viejo
            //HistorialAsuntosDataGrid control=null;
            //if (StockSingleton.Instance.DictionaryControl.ContainsKey("HAU"))
            //    control = StockSingleton.Instance.DictionaryControl["HAU"] as HistorialAsuntosDataGrid;
            //else
            //{
            //    control = new HistorialAsuntosDataGrid();
            //    StockSingleton.Instance.DictionaryControl.Add("HAU", control);
            //}
            //StockSingleton.Instance.AddStack("HAU", control);
            //control = new HistorialAsuntosDataGrid("Asuntos pendientes");
            #endregion

            HistorialAsuntosDataGrid ha;
            e.Handled = true;
            ////AU = Asuntos Urgentes
            if (!StockSingleton.Instance.DictionaryControl.ContainsKey("AU"))
            {
                ha = new HistorialAsuntosDataGrid();
                ha.init("Asuntos Urgentes");
                StockSingleton.Instance.DictionaryControl.Add("AU", ha);
            }
            StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["AU"];
            //else
            //{
            //    StockSingleton.Instance.AgregarAPila("AU");
            //    StockSingleton.Instance.SelectedItem = ha;
            //}
        }
        private void GridPrioritarios_MouseUp(object sender, MouseButtonEventArgs e)
        {
            HistorialAsuntosDataGrid ha;
            //APR = Asuntos PRioritarios
            e.Handled = true;
            if (!StockSingleton.Instance.DictionaryControl.ContainsKey("APR"))
            {
                ha = new HistorialAsuntosDataGrid();
                ha.init("Asuntos Prioritarios");
                StockSingleton.Instance.DictionaryControl.Add("APR", ha);

            }
            StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["APR"];
        }
        private void GridFueraFechaLimite_MouseUp(object sender, MouseButtonEventArgs e)
        {
            HistorialAsuntosDataGrid ha;

            //AAFF = Asuntos Atendidos Fuera Fecha
            e.Handled = true;
            if (!StockSingleton.Instance.DictionaryControl.ContainsKey("AAFF"))
            {
                ha = new HistorialAsuntosDataGrid();
                ha.init("Asuntos Atendidos Fuera de Fecha");
                StockSingleton.Instance.DictionaryControl.Add("AAFF", ha);

            }
            StockSingleton.Instance.SelectedItem = StockSingleton.Instance.DictionaryControl["AAFF"];
        }