예제 #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;
        }
예제 #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;
        }
예제 #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)
            {
            }
        }
예제 #4
0
파일: Program.cs 프로젝트: KSLcom/Launcher
        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);
        }
예제 #5
0
파일: Program.cs 프로젝트: KSLcom/Launcher
        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);
        }
예제 #6
0
 public Downloader(LauncherForm mainForm)
 {
     _instanceMainForm = mainForm;
 }