Beispiel #1
0
 public static void Main(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     SettingsHelper.Load();
     Directory.SetCurrentDirectory(Paths.Main.Root);
     try
     {
         GlobalData.Init();
     }
     catch (Exception exception)
     {
         MsgBox.Error(Text.Error_GlobalDataLoadFailed, exception);
         return;
     }
     BackgroundFilePatcher.CheckForBackups();
     if (Program.AgreeToBeta())
     {
         Program._instance = new Program();
         Program._instance.Run(args);
         SettingsHelper.Save();
         return;
     }
 }
Beispiel #2
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrHome));

            this.settingsToolStripMenuItem = new ToolStripMenuItem();
            this.cmsTray              = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.tsmiCancel           = new ToolStripMenuItem();
            this.tsmiOpenLauncher     = new ToolStripMenuItem();
            this.tsmiPatchPlay        = new ToolStripMenuItem();
            this.tsmiSeparator        = new ToolStripSeparator();
            this.tsmiRestore          = new ToolStripMenuItem();
            this.tsmiExit2            = new ToolStripMenuItem();
            this.imageList            = new ImageList(this.components);
            this.btnDownload          = new Button();
            this.chkModsEnabled       = new ToggleButton();
            this.btnManageMods        = new Button();
            this.statusStrip          = new StatusStrip();
            this.progressBar          = new ToolStripProgressBar();
            this.statusLabel          = new ToolStripStatusLabel();
            this.menuStrip            = new MenuStrip();
            this.tsmiFile             = new ToolStripMenuItem();
            this.tsmiRestart          = new ToolStripMenuItem();
            this.tsmiExit             = new ToolStripMenuItem();
            this.tsmiActions          = new ToolStripMenuItem();
            this.tsmiClearFileCache   = new ToolStripMenuItem();
            this.tsmiClearAllSettings = new ToolStripMenuItem();
            this.toolStripSeparator2  = new ToolStripSeparator();
            this.tsmiDeleteAllMods    = new ToolStripMenuItem();
            this.toolStripSeparator4  = new ToolStripSeparator();
            this.tsmiCheckForUpdates  = new ToolStripMenuItem();
            this.tsmiSettings         = new ToolStripMenuItem();
            this.tsmiAbout            = new ToolStripMenuItem();
            this.lblActiveMods        = new Label();
            this.btnLaunch            = new Button();
            this.listBox              = new ListBox();
            this.bgwPatcher           = new BackgroundFilePatcher();
            this.updater              = new Updater();
            this.trayIcon             = new NotifyIcon(this.components);
            this.cmsTray.SuspendLayout();
            this.statusStrip.SuspendLayout();
            this.menuStrip.SuspendLayout();
            base.SuspendLayout();
            this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
            componentResourceManager.ApplyResources(this.settingsToolStripMenuItem, "settingsToolStripMenuItem");
            ToolStripItemCollection items = this.cmsTray.Items;

            ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.tsmiCancel, this.tsmiOpenLauncher, this.tsmiPatchPlay, this.tsmiSeparator, this.tsmiRestore, this.tsmiExit2 };
            items.AddRange(toolStripItemArray);
            this.cmsTray.Name = "trayContext";
            componentResourceManager.ApplyResources(this.cmsTray, "cmsTray");
            this.tsmiCancel.BackColor = Color.FromArgb(255, 238, 238);
            this.tsmiCancel.Name      = "tsmiCancel";
            componentResourceManager.ApplyResources(this.tsmiCancel, "tsmiCancel");
            this.tsmiCancel.Click          += new EventHandler(this.tsmiCancel_Click);
            this.tsmiOpenLauncher.BackColor = Color.FromArgb(255, 238, 238);
            this.tsmiOpenLauncher.Name      = "tsmiOpenLauncher";
            componentResourceManager.ApplyResources(this.tsmiOpenLauncher, "tsmiOpenLauncher");
            this.tsmiOpenLauncher.Click += new EventHandler(this.tsmi_AbrirLauncher_Click);
            this.tsmiPatchPlay.BackColor = Color.FromArgb(238, 255, 255);
            this.tsmiPatchPlay.Name      = "tsmiPatchPlay";
            componentResourceManager.ApplyResources(this.tsmiPatchPlay, "tsmiPatchPlay");
            this.tsmiPatchPlay.Click += new EventHandler(this.tsmi_AbrirJogo_Click);
            this.tsmiSeparator.Name   = "tsmiSeparator";
            componentResourceManager.ApplyResources(this.tsmiSeparator, "tsmiSeparator");
            this.tsmiRestore.Name = "tsmiRestore";
            componentResourceManager.ApplyResources(this.tsmiRestore, "tsmiRestore");
            this.tsmiRestore.Click += new EventHandler(this.tsmi_Restore_Click);
            this.tsmiExit2.Name     = "tsmiExit2";
            componentResourceManager.ApplyResources(this.tsmiExit2, "tsmiExit2");
            this.tsmiExit2.Click           += new EventHandler(this.tsmi_Exit_Click);
            this.imageList.ImageStream      = (ImageListStreamer)componentResourceManager.GetObject("imageList.ImageStream");
            this.imageList.TransparentColor = Color.Transparent;
            this.imageList.Images.SetKeyName(0, "AANEW.bmp");
            this.imageList.Images.SetKeyName(1, "AddNEW.bmp");
            this.imageList.Images.SetKeyName(2, "AishaNEW.bmp");
            this.imageList.Images.SetKeyName(3, "AraNEW.bmp");
            this.imageList.Images.SetKeyName(4, "ATNEW.bmp");
            this.imageList.Images.SetKeyName(5, "BaMNEW.bmp");
            this.imageList.Images.SetKeyName(6, "BHNEW.bmp");
            this.imageList.Images.SetKeyName(7, "BMNEW.bmp");
            this.imageList.Images.SetKeyName(8, "CANEW.bmp");
            this.imageList.Images.SetKeyName(9, "CAvNEW.bmp");
            this.imageList.Images.SetKeyName(10, "CBSNEW.bmp");
            this.imageList.Images.SetKeyName(11, "CENEW.bmp");
            this.imageList.Images.SetKeyName(12, "ChiNEW.bmp");
            this.imageList.Images.SetKeyName(13, "ChungNEW.bmp");
            this.imageList.Images.SetKeyName(14, "CielNNEW.bmp");
            this.imageList.Images.SetKeyName(15, "CLNEW.bmp");
            this.imageList.Images.SetKeyName(16, "CMNEW.bmp");
            this.imageList.Images.SetKeyName(17, "CNNEW.bmp");
            this.imageList.Images.SetKeyName(18, "CRNEW.bmp");
            this.imageList.Images.SetKeyName(19, "DCNEW.bmp");
            this.imageList.Images.SetKeyName(20, "DENEW.bmp");
            this.imageList.Images.SetKeyName(21, "DKNEW.bmp");
            this.imageList.Images.SetKeyName(22, "DMNEW.bmp");
            this.imageList.Images.SetKeyName(23, "DWNEW.bmp");
            this.imageList.Images.SetKeyName(24, "ElesisNEW.bmp");
            this.imageList.Images.SetKeyName(25, "ElswordNEW.bmp");
            this.imageList.Images.SetKeyName(26, "EMNEW.bmp");
            this.imageList.Images.SetKeyName(27, "EveNEW.bmp");
            this.imageList.Images.SetKeyName(28, "FGNEW.bmp");
            this.imageList.Images.SetKeyName(29, "GANEW.bmp");
            this.imageList.Images.SetKeyName(30, "GMNEW.bmp");
            this.imageList.Images.SetKeyName(31, "HMNEW.bmp");
            this.imageList.Images.SetKeyName(32, "IPNEW.bmp");
            this.imageList.Images.SetKeyName(33, "ISNEW.bmp");
            this.imageList.Images.SetKeyName(34, "LDNEW.bmp");
            this.imageList.Images.SetKeyName(35, "LHNEW.bmp");
            this.imageList.Images.SetKeyName(36, "LKNEW.bmp");
            this.imageList.Images.SetKeyName(37, "LPNEW.bmp");
            this.imageList.Images.SetKeyName(38, "LSNEW.bmp");
            this.imageList.Images.SetKeyName(39, "LuCielNEW.bmp");
            this.imageList.Images.SetKeyName(40, "LuDNEW.bmp");
            this.imageList.Images.SetKeyName(41, "MKNEW.bmp");
            this.imageList.Images.SetKeyName(42, "MMNEW.bmp");
            this.imageList.Images.SetKeyName(43, "NWNEW.bmp");
            this.imageList.Images.SetKeyName(44, "OTNEW.bmp");
            this.imageList.Images.SetKeyName(45, "PKNEW.bmp");
            this.imageList.Images.SetKeyName(46, "PTNEW.bmp");
            this.imageList.Images.SetKeyName(47, "RavenNEW.bmp");
            this.imageList.Images.SetKeyName(48, "RenaNEW.bmp");
            this.imageList.Images.SetKeyName(49, "RFNEW.bmp");
            this.imageList.Images.SetKeyName(50, "RGNEW.bmp");
            this.imageList.Images.SetKeyName(51, "RSNEW.bmp");
            this.imageList.Images.SetKeyName(52, "SbKNEW.bmp");
            this.imageList.Images.SetKeyName(53, "SDNEW.bmp");
            this.imageList.Images.SetKeyName(54, "SGNEW.bmp");
            this.imageList.Images.SetKeyName(55, "ShGNEW.bmp");
            this.imageList.Images.SetKeyName(56, "SKNEW.bmp");
            this.imageList.Images.SetKeyName(57, "SRNEW.bmp");
            this.imageList.Images.SetKeyName(58, "StKNEW.bmp");
            this.imageList.Images.SetKeyName(59, "STNEW.bmp");
            this.imageList.Images.SetKeyName(60, "TiTNEW.bmp");
            this.imageList.Images.SetKeyName(61, "TRNEW.bmp");
            this.imageList.Images.SetKeyName(62, "TTNEW.bmp");
            this.imageList.Images.SetKeyName(63, "VCNEW.bmp");
            this.imageList.Images.SetKeyName(64, "VPNEW.bmp");
            this.imageList.Images.SetKeyName(65, "WSNEW.bmp");
            this.imageList.Images.SetKeyName(66, "WTNEW.bmp");
            this.imageList.Images.SetKeyName(67, "YRNEW.bmp");
            componentResourceManager.ApplyResources(this.btnDownload, "btnDownload");
            this.btnDownload.Image = Images16px.Download;
            this.btnDownload.Name  = "btnDownload";
            this.btnDownload.UseVisualStyleBackColor = true;
            this.btnDownload.Click += new EventHandler(this.btnDownload_Click);
            componentResourceManager.ApplyResources(this.chkModsEnabled, "chkModsEnabled");
            this.chkModsEnabled.BackColor  = SystemColors.Control;
            this.chkModsEnabled.Checked    = true;
            this.chkModsEnabled.CheckState = CheckState.Checked;
            this.chkModsEnabled.Name       = "chkModsEnabled";
            this.chkModsEnabled.UseVisualStyleBackColor = false;
            this.chkModsEnabled.CheckedChanged         += new EventHandler(this.chk_ModsEnabled_CheckedChanged);
            componentResourceManager.ApplyResources(this.btnManageMods, "btnManageMods");
            this.btnManageMods.Image = Images16px.Mods;
            this.btnManageMods.Name  = "btnManageMods";
            this.btnManageMods.UseVisualStyleBackColor = true;
            this.btnManageMods.Click += new EventHandler(this.btn_ManageMods_Click);
            ToolStripItemCollection toolStripItemCollections = this.statusStrip.Items;

            ToolStripItem[] toolStripItemArray1 = new ToolStripItem[] { this.progressBar, this.statusLabel };
            toolStripItemCollections.AddRange(toolStripItemArray1);
            componentResourceManager.ApplyResources(this.statusStrip, "statusStrip");
            this.statusStrip.Name       = "statusStrip";
            this.statusStrip.SizingGrip = false;
            this.progressBar.Name       = "progressBar";
            componentResourceManager.ApplyResources(this.progressBar, "progressBar");
            this.statusLabel.BorderSides = ToolStripStatusLabelBorderSides.Left;
            this.statusLabel.Margin      = new System.Windows.Forms.Padding(3, 3, 0, 2);
            this.statusLabel.Name        = "statusLabel";
            componentResourceManager.ApplyResources(this.statusLabel, "statusLabel");
            this.menuStrip.BackColor = Color.Transparent;
            ToolStripItemCollection items1 = this.menuStrip.Items;

            ToolStripItem[] toolStripItemArray2 = new ToolStripItem[] { this.tsmiFile, this.tsmiActions, this.tsmiSettings, this.tsmiAbout };
            items1.AddRange(toolStripItemArray2);
            componentResourceManager.ApplyResources(this.menuStrip, "menuStrip");
            this.menuStrip.Name = "menuStrip";
            ToolStripItemCollection dropDownItems = this.tsmiFile.DropDownItems;

            ToolStripItem[] toolStripItemArray3 = new ToolStripItem[] { this.tsmiRestart, this.tsmiExit };
            dropDownItems.AddRange(toolStripItemArray3);
            this.tsmiFile.Name = "tsmiFile";
            componentResourceManager.ApplyResources(this.tsmiFile, "tsmiFile");
            this.tsmiRestart.Name = "tsmiRestart";
            componentResourceManager.ApplyResources(this.tsmiRestart, "tsmiRestart");
            this.tsmiRestart.Click += new EventHandler(this.tsmi_Restart_Click);
            this.tsmiExit.Name      = "tsmiExit";
            componentResourceManager.ApplyResources(this.tsmiExit, "tsmiExit");
            this.tsmiExit.Click += new EventHandler(this.tsmi_Exit_Click);
            ToolStripItemCollection dropDownItems1 = this.tsmiActions.DropDownItems;

            ToolStripItem[] toolStripItemArray4 = new ToolStripItem[] { this.tsmiClearFileCache, this.tsmiClearAllSettings, this.toolStripSeparator2, this.tsmiDeleteAllMods, this.toolStripSeparator4, this.tsmiCheckForUpdates };
            dropDownItems1.AddRange(toolStripItemArray4);
            this.tsmiActions.Name = "tsmiActions";
            componentResourceManager.ApplyResources(this.tsmiActions, "tsmiActions");
            this.tsmiClearFileCache.Image = Images16px.Clear;
            this.tsmiClearFileCache.Name  = "tsmiClearFileCache";
            componentResourceManager.ApplyResources(this.tsmiClearFileCache, "tsmiClearFileCache");
            this.tsmiClearFileCache.Click += new EventHandler(this.tsmi_ClearFileCache_Click);
            this.tsmiClearAllSettings.Name = "tsmiClearAllSettings";
            componentResourceManager.ApplyResources(this.tsmiClearAllSettings, "tsmiClearAllSettings");
            this.tsmiClearAllSettings.Click += new EventHandler(this.tsmi_ClearAllSettings_Click);
            this.toolStripSeparator2.Name    = "toolStripSeparator2";
            componentResourceManager.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
            this.tsmiDeleteAllMods.Image = Images16px.Cross;
            this.tsmiDeleteAllMods.Name  = "tsmiDeleteAllMods";
            componentResourceManager.ApplyResources(this.tsmiDeleteAllMods, "tsmiDeleteAllMods");
            this.tsmiDeleteAllMods.Click += new EventHandler(this.tsmi_DeleteAllMods_Click);
            this.toolStripSeparator4.Name = "toolStripSeparator4";
            componentResourceManager.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
            this.tsmiCheckForUpdates.Image = Images16px.Update;
            this.tsmiCheckForUpdates.Name  = "tsmiCheckForUpdates";
            componentResourceManager.ApplyResources(this.tsmiCheckForUpdates, "tsmiCheckForUpdates");
            this.tsmiCheckForUpdates.Click += new EventHandler(this.tsmi_CheckForUpdates_Click);
            this.tsmiSettings.CheckOnClick  = true;
            this.tsmiSettings.Name          = "tsmiSettings";
            componentResourceManager.ApplyResources(this.tsmiSettings, "tsmiSettings");
            this.tsmiSettings.Click += new EventHandler(this.tsmi_Settings_Click);
            this.tsmiAbout.Name      = "tsmiAbout";
            componentResourceManager.ApplyResources(this.tsmiAbout, "tsmiAbout");
            this.tsmiAbout.Click += new EventHandler(this.tsmi_About_Click);
            componentResourceManager.ApplyResources(this.lblActiveMods, "lblActiveMods");
            this.lblActiveMods.BackColor = Color.Transparent;
            this.lblActiveMods.Name      = "lblActiveMods";
            componentResourceManager.ApplyResources(this.btnLaunch, "btnLaunch");
            this.btnLaunch.Name = "btnLaunch";
            this.btnLaunch.UseVisualStyleBackColor = true;
            this.btnLaunch.Click += new EventHandler(this.btn_Launch_Click);
            componentResourceManager.ApplyResources(this.listBox, "listBox");
            this.listBox.Name                   = "listBox";
            this.listBox.SelectionMode          = SelectionMode.None;
            this.bgwPatcher.ProgressChanged    += new BackgroundFilePatcherProgressChangedEventHandler(this.bgwPatcher_ProgressChanged);
            this.bgwPatcher.RunWorkerCompleted += new BackgroundFilePatcherRunWorkerCompleted(this.bgwPatcher_RunWorkerCompleted);
            this.updater.UpdatesAvailable      += new UpdatesAvailable(this.updater_UpdatesAvailable);
            this.trayIcon.ContextMenuStrip      = this.cmsTray;
            componentResourceManager.ApplyResources(this.trayIcon, "trayIcon");
            this.trayIcon.MouseDoubleClick += new MouseEventHandler(this.trayIcon_MouseDoubleClick);
            base.AutoBackgroundImage        = BackgroundImages.Elsword;
            componentResourceManager.ApplyResources(this, "$this");
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.Controls.Add(this.btnDownload);
            base.Controls.Add(this.chkModsEnabled);
            base.Controls.Add(this.btnManageMods);
            base.Controls.Add(this.statusStrip);
            base.Controls.Add(this.menuStrip);
            base.Controls.Add(this.lblActiveMods);
            base.Controls.Add(this.btnLaunch);
            base.Controls.Add(this.listBox);
            this.DoubleBuffered  = true;
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            base.MainMenuStrip   = this.menuStrip;
            base.MaximizeBox     = false;
            base.Name            = "FrHome";
            base.PersistState    = true;
            base.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Hide;
            base.FormClosing    += new FormClosingEventHandler(this.MainForm_FormClosing);
            base.Load           += new EventHandler(this.MainForm_Load);
            base.Shown          += new EventHandler(this.MainForm_Shown);
            base.VisibleChanged += new EventHandler(this.MainForm_VisibleChanged);
            base.Resize         += new EventHandler(this.MainForm_Resize);
            this.cmsTray.ResumeLayout(false);
            this.statusStrip.ResumeLayout(false);
            this.statusStrip.PerformLayout();
            this.menuStrip.ResumeLayout(false);
            this.menuStrip.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }