Esempio n. 1
0
 public DirSearch(GuiController gc)
 {
     this.Controller = gc;
     this.AutoScaleMode = AutoScaleMode.None;
     InitializeComponent();
     InitializeComponent2();
 }
Esempio n. 2
0
        public DebugWindow(GuiController gc)
        {
            Controller = gc;

            InitializeComponent();
            this.Icon= Controller.GetAppIcon();
        }
Esempio n. 3
0
        static void Main()
        {
            int RunAsMode = GetRegistrySetting();
            bool RegNeedsSetting = false;
            if (RunAsMode < 0) {
                RegNeedsSetting = true;
            }

            WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            bool hasAdministrativeRight = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (RunAsMode == 1)  {
                if (!hasAdministrativeRight) {

                    if (RunElevated(Application.ExecutablePath)) {

                        Application.Exit();
                        return;
                    }

                } else {
                    // let the old process finish
                    System.Threading.Thread.Sleep(500);
                }
            }

            Process[] LauncherProcesses = Process.GetProcessesByName("ProjectSWG Launcher");

            foreach (Process p in LauncherProcesses) {
                Debug.WriteLine(p.ToString()  );

                if (p.Id == Process.GetCurrentProcess().Id) {
                    continue;
                }

                MessageBox.Show("ProjectSWG Launcher is already running. If it doesn't respond, close it manually through task manager. (Ctrl+Shift+Esc on some Windows versions).","ProjectSWG Launcher",MessageBoxButtons.OK);
                Application.Exit();
                return;

            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            GuiController gc = new GuiController(RunAsMode);
            gc.ReadConfig();
            gc.CheckScanNeeded();
            gc.RunLauncher();
            if (RegNeedsSetting) {
                gc.LaunchAdmSettings();
            }
            Application.Run();
        }
Esempio n. 4
0
        public SWGFile(String File, int Strict, String MDFiveSum, int Size, GuiController ctrl)
        {
            Filename = File;
            StrictnessLevel = Strict;
            Checksum = MDFiveSum;
            Filesize = Size;

            SwgdirStatusLevel = -1;
            SavepathStatusLevel = -1;

            this.Controller = ctrl;
        }
        public PatchCheckerDialog(GuiController gc)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //

            this.Controller = gc;

            InitializeComponent();
            this.Icon= Controller.GetAppIcon();
            this.setTimer();
        }
Esempio n. 6
0
        public launcher2(GuiController gc)
        {
            this.Controller = gc;
            this.StatusProcessor = new StatusProcessor(gc);

            this.AutoScaleMode = AutoScaleMode.None;

            InitializeComponent();
            InitializeComponent2();

            this.Show();

            Point mouseDownPoint = Point.Empty;
            this.Process();
        }
Esempio n. 7
0
        public LAUNCHOPTIONS(GuiController gc)
        {
            this.Controller = gc;

            this.AutoScaleMode = AutoScaleMode.None;

            InitializeComponent();
            InitializeComponent2();

            soundControl.Checked = Controller.soundOption;
            checksumControl.Checked = Controller.checksumOption;
            checkBoxLocalhost.Checked = Controller.LocalhostOption;
            checkBoxResume.Checked = Controller.ResumeOption;
            init = true;
        }
Esempio n. 8
0
        public SWGFileList(GuiController gc)
        {
            Controller = gc;

            _swgfiletable = new Dictionary<String, SWGFile>();
        }
Esempio n. 9
0
 public AccountWindow(GuiController gc)
 {
     this.Controller = gc;
     InitializeComponent();
     this.Icon= Controller.GetAppIcon();
 }
Esempio n. 10
0
 public StatusProcessor(GuiController ctrl)
 {
     _status = (int) StatusCodes.NoStatus;
     this.Controller = ctrl;
 }
Esempio n. 11
0
 public Donate(GuiController gc)
 {
     this.Controller = gc;
     InitializeComponent();
     this.Icon= Controller.GetAppIcon();
 }