public void removerJanela(Window wnd)
        {
            janelas.Remove(wnd);

            foreach (object obj in listJanelas.Items)
            {
                JanelaPlaceHolder holder = (JanelaPlaceHolder)obj;
                if (holder.wnd == wnd)
                {
                    listJanelas.Items.Remove(holder);
                }
            }
        }
        private void btnFecharJanela_onClick(object sender, RoutedEventArgs e)
        {
            int janela_id = listJanelas.SelectedIndex;

            if (janela_id < 0)
            {
                return;
            }

            JanelaPlaceHolder jph = (JanelaPlaceHolder)listJanelas.SelectedItem;

            janelas.Remove(jph.wnd);
            listJanelas.Items.RemoveAt(janela_id);
            jph.wnd.Close();
        }
        public void addWindow(Window wnd)
        {
            janelas.Add(wnd);

            janelaIndex++;

            String[]           cmd = null;
            SingleInstance.App app = (SingleInstance.App)Application.Current;
            cmd = app.commandLine;
            String cmd_str = null;

            if (cmd != null)
            {
                foreach (string str in cmd)
                {
                    cmd_str += str + " ";
                }
            }

            bool bfile = System.IO.File.Exists(cmd_str);

            if (bfile == true)
            {
                wnd.Title = cmd_str;
                cmd_str   = System.IO.File.ReadAllText(cmd_str);
            }



            if (cmd == null)
            {
                cmd_str = "sem linha de argumentos";
            }
            ((WndEditor)wnd).addText(cmd_str);

            JanelaPlaceHolder holder = new JanelaPlaceHolder(wnd);

            listJanelas.Items.Add(holder);


            this.Activate();
            wnd.Activate();
        }