Beispiel #1
0
        /// <summary>
        /// 构造方法
        /// </summary>
        public BaseCompTool(BaseComp compObj)
        {
            this.InitializeComponent();

            this.compObj = compObj;
            this.ResetHeight();

            // 设置Title
            this.Text = this.compObj.GetTitle() + "  " + this.Text;
        }
Beispiel #2
0
    public override void Ejecutar()
    {
        GetComponent <Renderer> ().material.color = ObjSalida;

        if (CompEntrada == null)
        {
            GetComponent <Renderer> ().material.color = ObjSalida;
        }
        else
        {
            BaseComp <Color> compEn = ( HijoComp )CompEntrada;
            ObjSalida = new Color(
                compEn.ObjSalida.r * 1.1f + 0.05f,
                compEn.ObjSalida.g * 1.08f + 0.05f,
                compEn.ObjSalida.b * .8f + 0.05f);
        }
    }
Beispiel #3
0
        /// <summary>
        /// 文件编辑菜单事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fileEditorMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            this.fileEditorMenu.Visible = false;
            string       strFolder = string.Empty;
            BaseCompTool compTool  = null;
            BaseComp     comp      = null;

            switch (e.ClickedItem.Name)
            {
            case "btnTresEdit":
                // 打开要分析的文件
                this.baseFile = Util.SetOpenDailog("TXTRES文件(*.txtres, *.dat)|*.txtres;*.dat|所有文件|*.*", string.Empty);
                if (string.IsNullOrEmpty(this.baseFile))
                {
                    return;
                }

                this.Do(this.ShowTresEditerView);
                break;

            case "btnSzsEdit":
                // 打开要分析的文件
                this.baseFile = Util.SetOpenDailog("SZS文件(*.szs)|*.szs|所有文件|*.*", string.Empty);
                if (string.IsNullOrEmpty(this.baseFile))
                {
                    return;
                }

                comp = new MarioYaz0Comp();
                byte[] szsData      = comp.Decompress(baseFile);
                string strFileMagic = Util.GetHeaderString(szsData, 0, 3);
                if ("RARC".Equals(strFileMagic))
                {
                    TreeNode  szsFileInfoTree = Util.RarcDecode(szsData);
                    SzsViewer szsViewForm     = new SzsViewer(szsFileInfoTree, szsData, this.baseFile);
                    szsViewForm.Show(this);
                }
                else
                {
                    MessageBox.Show("不是正常的szs文件 : " + strFileMagic);
                }
                break;

            case "btnArcEdit":
                // 打开要分析的文件
                this.baseFile = Util.SetOpenDailog("ARC文件(*.arc)|*.arc|所有文件|*.*", string.Empty);
                if (string.IsNullOrEmpty(this.baseFile))
                {
                    return;
                }

                this.Do(this.ShowRarcView);
                break;

            case "btnBio0LzEdit":
                compTool = new BaseCompTool(new Bio0LzComp());
                compTool.Show();
                break;

            case "btnBioCvRdxEdit":
                compTool = new BaseCompTool(new BioCvRdxComp());
                compTool.Show();
                break;

            case "btnBioCvAfsEdit":
                BioCvAfsEditor afsTool = new BioCvAfsEditor();
                afsTool.Show();
                break;

            case "btnRleEdit":
                compTool = new BaseCompTool(new ViewtifulJoeRleComp());
                compTool.Show();
                break;
            }
        }