Exemplo n.º 1
0
 private void txtNewProfile_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         EveLauncher.CreateSettingsProfile(txtNewProfile.Text);
         txtNewProfile.Visible = false;
         cmbSettings.Visible   = true;
         UpdateSettingsProfilesList();
         cmbSettings.SelectedItem = txtNewProfile.Text;
     }
     else if (e.KeyCode == Keys.Escape)
     {
         txtNewProfile.Text        = string.Empty;
         txtNewProfile.Visible     = false;
         cmbSettings.Visible       = true;
         cmbSettings.SelectedIndex = 0;
     }
     else if ((e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z) || (e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9) || e.KeyCode == Keys.Back || e.KeyCode == Keys.Delete || e.KeyCode == Keys.Left || e.KeyCode == Keys.Right || e.KeyCode == Keys.Home || e.KeyCode == Keys.End)
     {
         e.SuppressKeyPress = false;
     }
     else
     {
         e.SuppressKeyPress = true;
     }
 }
Exemplo n.º 2
0
 private void UpdateSettingsProfilesList()
 {
     cmbSettings.Items.Clear();
     cmbSettings.Items.AddRange(EveLauncher.GetSettingsProfilesList());
     cmbSettings.Items.Add("<add new profile>");
     cmbSettings.SelectedIndex = 0;
 }
Exemplo n.º 3
0
 public static void SetEveInstallationDirectory()
 {
     if (initCompleted)
     {
         string exefilePath = EveLauncher.FindExefile();
         if (File.Exists(exefilePath))
         {
             eclReg.SetValue(KEY_EXEFILE_PATH, exefilePath);
         }
         else
         {
             throw new Exception("Eve client not found.");
         }
     }
 }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            try
            {
                log = new Log();
                EveLauncher launcher = new EveLauncher();
                Settings.Init();

                if (!Settings.CheckIfECLPOpenHandlerExists())
                    Settings.SetECLPFileOpenHandler();

                string username = string.Empty;
                string password = string.Empty;
                string settingsProfile = string.Empty;

                if (args.Length > 0)
                {
                    if (args[0].ToLower().Trim().StartsWith("/profile:"))
                    {
                        string eclpFileName = args[0].Substring(9);
                        log.WriteLine("Using profile {0}", eclpFileName);
                        DPAPI dpapi = new DPAPI(eclpFileName);
                        username = dpapi.GetUserName();
                        settingsProfile = dpapi.GetSettingsProfile();
                        password = dpapi.GetPassword();
                        log.WriteLine("Username={0}, settingsProfile={1}, password length={2}", username, settingsProfile, password.Length.ToString());
                        string ssoToken = launcher.GetSSO(username, password);
                        log.WriteLine("\nEverything is OK, starting EVE client...");
                        launcher.RunEVE(ssoToken, settingsProfile);
                    }
                }
                else
                {
                    frmMain form = new frmMain(launcher);
                    form.Text = ((AssemblyTitleAttribute)(Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyTitleAttribute)))).Title;
                    Application.Run(form);
                }
            }
            catch (Exception ex)
            {
                log.WriteLine("Exception:");
                log.WriteLine(false, ex.Message);
                log.WriteLine(false, ex.StackTrace);
                new ErrorForm(ex).ShowDialog();
            }
        } 
Exemplo n.º 5
0
 public frmMain(EveLauncher launcher)
 {
     this.launcher = launcher;
     InitializeComponent();
     characterChallengeTab.Parent = null;
 }