Ejemplo n.º 1
0
        private void BrowseForImport()
        {
            var ofd = DialogsUtility.CreateOpenFileDialog("Import");

            DialogsUtility.AddExtension(ofd, "XML File", "*.xml");

            ofd.ShowDialog();

            ImportPath = ofd.FileName;
        }
Ejemplo n.º 2
0
        private void BrowseDBPath()
        {
            var dlg = DialogsUtility.CreateOpenFileDialog("Open Database", checkFileExists: false);

            DialogsUtility.AddExtension(dlg, "SQLite Database", "*.db");

            var res = dlg.ShowDialog();

            if (true == res.Value)
            {
                DbPath = dlg.FileName;
            }
        }
Ejemplo n.º 3
0
        private void Browse()
        {
            var dlg = DialogsUtility.CreateOpenFileDialog("Select an image");

            var    types     = from i in PostContent.GetSupportedTypes() select "*." + i;
            string supported = string.Join(";", types);

            DialogsUtility.AddExtension(dlg, "Images", supported);

            dlg.ShowDialog();

            if (!string.IsNullOrEmpty(dlg.FileName))
            {
                ImagePath = dlg.FileName;
            }
        }
Ejemplo n.º 4
0
        private void SelectDatabase()
        {
            try
            {
                var dlg = DialogsUtility.CreateOpenFileDialog("Select/Create Database", checkFileExists: false);

                dlg.ShowDialog(openDatabaseWindow);

                if (!string.IsNullOrEmpty(dlg.FileName))
                {
                    Path = dlg.FileName;
                }
            }
            catch (Exception e)
            {
                MessageBoxFactory.ShowError(e);
            }
        }