Ejemplo n.º 1
0
        private void ShowOpenFileDialog()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog(WindowWrapper.GetForegroundWindowWrapper()) == DialogResult.OK)
            {
                resultString = ofd.FileName;
            }
            System.Threading.Thread.CurrentThread.Abort();
        }
Ejemplo n.º 2
0
        private void ShowFolderBrowserDialog()
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog(WindowWrapper.GetForegroundWindowWrapper()) == DialogResult.OK)
            {
                resultString = fbd.SelectedPath;
            }
            System.Threading.Thread.CurrentThread.Abort();
        }
        public static string GetPrinter()
        {
            string      printerSelected = "";
            PrintDialog printDialog1    = new PrintDialog();
            //printDialog1.Document = printDocument1;
            DialogResult result = printDialog1.ShowDialog(WindowWrapper.GetForegroundWindowWrapper());

            if (result == DialogResult.OK)
            {
                printerSelected = printDialog1.PrinterSettings.PrinterName;
            }

            return(printerSelected);
        }