Exemplo n.º 1
0
        public ApiResult <InputScript> GetNewScript()
        {
            var cmd = new GenerateScript();

            cmd.Execute();
            return(cmd.Result);
        }
Exemplo n.º 2
0
 void Start()
 {
     manaBar = GameObject.FindGameObjectWithTag("ManaBar");
     spellBar = GameObject.FindGameObjectWithTag("SpellBar");
     deathScreen = GameObject.FindGameObjectWithTag("DeathScreen");
     generator = GameObject.FindGameObjectWithTag("Generator").GetComponent<GenerateScript>();
     manaBar.GetComponentInChildren<Image>().fillMethod = Image.FillMethod.Radial360;
     manaBar.GetComponentInChildren<Image>().type = Image.Type.Filled;
 }
Exemplo n.º 3
0
 private void Start()
 {
     dotPrefabs2 = Resources.LoadAll <GameObject>("");
     _genScript  = GameObject.FindGameObjectWithTag("GameMan").GetComponent <GenerateScript>();
     if (_genScript == null)
     {
         print("Generate script is missing");
     }
 }
Exemplo n.º 4
0
    void Awake()
    {
        var controllerScript = GameObject.FindGameObjectWithTag ("GameController");
        generateScript = controllerScript.GetComponent<GenerateScript> ();
        scoreScript = controllerScript.GetComponent<ScoreScript> ();

        // recommended for debugging:
        PlayGamesPlatform.DebugLogEnabled = true;
        // Activate the Google Play Games platform
        PlayGamesPlatform.Activate ();
    }
Exemplo n.º 5
0
        static GenerateScript IsArgumentGenerateScriptValid(List <string> argList)
        {
            var model = new GenerateScript();

            Console.WriteLine(@"Start generate migration script...");
            // Read -diff parameter
            model.CurrentDiffFile = ReadArgument("-diff", argList, "-diff parameter is requirement");
            // Read -out parameter
            model.MigrateSqlFile = ReadArgument("-out", argList, "-out parameter is requirement");

            return(model);
        }
Exemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        //Generator
        GS           = GameObject.FindWithTag("Generator").GetComponent <GenerateScript>();
        blocksHolder = GameObject.FindWithTag("BlocksHolder");        // GS.getBlocksHolder();
        BaseBlock    = GameObject.FindWithTag("BaseBlock");


        Vector3 rt = BaseBlock.GetComponent <Renderer>().bounds.size;

        sizeOfBlock = new Vector2(rt.x, rt.y);

        targetPos = new Vector3(blocksHolder.transform.position.x, blocksHolder.transform.position.y - rt.y, blocksHolder.transform.position.z);
    }
 public void Send()
 {
     try
     {
         GenerateScript generateScript = new GenerateScript(this.configuration);
         generateScript.ScriptDatabase();
     }
     catch (Exception ex)
     {
         //send excepcion to email
         SendEmail sendEmail = new SendEmail(configuration);
         sendEmail.Send(string.Format("Error to create, Excepcion description: {0}", ex.ToString()));
         throw;
     }
 }
Exemplo n.º 8
0
        private void btn_GEN_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txt_TABLE_NAME.Text))
            {
                ShowMessage("表名不能为空");
                return;
            }
            if (!ck_SERACH.Checked && !ck_SAVE.Checked)
            {
                ShowMessage("请勾选查询或保存");
                return;
            }
            string res = new GenerateScript().GenMethodName(txt_TABLE_NAME.Text.Trim().ToUpper(), ck_SERACH.Checked, me_REMARK.Text.Trim());

            me_SHOW.Text = res;
        }
Exemplo n.º 9
0
 void Awake()
 {
     Debug.Log("Awake Called");
     if (_instance == null)
     {
         //If I am the first instance, make me the Singleton
         _instance = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         //If a Singleton already exists and you find
         //another reference in scene, destroy it!
         if (this != _instance)
         {
             Destroy(gameObject);
         }
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// 写入到设计文件中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_WRITE_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txt_PATH.Text))
            {
                ShowMessage("路径不能为空");
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_FRM_NAME.Text))
            {
                ShowMessage("窗体名不能为空");
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_GRID_VIEW.Text))
            {
                ShowMessage("GRIDVIEW不能为空");
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_GC_NAME.Text))
            {
                ShowMessage("GridControl不能为空");
                return;
            }
            //读取文件内容
            StringBuilder sbRead = new StringBuilder();
            string        path   = string.Format(@"{0}\{1}.Designer.cs", txt_PATH.Text, txt_FRM_NAME.Text);

            if (!File.Exists(path))
            {
                ShowMessage("该文件不存在!");
                return;
            }
            //读取对应窗体的设计代码
            string strAll = IOHelper.Read(path);
            //将程序生成的设计代码分割
            List <string> allList = SpiltStrToList();
            //重写配置文件
            string resStr = new GenerateScript().GenDeginCode(txt_GRID_VIEW.Text.Trim(), txt_GC_NAME.Text.Trim(), strAll, allList);

            IOHelper.Write(resStr, path);
            ShowMessage("写入成功");
        }
Exemplo n.º 11
0
 public ApiResult<InputScript> GetNewScript()
 {
     var cmd = new GenerateScript();
     cmd.Execute();
     return cmd.Result;
 }
Exemplo n.º 12
0
 public void Setup()
 {
     cmd = new GenerateScript();
 }
Exemplo n.º 13
0
 public void Setup()
 {
     cmd = new GenerateScript();
 }