/// <summary> /// 记录程序信息 /// </summary> private void WriteAppInfo() { try { IniConfigManager ini = new IniConfigManager(); string path = ini.GetUpdateAppPath(); string version = ini.GetAboutVersion(); string serverUpdateURL = ini.GetServerUpdateURL(); string file = path + "/" + appName + ".ini"; if (!Directory.Exists(path)) { // Create the directory it does not exist. Directory.CreateDirectory(path); } IniFileController iniFile = new IniFileController(file); iniFile.IniWriteValue(appName, "Path", GetPath.GetCurrentDirectory()); iniFile.IniWriteValue(appName, "Version", version); iniFile.IniWriteValue(appName, "UpdateURL", serverUpdateURL); } catch (Exception e) { CLog4net.LogError("WriteConfig:" + e); } }
private void Awake() { // Self reference PThreader = this; pathfinding = GetComponent <GetPath>(); }
private void SelecionarUmaFoto() { BtnIncluir.EsperarElemento(Browser); MouseActions.ClickMouseMoveToElementSML(Browser, BtnSelecionarImagem); Thread.Sleep(400); SendKeys.SendWait(GetPath.GetResourcePath("IMG_6582.JPG")); SendKeys.SendWait(@"{Enter}"); }
public void OnEnable() { m_path = new List <Vector3>(); m_pathGetter = GetComponent <GetPath>(); m_currentHealth = m_maxHealth; m_path = m_pathGetter.CalculatePath(); m_isDead = false; m_currentWaypoint = 0; }
public void Start(float MaxHealth) { m_spawner = FindObjectOfType <Spawner>(); m_path = new List <Vector3>(); m_maxHealth = MaxHealth; m_currentHealth = m_maxHealth; m_pathGetter = GetComponent <GetPath>(); m_path = m_pathGetter.CalculatePath(); m_player = FindObjectOfType <PlayerHealth>(); }
private void SelecionarQuatroFotos() { BtnIncluir.EsperarElemento(Browser); if (BtnSelecionarImagem.IsElementVisible(Browser)) { MouseActions.ClickMouseMoveToElementSML(Browser, BtnSelecionarImagem); } Thread.Sleep(400); SendKeys.SendWait(GetPath.GetResourcePath("\"IMG_6582.JPG\" \"IMG_6465.JPG\" \"IMG_6466.JPG\" \"IMG_6467.JPG\"")); SendKeys.SendWait(@"{Enter}"); }
public static string GetRolloutDirectoryPath(DTO.Enums.BackEndOrFrontEndEnum whichEnd) { try { return(GetPath.GetRolloutDirectoryPath(whichEnd)); } catch (Exception) { throw; } }
private void button_chooseFolder_Click(object sender, EventArgs e) { FolderBrowserDialog openFileDialog = new FolderBrowserDialog(); if (openFileDialog.ShowDialog() == DialogResult.OK) { GetPath?.Invoke(this, new NameAndPathEventArgs { Path = openFileDialog.SelectedPath, Name = textBox_name.Text }); } }
public AvatarDomain AddAvatar(string avatar, string icon) { var random = Guid.NewGuid().ToString("n"); var imageName = "User_" + UserInfo.MyId + "_IMG_" + random + ".jpg"; var startupPath = GetPath.BaseDirectory() + "Images\\" + imageName; var startupPathIcon = GetPath.BaseDirectory() + "Images\\" + "Icon_" + imageName; ImageRepository.SaveBase64(startupPath, avatar); ImageRepository.SaveBase64(startupPathIcon, icon); return(ImageRepository.AddAvatar(UserInfo.MyId, imageName, "Icon_" + imageName)); }
public void RealizarUploadDeArquivo(string Arquivo) { Thread.Sleep(2000); MouseActions.ClickATM(Browser, InpArquivo); Thread.Sleep(2000); SendKeys.SendWait(GetPath.GetResourcePath(Arquivo)); SendKeys.SendWait(@"{Enter}"); Thread.Sleep(2000); var SalvarUpload = Element.Css("a[ng-click='upload()']"); ElementExtensions.IsElementVisible(SalvarUpload, Browser); MouseActions.ClickATM(Browser, SalvarUpload); }
public void CadastrarCueSheetComImportacaoDeArquivo(string Produto, string Episodio, string Capitulo, string DataExibicao, string Midias, string RepriseRebatida, string ListaDeItensDaCueSheet) { PreencherDadosDaCueSheet(Produto, Episodio, Capitulo, DataExibicao, Midias, RepriseRebatida); Thread.Sleep(2000); var BtnEscolherArquivo = Element.Css("input[ng-model='arquivo']"); MouseActions.ClickATM(Browser, BtnEscolherArquivo); Thread.Sleep(2000); SendKeys.SendWait(GetPath.GetResourcePath(ListaDeItensDaCueSheet)); SendKeys.SendWait(@"{Enter}"); MouseActions.ClickATM(Browser, BtnSalvarCueSheet); }
public void sendEnemy() { //sendEnemy is called by the WaveEmitter whenever the the number of activeEnemies is less than //the number of enemies in the wave. go = myEnemyManager.giveEnemy (); e = (GetPath)go.GetComponent ("GetPath"); if(e.waveNum==WE.wavenum){//enemy has path and is ready to go e.startPath (); go.renderer.enabled=true;//make enemy visible go.rigidbody.detectCollisions=true; KillEnemy ke = (KillEnemy)go.GetComponent(typeof(KillEnemy)); SpiralEmitter se = (SpiralEmitter)go.GetComponent(typeof(SpiralEmitter)); ke.SetAlive(); se.TimerOn();//turn enemy firing on go.renderer.material.SetColor ("_Color",Ecolors[colorIndex]); } else//enemy is not on the current wave. Return to Sender myEnemyManager.recieveEnemy (go); }
public void RealizarUploadDeArquivo(string ListaDeItensDaCueSheet) { Thread.Sleep(2000); var BtnUpload = Element.Css("a[ng-click='AbrirModalArquivo()']"); MouseActions.ClickATM(Browser, BtnUpload); var BtnCarregarArquivo = Element.Css("input[id='arquivo']"); MouseActions.ClickATM(Browser, BtnCarregarArquivo); Thread.Sleep(2000); SendKeys.SendWait(GetPath.GetResourcePath(ListaDeItensDaCueSheet)); SendKeys.SendWait(@"{Enter}"); var SalvarUpload = Element.Css("button[ng-click='uploadArquivoItemCueSheet()']"); ElementExtensions.IsElementVisible(SalvarUpload, Browser); MouseActions.ClickATM(Browser, SalvarUpload); }
public CameraServiceImplByAforge() { sPath = string.Format(@"{0}\DataResources\ImageData", GetPath.GetStartupPath()); if (!Directory.Exists(sPath)) { Directory.CreateDirectory(sPath); } IniConfigManager iniManager = new IniConfigManager(); try { this.photoCountLimit = Convert.ToInt32(iniManager.GetPhotoLength()); } catch (Exception e) { CLog4net.LogError(e); } try { // 枚举所有视频输入设备 videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); if (videoDevices.Count == 0) { CemmberData.Instance.IsCameraConnectFail = true; CLog4net.LogError("未检测到摄像头"); } else { CemmberData.Instance.IsCameraConnectFail = false; } } catch (ApplicationException) { CemmberData.Instance.IsCameraConnectFail = true; CLog4net.LogError("No local capture devices"); videoDevices = null; } }
private void InitCamera() { try { sPath = string.Format(@"{0}\DataResources\ImageData", GetPath.GetStartupPath()); if (!Directory.Exists(sPath)) { Directory.CreateDirectory(sPath); } IniConfigManager iniManager = new IniConfigManager(); try { this.photoCountLimit = Convert.ToInt32(iniManager.GetPhotoLength()); } catch (Exception e) { CLog4net.LogError(e); } this.panelCamera = new Panel(); // // panelCamera // this.panelCamera.BackColor = System.Drawing.Color.SlateGray; //this.panelCamera.Location = new System.Drawing.Point(320, 9); this.panelCamera.Name = "panelCamera"; this.panelCamera.Size = new System.Drawing.Size(400, 300); myPick = new Pick(this.panelCamera.Handle, 0 + 5, 0 + 5, this.panelCamera.Width - 10, this.panelCamera.Height - 10); this.myPick.Start(); } catch { System.Windows.Forms.MessageBox.Show("Camera Module Fault"); } }
private void Browse() { PathVariable = GetPath.GetPath(); LogTask("Loading path...", LevelEnum.Information); RaisePropertyChanged("PathVariable"); }
/// <summary> /// 抓图并保存 /// </summary> private bool GrabImageAndSave() { if (videoDevices == null) { return(false); } if (this.bitmapBuffer == null) { return(false); } int beginTime = Environment.TickCount; string imageIndex = UnixTime.ConvertDateTimeToUnixTime(DateTime.Now).ToString(); string grabImagePath = string.Format(@"{0}\DataResources\ImageData\{1}.jpg", GetPath.GetStartupPath(), imageIndex); this.bitmapBuffer.Save(grabImagePath); this.ControlPhotoCount(); Console.WriteLine("GrabImageAndSave Time Spaned: " + (Environment.TickCount - beginTime) + "ms"); return(true); }
public async Task <IActionResult> GetPath([FromBody] GetPath command) { return(Json(await _pointService.GetPath(command.originId, command.destinationId))); }
//This function provides the template path for the specified userType. public static string GetTemplatePath(DTO.Enums.UserTypeEnum userType) { return(GetPath.GetRolloutDirectoryPath(DTO.Enums.BackEndOrFrontEndEnum.BackEnd) + @"Front End Templates\" + Enum.GetName(typeof(DTO.Enums.UserTypeEnum), userType)); }
/// <summary> /// 抓图并保存 /// </summary> private void GrabImageAndSave() { int beginTime = Environment.TickCount; string imageIndex = UnixTime.ConvertDateTimeToUnixTime(DateTime.Now).ToString(); string grabImagePath = string.Format(@"{0}\DataResources\ImageData\{1}.jpg", GetPath.GetStartupPath(), imageIndex); this.myPick.GrabImage(grabImagePath); //System.Threading.Thread.Sleep(2000); this.ControlPhotoCount(); Console.WriteLine("GrabImageAndSave Time Spaned: " + (Environment.TickCount - beginTime) + "ms"); }