Beispiel #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        /// その他
        ///////////////////////////////////////////////////////////////////////////////////////////////////////

        //設定
        private void cmdSet_Click(object sender, EventArgs e)
        {
            //処理順の保存
            DELEGATE_ID[] tpIds = new DELEGATE_ID[grdDelegate.RowCount];
            for (int i = 0; i < grdDelegate.RowCount; i++)
            {
                tpIds[i] = GetDelegateID(grdDelegate[CnColMain, i].Value.ToString());
            }

            Condition[] tpConditions = new Condition[] { };

            SettingData data = new SettingData(tpConditions, tpIds);

            SaveSetting(data);

            this.Dispose();
        }
Beispiel #2
0
        /// <summary>
        /// デフォルト設定を作成して保存する
        /// </summary>
        public static void CreateDefaultSettingFile()
        {
            DELEGATE_ID[] tpIds = new DELEGATE_ID[]
            {
                DELEGATE_ID.ITERATOR,
                DELEGATE_ID.NUMBER,
                DELEGATE_ID.SEQUENCE,
                DELEGATE_ID.CONDITION,
                DELEGATE_ID.EXPRESSION
            };

            Condition[] tpConditions = new Condition[]
            {
                new Condition("{3桁}", "{=('00000' + (num + 0)).slice(-3)}"),
                new Condition("{今日}", "{=var now = new Date();now.getYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate()}"),
                new Condition("{乱数}", "{=Math.floor(Math.random()*100)}")
            };

            SettingData data = new SettingData(tpConditions, tpIds);

            SaveSetting(data);
        }
Beispiel #3
0
 /// <summary>
 /// IDからキャプションを取得する
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 private static string GetDelegateCaption(DELEGATE_ID id)
 {
     if (id == DELEGATE_ID.ITERATOR)
     {
         return(DELEGATE_ITERATOR_CAPTION);
     }
     else if (id == DELEGATE_ID.SEQUENCE)
     {
         return(DELEGATE_SEQUENCE_CAPTION);
     }
     else if (id == DELEGATE_ID.CONDITION)
     {
         return(DELEGATE_CONDITION_CAPTION);
     }
     else if (id == DELEGATE_ID.NUMBER)
     {
         return(DELEGATE_NUMBER_CAPTION);
     }
     else if (id == DELEGATE_ID.EXPRESSION)
     {
         return(DELEGATE_EXPRESSION_CAPTION);
     }
     return("");
 }