Esempio n. 1
0
        public AuthenticationForm(LauncherForm launcher)
        {
            InitializeComponent();

            preventClose       = true;
            authenticationType = 1;
            uid            = "";
            password       = "";
            loginTime      = DateTime.MinValue.ToString();
            trials         = 0;
            login          = false;
            postAuthScript = "";
            dtTokens       = InitTokens();
            pingUrl        = "";
            pingResult     = "";
            myLauncher     = launcher;
        }
Esempio n. 2
0
        public AuthenticationForm(LauncherForm launcher)
        {
            InitializeComponent();

            preventClose = true;
            authenticationType = 1;
            uid = "";
            password = "";
            loginTime = DateTime.MinValue.ToString();
            trials = 0;
            login = false;
            postAuthScript = "";
            dtTokens = InitTokens();
            pingUrl = "";
            pingResult = "";
            myLauncher = launcher;
        }
Esempio n. 3
0
        async private static void DoSomethingOnFinish(object sender, AsyncCompletedEventArgs e)
        {
            try
            {
                if (!Directory.Exists(Program.currentDir + "/update/"))
                {
                    Directory.CreateDirectory(Program.currentDir + "/update");
                }

                System.IO.DirectoryInfo di = new DirectoryInfo(Program.currentDir + "/");

                try
                {
                    File.Delete("daemon.exe");
                    Directory.Delete("asset", true);
                }
                catch (Exception) {  }
                using (ZipFile zipFile = ZipFile.Read("update.zip"))
                {
                    foreach (ZipEntry fileName in zipFile)
                    {
                        try
                        {
                            fileName.Extract(Program.currentDir + "/", ExtractExistingFileAction.OverwriteSilently);
                        }
                        catch (Exception) {  }
                    }

                    try
                    {
                        await Task.Delay(7000);

                        LauncherForm.doTask();
                        await Task.Delay(2000);
                    }
                    catch (Exception) {  }
                }
            }
            catch (Exception)
            {
            }
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LauncherForm myLauncher = new LauncherForm();
            myLauncher.IsLauncherVisible = false;

            if (args.Length > 0)
            {
                foreach (string arg in args)
                {
                    switch (arg)
                    {
                        case "-i":
                            myLauncher.IsLauncherVisible = true;
                            break;
                    }
                }
            }

            Application.Run(myLauncher);
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LauncherForm myLauncher = new LauncherForm();

            myLauncher.IsLauncherVisible = false;

            if (args.Length > 0)
            {
                foreach (string arg in args)
                {
                    switch (arg)
                    {
                    case "-i":
                        myLauncher.IsLauncherVisible = true;
                        break;
                    }
                }
            }

            Application.Run(myLauncher);
        }
Esempio n. 6
0
 public Downloader(LauncherForm mainForm)
 {
     _instanceMainForm = mainForm;
 }