protected void SaveCfg_Btn_Click(object sender, EventArgs e) { CMSUpdateCfg.Info.Ignores = new List <string>(); if (!string.IsNullOrWhiteSpace(Ignore_T.Text)) { CMSUpdateCfg.Info.Ignores.AddRange(Ignore_T.Text.Split("\r".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); } CMSUpdateCfg.Info.NewDir = NewDir.Trim(); CMSUpdateCfg.Update(); function.WriteSuccessMsg("配置更新完成"); }
public void InstanceNew(NewDir dir) { Vector3 pos_offset = Vector3.zero; switch (dir) { case NewDir.BACK: pos_offset = Vector3.back; break; case NewDir.DOWN: pos_offset = Vector3.down; break; case NewDir.FORWARD: pos_offset = Vector3.forward; break; case NewDir.LEFT: pos_offset = Vector3.left; break; case NewDir.RIGHT: pos_offset = Vector3.right; break; case NewDir.UP: pos_offset = Vector3.up; break; } if (!Physics.Raycast(block.transform.position, pos_offset, 1)) { GameObject go = GameObject.Instantiate(block.gameObject); go.name = block.name; Selection.activeObject = go; go.transform.position = block.transform.position + pos_offset; } else { Debug.LogError("crate new block failed"); } }
private void _CreateDir_Click(object sender, EventArgs e) { NewDir tmp = new NewDir(); tmp.ShowDialog(); if (!string.IsNullOrEmpty(tmp.DirName)) { string fullname = CurrentDir + tmp.DirName; if(CurrentDir[CurrentDir.Length-1]!='\\') fullname = CurrentDir+"\\"+ tmp.DirName; PackHandler.NewDir ndir = new PackHandler.NewDir() { DirName = fullname }; SocketManager.Send(BufferFormatV2.FormatFCA(ndir, Deflate.Compress)); } }
private void _CreateDir_Click(object sender, EventArgs e) { NewDir tmp = new NewDir(); tmp.ShowDialog(); if (!string.IsNullOrEmpty(tmp.DirName)) { string fullname = System.IO.Path.Combine(CurrentDir, tmp.DirName); PackHandler.NewDir ndir = new PackHandler.NewDir() { DirName = fullname }; SocketManager.Send(BufferFormatV2.FormatFCA(ndir, Deflate.Compress)); } }
protected virtual void OnNewDir(FileSystemEventArgs e) { NewDir?.Invoke(this, e); }