示例#1
0
        private void LoadPaths()
        {
            comboBoxDestination.Items.Clear();
            IniLocations locations = new IniLocations();

            if (!locations.Init())
            {
                string error = "No FB2EPUBExt.INI file found in any of the paths";
                Program.Log.Error(error);
            }
            locations.Load();
            string defaultPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal),
                                              "My Books\\");

            if (!Directory.Exists(defaultPath))
            {
                try
                {
                    Directory.CreateDirectory(defaultPath);
                }
                catch (Exception)
                {
                }
            }
            comboBoxDestination.Items.Add(defaultPath);

            foreach (var location in locations.GetGuiLocations())
            {
                comboBoxDestination.Items.Add(location.Path);
            }
        }
示例#2
0
        private void LoadPaths()
        {
            comboBoxDestination.Items.Clear();
            IniLocations locations = new IniLocations();
            if (!locations.Init())
            {
                string error = "No FB2EPUBExt.INI file found in any of the paths";
                Program.Log.Error(error);
            }
            locations.Load();
            string defaultPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal),
                                              "My Books\\");
            if (!Directory.Exists(defaultPath))
            {
                try
                {
                    Directory.CreateDirectory(defaultPath);
                }
                catch (Exception)
                {

                }
            }
            comboBoxDestination.Items.Add(defaultPath);

            foreach (var location in locations.GetGuiLocations())
            {
                comboBoxDestination.Items.Add(location.Path);
            }
        }