コード例 #1
0
 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("配置更新完成");
 }
コード例 #2
0
    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");
        }
    }
コード例 #3
0
ファイル: WinMain.cs プロジェクト: gezidan/ZYSOCKET
        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));
            }
        }
コード例 #4
0
ファイル: WinMain.cs プロジェクト: gezidan/ZYSOCKET
        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));
            }
        }
コード例 #5
0
 protected virtual void OnNewDir(FileSystemEventArgs e)
 {
     NewDir?.Invoke(this, e);
 }