private static void Main(string[] args) { HNStruct.OemType = DeployConfig.getOemType(); HuionLog.listenGlobalCrashLog(); ResourceCulture.init(); TimerSession.startListenUserOperation(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool flag = false; try { flag = Utils.isAppRunning(); } catch { Utils.runAsAdmin(true); return; } if (new Mutex(true, "OnlyRun").WaitOne(0, false)) { Application.Run((Form) new HuionTalbet()); } else { if (Utils.isStartup(args) || HuionDriverDLL.PostMessage(HuionDriverDLL.FindWindow((string)null, Fixer4Main.FormTitle()), 1054, IntPtr.Zero, IntPtr.Zero) != 0) { return; } Utils.runAsAdmin(true); } }
public async Task <JobDeployEntity> Add(DeployConfig config, string token) { var entity = new JobDeployEntity { Config = config, CreatedAt = new DateTime(), Token = token }; await deployCollection.InsertOneAsync(entity); return(entity); }
private void clickBtn_Click(object sender, EventArgs e) { if (DeployConfig.getOemType() == OEMType.HUION && DeployConfig.isNewUI) { FormEKey_New formEkeyNew = new FormEKey_New((object)this.mCheckedKeyLayout, this.mCheckedKeyLayout.Key); formEkeyNew.callback += new EKeyCallback(this.form_TransfEvent); int num = (int)formEkeyNew.ShowDialog(); } else { FormEKey formEkey = new FormEKey((object)this.mCheckedKeyLayout, this.mCheckedKeyLayout.Key); formEkey.callback += new EKeyCallback(this.form_TransfEvent); int num = (int)formEkey.ShowDialog(); } }
public static AbstractPackager GetPackager(DeployConfig config) { AbstractPackager packager; switch (config.InstallerType) { case "online": packager = new OnlineInstallerPackager(); break; case "offline": packager = new OfflineInstallerPackager(); break; default: Util.DisplayWarning("Invalid installer type found.", new InvalidDataException()); packager = GetDummyPackager(); break; } packager.SetConfig(config); return packager; }
private void comboBoxMekey_SelectedIndexChanged(object sender, EventArgs e) { this.mTouchIndex = this.comboBoxMekey.SelectedIndex; if (this.keyLayouts == null) { return; } HuionKeyLayout keyLayout = this.keyLayouts[this.keyLayouts.Length - 1]; if (DeployConfig.getOemType() == OEMType.HUION && DeployConfig.isNewUI) { FormEKey_New formEkeyNew = new FormEKey_New((object)keyLayout, keyLayout.MutliKeys[this.getMeIndex()]); formEkeyNew.callback += new EKeyCallback(this.form_TransfEvent); int num = (int)formEkeyNew.ShowDialog(); } else { FormEKey formEkey = new FormEKey((object)keyLayout, keyLayout.MutliKeys[this.getMeIndex()]); formEkey.callback += new EKeyCallback(this.form_TransfEvent); int num = (int)formEkey.ShowDialog(); } }
public static AbstractPackager GetPackager(DeployConfig config) { AbstractPackager packager; switch (config.InstallerType) { case "online": packager = new OnlineInstallerPackager(); break; case "offline": packager = new OfflineInstallerPackager(); break; default: Util.DisplayWarning("Invalid installer type found.", new InvalidDataException()); packager = GetDummyPackager(); break; } packager.SetConfig(config); return(packager); }
public void SetConfig(DeployConfig config) { Config = config; }
public void SetConfig(DeployConfig config) { Config = config; }
public async Task <IActionResult> Deploy(DeployConfig config) { await automateService.AskDeploy(config, AuthHelper.GetToken(Request)); return(NoContent()); }