示例#1
0
            private void OpenFolders(params Entity[] a_entities)
            {
                bool error = a_entities.Count() > MAX_TO_OPEN;

                foreach (var entity in a_entities.Take(MAX_TO_OPEN))
                {
                    try
                    {
                        if (!Directory.Exists(entity.GetDirectory()))
                        {
                            error = true;
                            continue;
                        }

                        Process.Start(entity.GetDirectory());
                    }
                    catch (Exception ex)
                    {
                        Loggers.GUI.Error("Exception", ex);
                        error = true;
                    }
                }

                if (error)
                {
                    SystemSounds.Asterisk.Play();
                    GUI.UpdateButtons();
                }
            }
        private void chaptersListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (GUI.SelectedSerie != null)
            {
                m_chapters_visual_states[GUI.SelectedSerie] =
                    new ListBoxVisualState(chaptersListBox);
            }

            GUI.UpdateButtons();
        }