Example #1
0
        public MainForm()
        {
            InitializeComponent();

            m_log = new LogForm();

            conv_core.workbench.log_event = m_log.log_message;
            conv_core.workbench.init(Path.GetDirectoryName(Application.ExecutablePath));

            if (!conv_core.workbench.ready)
            {
                MessageBox.Show(
                    this,
                    "Failed to init converter environment",
                    "Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error
                    );
            }
            ;

            OptionsController.load_history(m_history);
            OptionsController.load_options(this);
            OptionsController.load_colors(m_colors);
            ModificationWatchdog.start_watch(this);

            switch (lv_files.Sorting)
            {
            case SortOrder.Ascending:
                b_sort_sources.Image = b_sort_ascend.Image;
                break;

            case SortOrder.Descending:
                b_sort_sources.Image = b_sort_descend.Image;
                break;

            case SortOrder.None:
                b_sort_sources.Image = b_sort_none.Image;
                break;
            }
            ;

            t_mod.Enabled = false;
            b_new_Click(null, null);
            pb_progress.Visible = false;
        }