Beispiel #1
0
        private void LLFF_Click(object sender, EventArgs e)
        {
            DialogResult DR = LoadUIFromFile.ShowDialog();
            if (DR == DialogResult.OK)
            {
                try
                {
                    UIControls UI = new UIControls();
                    UI = UI.LoadFromFile(LoadUIFromFile.FileName);
                    UpdateUI(UI);
                }
                catch (Exception error)
                {
                    MessageBox.Show(error.ToString());
                    //MessageBox.Show("Error Loading UI/Language from the specified File", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

            }
        }
Beispiel #2
0
        private void LangCmbBx_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Effect != DragDropEffects.Copy) return;

            string ourFile = ((string[])e.Data.GetData(DataFormats.FileDrop))[0];
            try
            {
                UIControls UI = new UIControls();
                UI = UI.LoadFromFile(ourFile);
                DialogResult DR = MessageBox.Show("Are you sure you want to load the UI from this file?", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (DR == DialogResult.Yes)
                    UpdateUI(UI);
                else
                    return;
            }
            catch (Exception error)
            {
                MessageBox.Show(error.ToString());
                MessageBox.Show("Error Loading the UI File", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }