Ejemplo n.º 1
0
        private void mainForm_Load(object sender, EventArgs e)
        {
            try
            {
                encodeOptions.setMain(this);
                if (File.Exists(Application.StartupPath + "\\settings.xml"))
                {
                    MainSettings main = SettingsController.loadSettings();

                    encodeOptions.loadSettings(main);

                }
                else
                {

                    encodeOptions.setLanguageDefault();
                }

                loadSystemInfo();

                cbAfterEncode.SelectedIndex = 0;

                if (MiniSystem.isConnected().Equals("Yes"))
                {
                    Updater tempUpdater = new Updater(true);
                    tempUpdater.Dispose();
                    MiniOnline.GetNews(newsList);
                }
                if (!Directory.Exists(Application.StartupPath + "\\Temp\\"))
                    Directory.CreateDirectory(Application.StartupPath + "\\Temp\\");
            }
            catch (Exception error)
            {
                LogBookController.Instance.addLogLine("Error Starting up. (" + error.Source + ", " + error.Message + ", " + error.Data + ", " + error.ToString() + ")", LogMessageCategories.Error);
            }
        }
Ejemplo n.º 2
0
        public Updater(Boolean hide)
        {

            InitializeComponent();

            this.Text = LanguageController.Instance.getLanguageString("updaterTitle");
            coreTab.Text = LanguageController.Instance.getLanguageString("coreTabTitle");
            pluginTab.Text = LanguageController.Instance.getLanguageString("pluginsTabTitle");
            audioTab.Text = LanguageController.Instance.getLanguageString("audioTabTitle");
            videoTab.Text = LanguageController.Instance.getLanguageString("videoTabTitle");
            muxTab.Text = LanguageController.Instance.getLanguageString("muxingTabTitle");
            otherTab.Text = LanguageController.Instance.getLanguageString("otherTabTitle");

            coreList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");
            pluginsList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");
            audioList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");
            videoList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");
            muxingList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");
            otherList.Columns[0].Text = LanguageController.Instance.getLanguageString("updateColumn1");

            coreList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");
            pluginsList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");
            audioList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");
            videoList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");
            muxingList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");
            otherList.Columns[1].Text = LanguageController.Instance.getLanguageString("updateColumn2");

            coreList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");
            pluginsList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");
            audioList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");
            videoList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");
            muxingList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");
            otherList.Columns[2].Text = LanguageController.Instance.getLanguageString("updateColumn3");

            coreList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");
            pluginsList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");
            audioList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");
            videoList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");
            muxingList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");
            otherList.Columns[3].Text = LanguageController.Instance.getLanguageString("updateColumn4");

            coreList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");
            pluginsList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");
            audioList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");
            videoList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");
            muxingList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");
            otherList.Columns[4].Text = LanguageController.Instance.getLanguageString("updateColumn5");

            customPath.Text = LanguageController.Instance.getLanguageString("updateCustomPath");
            updateButton.Text = LanguageController.Instance.getLanguageString("updateUpdateButton");
            cancelButton.Text = LanguageController.Instance.getLanguageString("updateCancelButton");

          

            foreach (string key in toolInfo.Keys)
            {
                ExtApplication tempTool = toolInfo[key];

                String updateText = "";
                if (tempTool.localVersion != tempTool.onlineVersion)
                {
                    if (!String.IsNullOrEmpty(tempTool.onlineVersion) && !tempTool.localVersion.Equals("Custom") && !tempTool.localVersion.Equals("Ignore"))
                    {
                        if (!key.Equals("avs"))
                            updateText = "Update Required";
                        else
                        {
                            if (!tempTool.isInstalled())
                                updateText = "Update Required";
                            else
                            {
                                updateText = "Up to Date";
                                tempTool.localVersion = tempTool.onlineVersion;
                            }
                        }
                    }
                }
                else
                {
                    updateText = "Up to Date";
                }
                string[] tempInfo = { "", key, tempTool.localVersion, tempTool.onlineVersion, updateText };
                ListViewItem tempListItem = new ListViewItem(tempInfo);

                if (updateText.Equals("Update Required"))
                {
                    // LogBook.Instance.addLogLine("Updates available for " + key + ".", "UpdateChecking", "", false);
                    if (hide)
                    {
                        if (MessageBox.Show(LanguageController.Instance.getLanguageString("updateMessage"), "Updates", MessageBoxButtons.YesNo) == DialogResult.Yes)
                        {
                            Updater upd = new Updater(false);
                            this.Close();
                            upd.ShowDialog();
                            return;

                        }
                        else
                        {
                            this.Close();
                            return;
                        }
                    }
                    tempListItem.Checked = true;
                }
                switch (tempTool.getCategory())
                {
                    case "core":
                        coreList.Items.Add(tempListItem);
                        break;
                    case "plugin":
                        pluginsList.Items.Add(tempListItem);
                        break;
                    case "audio":
                        audioList.Items.Add(tempListItem);
                        break;
                    case "video":
                        videoList.Items.Add(tempListItem);
                        break;
                    case "muxer":
                        muxingList.Items.Add(tempListItem);
                        break;
                    case "other":
                        otherList.Items.Add(tempListItem);
                        break;
                }




            }
        }
Ejemplo n.º 3
0
 private void btnApps_Click(object sender, EventArgs e)
 {
     Updater updater = new Updater(false);
     updater.Show();
 }