コード例 #1
0
ファイル: Actions.cs プロジェクト: WildGenie/Razor
        public WaitForStatAction( IfAction.IfVarType stat, byte dir, int val )
        {
            m_Stat = stat;
            m_Direction = dir;
            m_Value = val;

            m_Timeout = TimeSpan.FromMinutes( 60.0 );
        }
コード例 #2
0
ファイル: MacroInsertIf.cs プロジェクト: WildGenie/Razor
        private void insert_Click(object sender, System.EventArgs e)
        {
            MacroAction a = null;

            try
            {
                if ( varList.SelectedIndex == (int)IfAction.IfVarType.SysMessage )
                    a = new IfAction( (IfAction.IfVarType)varList.SelectedIndex, txtAmount.Text );
                else if ( varList.SelectedIndex >= (int)IfAction.IfVarType.BeginCountersMarker )
                    a = new IfAction( IfAction.IfVarType.Counter, (sbyte)opList.SelectedIndex, Utility.ToInt32( txtAmount.Text, 0 ), varList.SelectedItem as string );
                else
                    a = new IfAction( (IfAction.IfVarType)varList.SelectedIndex, (sbyte)opList.SelectedIndex, Utility.ToInt32( txtAmount.Text, 0 ) );
            }
            catch
            {
                return;
            }

            if ( m_Action == null )
                m_Macro.Insert( m_Idx+1, a );
            else
                m_Action.Parent.Convert( m_Action, a );
            this.DialogResult = DialogResult.OK;
            this.Close();
        }