Exemplo n.º 1
0
 /*---------------------------------------------------------------------*/
 /// <summary>
 /// メッセージダイアログを表示する。
 /// </summary>
 /// <param name="title">Title.</param>
 /// <param name="message">Message.</param>
 /// <param name="func">Func.</param>
 public void ShowMessageDialog(string title, string message, MessageUI.OKFunc func = null)
 {
     SetActiveUI(false);
     mode = eType.MESSAGE;
     (_DialogUIs [(int)mode] as MessageUI).SetTitleAndMessage(title, message, func);
     SetActiveUI(true);
 }
Exemplo n.º 2
0
 /**
  * Default constructor.
  * _alive: Whether or not the object is initially alive or dead(default).
  */
 public GameObject(bool _alive = false)
 {
     Transform  = new Rectangle(0, 0, 0, 0);
     Alive      = _alive;
     ObjectType = eType.Default;
     SetSprite(new Bitmap("../../Assets/Default.bmp"));
 }
Exemplo n.º 3
0
 /**
  * Game Object constructer.
  * x: X position of the object in screen space.
  * y: Y position of the object in screen space.
  * width: Width of the object in pixels.
  * height: Height of the object in pixels.
  * _alive: Whether the object is initially alive or dead(default).
  */
 public GameObject(int x, int y, int width, int height, bool _alive = false)
 {
     Transform  = new Rectangle(x, y, width, height);
     Alive      = _alive;
     ObjectType = eType.Default;
     SetSprite(new Bitmap("../../Assets/Default.bmp"));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Once we have identified a parsed item we want to extract it
        /// for future reference.
        /// </summary>
        /// <param name="elementType">what element type we know this to be</param>
        /// <param name="expression">our input string</param>
        /// <param name="inPos">position of start of the expression element we can extract</param>
        /// <returns></returns>
        private int ParseElementValue(eType elementType, string expression, int inPos)
        {
            switch (elementType)
            {
            case eType.operation:
                if (IsDoubleCharacterOperator(expression, inPos))
                {
                    return(inPos + 2);
                }

                // Not double character, check for single character
                if (IsSingleCharacterOperator(expression, inPos))
                {
                    return(inPos + 1);
                }

                return(-4);    // something weird!!!

            case eType.value:
                return(ParseOutValue(expression, inPos));

            case eType.precedence:
                return(ParsePrecedence(expression, inPos));

            case eType.unknown:
                elementValue = "x";
                return(inPos + 1);    // single character always!
            }

            return(-2); // just default error
        }
Exemplo n.º 5
0
        /// <summary>
        /// The purpose of this method is to extract the complex text
        /// operands that exist, such as true/false strings.
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="startpos"></param>
        /// <returns></returns>
        private int ExtractComplex(string expression, int startpos)
        {
            // Special case, looking for true/false
            if ((expression.Length - startpos) >= trueType.Length)
            {
                string sTrue = expression.Substring(startpos, trueType.Length).ToLower(new CultureInfo("en-US", false));
                if (sTrue == trueType)
                {
                    elementValue = "1";
                    elementType  = eType.boolean;
                    return(startpos + trueType.Length);
                }
            }
            if ((expression.Length - startpos) >= falseType.Length)
            {
                string sFalse = expression.Substring(startpos, falseType.Length).ToLower(new CultureInfo("en-US", false));
                if (sFalse == falseType)
                {
                    elementValue = "0";
                    elementType  = eType.boolean;
                    return(startpos + falseType.Length);
                }
            }

            return(0);
        }
Exemplo n.º 6
0
        /**
         * Constructor - creates a new soldier with a given set of coordinates and its type.
         */
        public Soldier(eType i_SoldierType, CheckersCoordinates i_Location)
        {
            m_SoldierType = i_SoldierType;
            m_Location    = i_Location;

            initPlayerType();
        }
Exemplo n.º 7
0
 public GamePlayer(eType i_Type, GameBoardCell.eType i_CellType, string i_PlayerName)
 {
     m_Score      = 0;
     r_Type       = i_Type;
     r_CellType   = i_CellType;
     r_PlayerName = i_PlayerName;
 }
Exemplo n.º 8
0
 public tDot Update(tDot center)
 {
     color = center.color;
     type  = center.type;
     _paint();
     return(this);
 }
Exemplo n.º 9
0
        public Step CanMove(eType i_Kind, Board i_Board)
        {
            Step simpleStep = null;
            Step check      = null;

            if (m_Position.UpLeft().FoundOn(i_Board) &&
                (check = new Step(m_Position, m_Position.UpLeft())).IsSimpleStep(i_Kind, i_Board))
            {
                simpleStep = check;
            }
            else if (m_Position.UpRight().FoundOn(i_Board) &&
                     (check = new Step(m_Position, m_Position.UpRight())).IsSimpleStep(i_Kind, i_Board))
            {
                simpleStep = check;
            }
            else if (m_Position.DownLeft().FoundOn(i_Board) &&
                     (check = new Step(m_Position, m_Position.DownLeft())).IsSimpleStep(i_Kind, i_Board))
            {
                simpleStep = check;
            }
            else if (m_Position.DownRight().FoundOn(i_Board) &&
                     (check = new Step(m_Position, m_Position.DownRight())).IsSimpleStep(i_Kind, i_Board))
            {
                simpleStep = check;
            }

            return(simpleStep);
        }
Exemplo n.º 10
0
        public Player(
            string i_Name,
            int i_PlayerNumber,
            eType i_Type,
            CheckersMen.eSign i_RegularSign,
            CheckersMen.eSign i_KingSign,
            char i_BaseLineRowKey,
            int i_m_AmountOfMenOnBoard)
        {
            r_Name                  = i_Name;
            r_Type                  = i_Type;
            r_PlayerNumber          = i_PlayerNumber;
            r_RegularCheckersMen    = new CheckersMen(i_RegularSign);
            r_KingCheckersMen       = new CheckersMen(i_KingSign);
            r_PossibleMoves         = new List <PlayerMove>(0);
            r_LastMovesPlayed       = new List <PlayerMove>(0);
            r_RandomNumberGenerator = new Random();
            m_CanEatAgain           = false;
            r_BaseLineRowKey        = i_BaseLineRowKey;
            m_AmountOfMenOnBoard    = i_m_AmountOfMenOnBoard;
            m_Score                 = 0;

            if (i_RegularSign == CheckersMen.eSign.O)
            {
                r_Direction = new Direction(1, -1, 1, -1);
            }
            else
            {
                r_Direction = new Direction(-1, 1, -1, 1);
            }
        }
Exemplo n.º 11
0
 public tDot(Point location)
 {
     this.Location = location;
     type          = eType.Default;
     color         = Color.Black;
     _paint();
 }
Exemplo n.º 12
0
        public override void onShowed()
        {
            buynum    = 0;
            bar.value = 0;
            backEvent = null;
            transform.SetAsLastSibling();
            item_data = (a3_BagItemData)uiData[0];
            _type     = (eType)uiData[1];
            backEvent = (Action)uiData[2];
            Transform info = transform.FindChild("info");
            Transform buy  = transform.FindChild("buy");

            if (_type == eType.info)
            {
                info.gameObject.SetActive(true);
                buy.gameObject.SetActive(false);
                initItemInfo();
            }
            else if (_type == eType.buy)
            {
                info.gameObject.SetActive(false);
                buy.gameObject.SetActive(true);
                initItemBuy();
            }
            bs_bt1.interactable = true;
            bs_bt2.interactable = true;
            bs_buy.interactable = true;
            buy_text.text       = "1";
        }
Exemplo n.º 13
0
        private int GetDefaultDevName(string[] devs, eType type)
        {
            int devnum = 0;

            if (devs.Length > 0)
            {
                //MidiDevName = devs[0];
                switch (type)
                {
                case eType.InKB:
                    Cfg.MidiInKB = MidiDevName;
                    break;

                case eType.InSync:
                    Cfg.MidiInSync = MidiDevName;
                    break;

                case eType.OutKB:
                    Cfg.MidiOutKB = MidiDevName;
                    break;

                case eType.OutStream:
                    Cfg.MidiOutStream = MidiDevName;
                    break;

                case eType.OutKBStream:
                    Cfg.MidiOutKB     = MidiDevName;
                    Cfg.MidiOutStream = MidiDevName;
                    break;
                }
            }
            return(devnum);
        }
Exemplo n.º 14
0
        //internal static void SetMidiDevName(clsMidiInOut.eType type, string name) {
        //  switch (type) {
        //    case eType.InKB:
        //      MidiDevNameInKB = name;
        //      break;
        //    case eType.InSync:
        //      MidiDevNameInSync = name;
        //      break;
        //    case eType.OutKB:
        //      MidiDevNameOutKB = name;
        //      break;
        //    case eType.OutStream:
        //      MidiDevNameOutStream = name;
        //      break;
        //    case eType.OutKBStream:
        //      MidiDevNameOutKB = name;
        //      MidiDevNameOutStream = name;
        //      break;
        //    default:
        //      LogicError.Throw(eLogicError.X129);
        //      break;
        //  }
        //}

        protected void Init(string[] devs, string devname, eType type)
        {
            Type = type;
            int devnum = -1;

            //MidiDevName = devname;
            if (devname.Trim() == "" || devname.Trim().ToLower() == "none")
            {
                return;
            }
            if (devname == "***") //default
            {
                devnum = GetDefaultDevName(devs, type);
            }
            else
            {
                for (int i = 0; i < devs.Length; i++)
                {
                    if (devname == devs[i])
                    {
                        devnum = i;
                        break;
                    }
                }
            }
            if (devnum < 0 || devnum >= devs.Length)
            {
                devname = "***";
                devnum  = GetDefaultDevName(devs, type);
            }
            Init(devnum);
        }
Exemplo n.º 15
0
 /// <summary>
 /// YesNoダイアログを表示する。
 /// </summary>
 /// <param name="title">Title.</param>
 /// <param name="message">Message.</param>
 /// <param name="func">Func.</param>
 public void ShowYesNoDialog(string title, string message, YesNoUI.YesNoFunc func = null)
 {
     SetActiveUI(false);
     mode = eType.YESNO;
     (_DialogUIs [(int)mode] as YesNoUI).SetTitleAndMessage(title, message, func);
     SetActiveUI(true);
 }
Exemplo n.º 16
0
    //リソース取得
    AudioSource _GetAudioSouce(eType type, int channel = -1)
    {
        if (soundObject == null)
        {
            //ゲームオブジェクトがなければ生成
            soundObject = new GameObject("Sound");

            //消さないように
            GameObject.DontDestroyOnLoad(soundObject);

            soundSourceBGM = soundObject.AddComponent <AudioSource>();
            soundSourceSE  = soundObject.AddComponent <AudioSource>();

            for (int i = 0; i < SE_CHANNEL; ++i)
            {
                seChannel[i] = soundObject.AddComponent <AudioSource>();
            }
        }

        if (type == eType.bgm)
        {
            return(soundSourceBGM);
        }
        else
        {
            if (0 <= channel && channel < SE_CHANNEL)
            {
                return(seChannel[channel]);
            }
            else
            {
                return(soundSourceSE);
            }
        }
    }
Exemplo n.º 17
0
 // Methods
 public Cell(int i_X, int i_Y, eType i_Type = eType.Empty)
 {
     m_CellLocation   = new Location();
     m_CellType       = i_Type;
     m_CellLocation.X = i_X;
     m_CellLocation.Y = i_Y;
 }
Exemplo n.º 18
0
  /// AudioSourceを取得する
  AudioSource _GetAudioSource(eType type, int channel=-1) {
    if(_object == null) {
      // GameObjectがなければ作る
      _object = new GameObject("Sound");
      // 破棄しないようにする
      GameObject.DontDestroyOnLoad(_object);
      // AudioSourceを作成
      _sourceBgm = _object.AddComponent<AudioSource>();
      _sourceSeDefault = _object.AddComponent<AudioSource>();
      for (int i = 0; i < SE_CHANNEL; i++)
      {
        _sourceSeArray[i] = _object.AddComponent<AudioSource>();
      }
    }

    if(type == eType.Bgm) {
      // BGM
      return _sourceBgm;
    }
    else {
      // SE
      if (0 <= channel && channel < SE_CHANNEL)
      {
        // チャンネル指定
        return _sourceSeArray[channel];
      }
      else
      {
        // デフォルト
        return _sourceSeDefault;
      }
    }
  }
Exemplo n.º 19
0
 public Molecule(Molecule mol = null)
 {
     if (mol != null)
     {
         if (_debug)
         {
             Logger.Log("Molecule::Molecule(" + mol + ")", Logger.Level.TRACE);
         }
         setName(mol._name);
         _type             = mol._type;
         _description      = mol._description;
         _concentration    = mol._concentration;
         _degradationRate  = mol._degradationRate;
         _fickFactor       = mol._fickFactor;
         _newConcentration = mol._newConcentration;
         if (_debug)
         {
             Logger.Log("Molecule::Molecule(" + mol + ") built " + this, Logger.Level.TRACE);
         }
     }
     else
     {
         if (_debug)
         {
             Logger.Log("Molecule::Molecule(null)", Logger.Level.TRACE);
         }
     }
 }
 public SyntaxType(string newName, eType newType, string newRegExName, Color newColor)
 {
     Name      = newName;
     RegExName = newRegExName;
     Type      = newType;
     Color     = newColor;
 }
Exemplo n.º 21
0
        private static eType CompileExpression(GMLToken _tok, TextWriter _sw)
        {
            eType result   = eType.eGMLT_Unknown;
            bool  _setFunc = false;

            switch (_tok.Token)
            {
            case eToken.eConstant:
                result = CompileConstant(_tok, _sw);
                break;

            case eToken.eBinary:
                result = CompileBinary(_tok, _sw);
                break;

            case eToken.eUnary:
                result = CompileUnary(_tok, _sw);
                break;

            case eToken.eFunction:
                result = CompileFunction(_tok, _sw);
                break;

            case eToken.eVariable:
            case eToken.eDot:
                result = CompileVariable(_tok, _sw, false, out _setFunc);
                break;
            }
            return(result);
        }
Exemplo n.º 22
0
        private static eType CompileUnary(GMLToken _tok, TextWriter _sw)
        {
            eType result = eType.eGMLT_Unknown;

            switch (_tok.Id)
            {
            case 203:
                _sw.Write("!(");
                if (CompileExpression(_tok.Children[0], _sw) != 0)
                {
                    _sw.Write(" > 0.5)");
                }
                else
                {
                    _sw.Write(")");
                }
                result = eType.eGMLT_Bool;
                break;

            case 210:
            case 211:
            case 220:
                _sw.Write(_tok.Text);
                result = CompileExpression(_tok.Children[0], _sw);
                break;
            }
            return(result);
        }
Exemplo n.º 23
0
    AudioSource _GetAudioSource(eType type, int channel = -1)
    {
        if (_soundObject == null)
        {
            _soundObject = new GameObject("Sound");
            GameObject.DontDestroyOnLoad(_soundObject);
            _sourceBgm       = _soundObject.AddComponent <AudioSource>();
            _sourceSeDefault = _soundObject.AddComponent <AudioSource>();
            for (int i = 0; i < SE_CHANNEL; i++)
            {
                _sourceSeArray[i] = _soundObject.AddComponent <AudioSource>();
            }
        }

        if (type == eType.Bgm)
        {
            return(_sourceBgm);
        }
        else
        {
            if (0 <= channel && channel < SE_CHANNEL)
            {
                // チャンネル指定
                return(_sourceSeArray[channel]);
            }
            else
            {
                // デフォルト
                return(_sourceSeDefault);
            }
        }
    }
Exemplo n.º 24
0
 public TileObject(int pIndex, int pTileId, Vector2 pPosition, eType pType)
 {
     Index    = pIndex;
     TileId   = pTileId;
     Position = pPosition;
     Type     = pType;
 }
Exemplo n.º 25
0
        public clsBearing_Thrust_TL(clsUnit.eSystem UnitSystem_In, eType Type_In, clsDB DB_In, clsProduct CurrentProduct_In)
            : base(UnitSystem_In, Type_In, DB_In, CurrentProduct_In)
            //====================================================================================================================
        {
            mPadD = new Double[2];

            mFeedGroove  = new clsFeedGroove(this);
            mWeepSlot    = new clsWeepSlot();
            mPerformData = new clsPerformData();

            ////mT1 = new clsEndMill();
            ////mT2 = new clsEndMill();
            ////mT3 = new clsEndMill();
            ////mT4 = new clsEndMill();

            ////mT2.Type = clsEndMill.eType.Flat;
            ////mT4.Type = clsEndMill.eType.Chamfer;

            ////mOverlap_frac = mc_DESIGN_OVERLAP_FRAC;
            ////mFeedRate.Taperland = mc_FEED_RATE_TL_DEF;
            ////mDepth_TL_BackLash = mc_DEPTH_TL_BACKLASH;
            ////mDepth_TL_Dwell_T = mc_DEPTH_TL_DWELL_T;
            ////mFeedRate.WeepSlot = mc_FEED_RATE_WEEPSLOT_DEF;
            ////mDepth_WS_Cut_Per_Pass = mc_DEPTH_WS_CUT_PER_PASS_DEF;

            Mat.Base         = "Steel 4340";
            Mat.LiningExists = false;
            Mat.Lining       = "Babbitt";
        }
Exemplo n.º 26
0
        public string GetSpecificDescription(eType type)
        {
            string _description = "";
            var    s_list       = typeof(eType).GetFields().ToList();

            for (int i = 1; i < s_list.Count; i++)
            {
                var x = s_list[i].CustomAttributes.ToList();

                var xs = s_list[i].Name;

                if (xs == type.ToString())
                {
                    AssemblyDescriptionAttribute h = new AssemblyDescriptionAttribute(x[0].ToString());

                    Char[] jjj = new Char[] { '"', '/' };

                    var jj = h.Description.Split(jjj);

                    _description = jj[1].ToString();
                }
            }

            return(_description);
        }
Exemplo n.º 27
0
    //初期化
    void Init(eType type, int timer)
    {
        //スプライト設定
        switch (type)
        {
        case eType.Ball:
            //塗りつぶしの円
            SetSprite(spr0);
            break;

        case eType.Ring:
        case eType.Ellipse:
            //リング
            SetSprite(spr1);
            _tScale = SCALE_MAX;
            break;
        }
        _type = type;
        //タイマー設定
        _tDestroy = timer;

        //初期化
        //スケール値を初期化
        Scale = 1.0f;
        //アルファ値を戻す
        Alpha = 1.0f;
    }
Exemplo n.º 28
0
    //AudioSourceを取得する
    AudioSource GetAudioSource(eType type, int channel = -1)
    {
        if (obj == null)
        {
            //GameObjectがなければ作る
            obj = new GameObject("Sound");
            //破壊しないようにする
            GameObject.DontDestroyOnLoad(obj);
            //AudioSourceを作成
            sourceBGM        = obj.AddComponent <AudioSource>();
            sourceSEDefaulut = obj.AddComponent <AudioSource>();
            for (int i = 0; i < SE_CHANNEL; i++)
            {
                sourceSeArray[i] = obj.AddComponent <AudioSource>();
            }
        }

        if (type == eType.Bgm)
        {
            //BGM
            return(sourceBGM);
        }
        else
        {
            //SE
            if (0 <= channel && channel < SE_CHANNEL)
            {
                return(sourceSeArray[channel]);
            }
            else
            {
                return(sourceSEDefaulut);
            }
        }
    }
Exemplo n.º 29
0
 public VCSNES(int index, uint hash, DateTime release, string title, eType type, int romSize, bool extendedFooter, bool pcmData)
     : base(index, hash, release, title)
 {
     ROMSize        = romSize;
     Type           = type;
     ExtendedFooter = extendedFooter;
     PCMData        = pcmData;
 }
 public AEGISCompletionData(string text, string description, int imageIndex, string expression, eType type)
 {
     this.text        = text;
     this.description = description;
     this.imageIndex = imageIndex;
     this.expression = expression;
     this.type = type;
 }
Exemplo n.º 31
0
 public VCSNES(uint hash)
     : base(hash)
 {
     ROMSize        = 0;
     Type           = eType.Unknown;
     ExtendedFooter = false;
     PCMData        = false;
 }
Exemplo n.º 32
0
		public ClaSSPropertyAttribute(
			string name_in, 
			eType type_in
		) : this (
			name_in, 
			type_in, 
			true // default
		) {
		}
Exemplo n.º 33
0
		public ClaSSPropertyAttribute(
			string name_in, 
			eType type_in, 
			bool synchronizeState_in
		) {
			name_ = name_in;
			type_ = type_in;
			synchronizestate_ = synchronizeState_in;
		}
Exemplo n.º 34
0
        public Markup(eType type)
        {
            Type = type;
            Header = Footer = Heading = B_off = B_on = I_off = I_on = Break = HR = MS_off = MS_on = "";

            switch (type)
            {
                case eType.HTML:
                    Header = @"<!DOCTYPE html>
                             <html lang=""en"">
                             <head>
                                <meta charset = ""utf-8""/>
                                <style>
                                p {
                                    font-family: verdana;
                                    font-size: 90%;
                                }
                                p.mono {
                                    font-family: monospace;
                                    font-size: 110%;
                                }
                                </style>
                             </head>
                             <body>
                             <p>";
                    Footer = @"</p></body></html>";
                    B_on = " <strong>";
                    B_off = "</strong>";
                    I_on = "<em>";
                    I_off = "</em>";
                    Break = "<br />";
                    HR = "</p><hr><p>";
                    MS_on = "</p><p class=\"mono\">";
                    MS_off = "</p><p>";
                    break;
                case eType.Markdown:
                    B_on = B_off = "**";
                    I_on = I_off = "*";
                    Break = Environment.NewLine;
                    MS_on = "```";
                    MS_off = "```";
                    break;
                case eType.Slack:
                    B_on = B_off = "*";
                    I_on = I_off = "_";
                    Break = Environment.NewLine;
                    MS_on = "```";
                    MS_off = "```";
                    break;
                case eType.None:
                default:
                    break;
            }
        }
Exemplo n.º 35
0
 public Constraint(Constraint c)
 {
     localAttributes = c.localAttributes;
     remoteAttributes = c.remoteAttributes;
     parentTable = c.parentTable;
     remoteTable = c.remoteTable;
     sName = c.sName;
     type =c.type;
     obj_bb = c.obj_bb;
     obj_pos = c.obj_pos;
     orth_points = c.orth_points;
     orth_orient = c.orth_orient;
 }
Exemplo n.º 36
0
 public Constraint(string pName, string ptype)
 {
     parentTable = new PointerTable("");
     remoteTable = new PointerTable("");
     sName = pName;
     if (ptype.ToUpper() == "FOREIGN KEY") {
         type = eType.eForeignKey;
     } else if (ptype.ToUpper() == "PRIMARY KEY") {
         type = eType.ePrimaryKey;
     } else if (ptype.ToUpper() == "KEY") {
         type = eType.eKey;
     } else if (ptype.ToUpper() == "UNIQUE") {
         type = eType.eUnique;
     }
 }
Exemplo n.º 37
0
        public static Hashtable FetchHourlyStatsForOnlineUsers(DateTime from, DateTime to, eType type)
        {
            using (SqlConnection conn = Config.DB.Open())
            {
                SqlDataReader reader = SqlHelper.ExecuteReader(conn, "FetchHourlyStatsForOnlineUsers", from, to, type);

                Hashtable htStats = new Hashtable();

                while (reader.Read())
                {
                    htStats.Add((DateTime)reader["Time"], (int)reader["OnlineUsers"]);
                }

                return htStats;
            }
        }
Exemplo n.º 38
0
 public Molecule(Molecule mol = null)
 {
   if (mol != null)
   {
     if(_debug) Logger.Log("Molecule::Molecule("+mol+")", Logger.Level.TRACE);
     setName(mol._name);
     _type = mol._type;
     _description = mol._description;
     _concentration = mol._concentration;
     _degradationRate = mol._degradationRate;
     _fickFactor = mol._fickFactor;
     _newConcentration = mol._newConcentration;
     if(_debug) Logger.Log("Molecule::Molecule("+mol+") built "+this, Logger.Level.TRACE);
   } else {
     if(_debug) Logger.Log("Molecule::Molecule(null)", Logger.Level.TRACE);
   }
 }
Exemplo n.º 39
0
        public void Analyze(GetPName pname, eType type)
        {
            bool result1b;
            int result1i;
            int[] result2i = new int[2];
            int[] result4i = new int[4];
            float result1f;
            Vector2 result2f;
            Vector4 result4f;
            string output;

            switch (type)
            {
                case eType.Boolean:
                    GL.GetBoolean(pname, out result1b);
                    output = pname + ": " + result1b;
                    break;
                case eType.Int:
                    GL.GetInteger(pname, out result1i);
                    output = pname + ": " + result1i;
                    break;
                case eType.IntEnum:
                    GL.GetInteger(pname, out result1i);
                    output = pname + ": " + (All)result1i;
                    break;
                case eType.IntArray2:
                    GL.GetInteger(pname, result2i);
                    output = pname + ": ( " + result2i[0] + ", " + result2i[1] + " )";
                    break;
                case eType.IntArray4:
                    GL.GetInteger(pname, result4i);
                    output = pname + ": ( " + result4i[0] + ", " + result4i[1] + " ) ( " + result4i[2] + ", " + result4i[3] + " )";
                    break;
                case eType.Float:
                    GL.GetFloat(pname, out result1f);
                    output = pname + ": " + result1f;
                    break;
                case eType.FloatArray2:
                    GL.GetFloat(pname, out result2f);
                    output = pname + ": ( " + result2f.X + ", " + result2f.Y + " )";
                    break;
                case eType.FloatArray4:
                    GL.GetFloat(pname, out result4f);
                    output = pname + ": ( " + result4f.X + ", " + result4f.Y + ", " + result4f.Z + ", " + result4f.W + " )";
                    break;
                default: throw new NotImplementedException();
            }

            ErrorCode err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("Unsupported Token: " + pname);
            else
                Trace.WriteLine(output);

        }
Exemplo n.º 40
0
        private static EcardType[] Fetch(int? id, string name, eType? type, bool? active, eSortColumn sortColumn)
        {
            using (SqlConnection conn = Config.DB.Open())
            {
                SqlDataReader reader = SqlHelper.ExecuteReader(conn, "FetchEcardTypes",
                                                               id,
                                                               name,
                                                               type,
                                                               active,
                                                               sortColumn);

                List<EcardType> lEcardType = new List<EcardType>();

                while (reader.Read())
                {
                    EcardType ecardType = new EcardType();

                    ecardType.id = (int)reader["ID"];
                    ecardType.name = (string) reader["Name"];
                    ecardType.type = (eType) reader["Type"];
                    ecardType.active = (bool) reader["Active"];
                    ecardType.CreditsRequired = reader["CreditsRequired"] as int?;

                    lEcardType.Add(ecardType);
                }

                return lEcardType.ToArray();
            }
        }
Exemplo n.º 41
0
        private static EcardType[] Fetch(int? id, int? categoryId, string name, eType? type, bool? active, eSortColumn sortColumn)
        {
            using (SqlConnection conn = Config.DB.Open())
            {
                SqlDataReader reader = (SqlDataReader) SqlHelper.GetDB().ExecuteReader("FetchEcardTypes",
                                                               id,
                                                               categoryId,
                                                               name,
                                                               (int?)type,
                                                               active,
                                                               sortColumn);
                var lEcardType = new List<EcardType>();

                while (reader.Read())
                {
                    try
                    {
                        var ecardType = new EcardType
                                            {
                                                id = (int) reader["ID"],
                                                categoryId = (int) reader["CategoryID"],
                                                name = (string) reader["Name"],
                                                phrase = (string) reader["Phrase"],
                                                type = (eType) reader["Type"],
                                                active = (bool) reader["Active"]
                                            };
                        lEcardType.Add(ecardType);
                    }
                    catch { }
                }
                return lEcardType.ToArray();
            }
        }
Exemplo n.º 42
0
    public void OnButtonClickDown(eType buttonType)
    {
        //set the current type to be the laugh/help button that was pressed
        currentType = buttonType;

        if (mySolutions[currLevel].GetComponent<PuzzleImageType>().currentImageType == PuzzleImageType.LaughOrHelp.Laugh) //if the current level is laughable
        {
            if (currentType == eType.LaughManager)
            {
                AudioManager.Instance.Play(rightAnswerFX, transform, 1, false);

                GameObject.Find("HelpButton").GetComponent<BoxCollider>().enabled = false;
                GameObject.Find("LaughButton").GetComponent<BoxCollider>().enabled = false;
                ShowDialogue(DialogueType.LAUGHRIGHT);
                currentType = eType.Invalid_Type;
                Invoke("nextLevel",laughRight.GetCommulativeDuration());
            }
            else if (currentType == eType.HelpManager)
            {
                AudioManager.Instance.Play(wrongAnswerFX, transform, 1, false);

                wrongTries++;
                ShowDialogue(DialogueType.HELPWRONG);
                if (wrongTries>=3)
                {
                    GameObject.Find("HelpButton").GetComponent<BoxCollider>().enabled = false;
                    GameObject.Find("HelpButton").GetComponentInChildren<UISprite>().color = new Color(0.5f, 0.5f, 0.5f, 1.0f);
                }
            }
        }
        else
        {
            if (currentType == eType.LaughManager)
            {
                AudioManager.Instance.Play(wrongAnswerFX, transform, 1, false);

                wrongTries++;
                ShowDialogue (DialogueType.LAUGHWRONG);
                if (wrongTries>=3)
                {
                    GameObject.Find("LaughButton").GetComponent<BoxCollider>().enabled = false;
                    GameObject.Find("LaughButton").GetComponentInChildren<UISprite>().color = new Color(0.5f, 0.5f, 0.5f, 1.0f);
                }
            }
            else if (currentType == eType.HelpManager)
            {
                AudioManager.Instance.Play(rightAnswerFX, transform, 1, false);

                GameObject.Find("HelpButton").GetComponent<BoxCollider>().enabled = false;
                GameObject.Find("LaughButton").GetComponent<BoxCollider>().enabled = false;
                ShowDialogue (DialogueType.HELPRIGHT);
                currentType = eType.Invalid_Type;
                Invoke("nextLevel",helpRight.GetCommulativeDuration());
            }

        }
    }
Exemplo n.º 43
0
 public static bool IsEventsSettingEnabled(eType type, User user)
 {
     return (user.EventsSettings & (ulong)type) == (ulong)type;
 }
Exemplo n.º 44
0
	public Tbl_Action_Record(XmlElement _element, eType _type)// : base(_element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			
			SetValue(ref m_Index, node, "Index");
			SetValue(ref m_ActionName, node, "ActionName");
			if(_type == eType.User)
			{
				SetValue<eCLASS>(ref m_Class, node, "Class");
				SetValue<eGENDER>(ref m_Gender, node, "Gender");
			}
			else
			{
				SetValue(ref m_ClassName, node, "Class");
			}
				
			SetValue(ref m_LinkActionIndex, node, "LinkActionIndex");
			SetValue(ref m_AniBlendingDuration, node, "AniBlendingDuration");
			SetValue<eNextIdleIndex>(ref m_NextIdleIndex, node, "NextIdleIndex");
//			SetValue(ref m_ActionSpeed, node, "ActionSpeed");
			
			XmlNode ready = node.SelectSingleNode("Ready");
			XmlNode hit = node.SelectSingleNode("Hit");
			XmlNode finish = node.SelectSingleNode("Finish");
			
			#region - ready & hit & finish -
			if(ready != null)
			{
				int[] counts = new int[4];
				m_ReadyAnimation = CreateActionReadyAnimation(ref ready, ref counts);
				
				List<Tbl_Action_Effect> listEffect = GetEffectElements(ref ready, counts[(int)eElementSequence.Effect], _type);
				List<Tbl_Action_Sound> listSound = GetSoundElements(ref ready, counts[(int)eElementSequence.Sound]);
				List<Tbl_Action_Trail> listTrail = GetTrailElements(ref ready, counts[(int)eElementSequence.Trail]);
				List<Tbl_Action_Cancel> listCancel = GetCancelElements(ref ready, counts[(int)eElementSequence.Cancel]);
				
				m_ReadyAnimation.SetEffect(listEffect);
				m_ReadyAnimation.SetSound(listSound);
				m_ReadyAnimation.SetTrail(listTrail);
				m_ReadyAnimation.SetCancel(listCancel);
			}
			
			if(hit != null)
			{
				int[] counts = new int[4];
				m_HitAnimation = CreateActionHitAnimation(ref hit, ref counts);
				
//				m_HitAnimation.SetMoveInfo(
				
				List<Tbl_Action_Effect> listEffect = GetEffectElements(ref hit, counts[(int)eElementSequence.Effect], _type);
				List<Tbl_Action_Sound> listSound = GetSoundElements(ref hit, counts[(int)eElementSequence.Sound]);
				List<Tbl_Action_Trail> listTrail = GetTrailElements(ref hit, counts[(int)eElementSequence.Trail]);
				List<Tbl_Action_Cancel> listCancel = GetCancelElements(ref hit, counts[(int)eElementSequence.Cancel]);
				
				m_HitAnimation.SetEffect(listEffect);
				m_HitAnimation.SetSound(listSound);
				m_HitAnimation.SetTrail(listTrail);
				m_HitAnimation.SetCancel(listCancel);
				
				if(hit.NextSibling != null)
					m_HitAnimation.SetHitInfo(new Tbl_Action_HitInfo(hit.NextSibling));
			}
			
			if(finish != null)
			{
				int[] counts = new int[4];
				m_FinishAnimation = CreateActionAnimation(ref finish, ref counts);
				
				List<Tbl_Action_Effect> listEffect = GetEffectElements(ref finish, counts[(int)eElementSequence.Effect], _type);
				List<Tbl_Action_Sound> listSound = GetSoundElements(ref finish, counts[(int)eElementSequence.Sound]);
				List<Tbl_Action_Trail> listTrail = GetTrailElements(ref finish, counts[(int)eElementSequence.Trail]);
				List<Tbl_Action_Cancel> listCancel = GetCancelElements(ref finish, counts[(int)eElementSequence.Cancel]);
				
				m_FinishAnimation.SetEffect(listEffect);
				m_FinishAnimation.SetSound(listSound);
				m_FinishAnimation.SetTrail(listTrail);
				m_FinishAnimation.SetCancel(listCancel);
			}
			#endregion
			
			DecideBlendingStep();
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
Exemplo n.º 45
0
 /// <summary>
 /// Counts group members by specified group ID and type.
 /// </summary>
 /// <param name="groupID">The group ID.</param>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 public static int Count(int groupID, eType type)
 {
     return Count(groupID, type, null);
 }
Exemplo n.º 46
0
        public static string RenderHtml(string text, eType type, eSize size, string cssClass = "", string onClientClick = "", string href = "javascript:void(0);", string rel = "", string target = "")
        {
            StringBuilder res = new StringBuilder();
            res.Append("<span class=\"btn-c\">");

            cssClass = string.Format("btn{0}{1}{2}", type != eType.None ? " btn-" + type.ToString().ToLower() : string.Empty,
                                                            size != eSize.None ? " btn-" + size.ToString().ToLower() : string.Empty,
                                                            cssClass.IsNotEmpty() ? " " + cssClass : string.Empty);

            res.AppendFormat("<a class=\"{0}\" href=\"{1}\" {2}{3}{5}>{4}</a>",
                                                                cssClass,
                                                                href,
                                                                onClientClick.IsNotEmpty() ? "onclick=\"" + onClientClick + "\"" : string.Empty,
                                                                rel.IsNotEmpty() ? "rel=\"" + rel + "\"" : string.Empty,
                                                                text,
                                                                target.IsNotEmpty() ? "target='" + target : string.Empty
                                                                );
            res.Append("</span>");

            return res.ToString();
        }
Exemplo n.º 47
0
        private static ScheduledAnnouncement[] Fetch(int? id, User.eGender? gender, bool? paidMember, bool? hasPhotos,
                                                        bool? hasProfile, int? languageID, string country, string region,
                                                        eType? type)
        {
            using (SqlConnection conn = Config.DB.Open())
            {
                SqlDataReader reader = SqlHelper.ExecuteReader(conn, "FetchScheduledAnnouncement",
                                                                        id, gender, paidMember, hasPhotos,
                                                                        hasProfile, languageID, country, region, type);

                List<ScheduledAnnouncement> lScheduledAnnouncements = new List<ScheduledAnnouncement>();

                while (reader.Read())
                {
                    ScheduledAnnouncement scheduledAnnouncement = new ScheduledAnnouncement();

                    scheduledAnnouncement.id = (int)reader["ID"];
                    scheduledAnnouncement.name = (string) reader["Name"];
                    scheduledAnnouncement.subject = (string)reader["Subject"];
                    scheduledAnnouncement.body = (string)reader["Body"];
                    scheduledAnnouncement.gender = reader["Gender"] != DBNull.Value
                                                       ? (User.eGender?) ((int) reader["Gender"])
                                                       : null;
                    scheduledAnnouncement.paidMember = reader["PaidMember"] != DBNull.Value
                                                           ? (bool?) reader["PaidMember"]
                                                           : null;
                    scheduledAnnouncement.hasPhotos = reader["HasPhotos"] != DBNull.Value
                                                           ? (bool?)reader["HasPhotos"]
                                                           : null;
                    scheduledAnnouncement.hasProfile = reader["HasProfile"] != DBNull.Value
                                                           ? (bool?)reader["HasProfile"]
                                                           : null;
                    scheduledAnnouncement.languageID = reader["LanguageID"] != DBNull.Value
                                                           ? (int?)reader["LanguageID"]
                                                           : null;
                    scheduledAnnouncement.country = reader["Country"] != DBNull.Value
                                                           ? (string)reader["Country"]
                                                           : null;
                    scheduledAnnouncement.region = reader["Region"] != DBNull.Value
                                                           ? (string)reader["Region"]
                                                           : null;
                    scheduledAnnouncement.type = (eType) reader["Type"];
                    scheduledAnnouncement.date = reader["Date"] != DBNull.Value
                                                           ? (DateTime?)reader["Date"]
                                                           : null;
                    scheduledAnnouncement.days = reader["Days"] != DBNull.Value
                                                           ? (int?)reader["Days"]
                                                           : null;

                    lScheduledAnnouncements.Add(scheduledAnnouncement);
                }

                return lScheduledAnnouncements.ToArray();
            }
        }
Exemplo n.º 48
0
 //----------------------------------------------------------------------------------------------------
 /// <summary>
 /// 생성자
 /// </summary>
 /// <param name="type">타입</param>
 //----------------------------------------------------------------------------------------------------
 public cDatabase( eType type )
 {
     m_type	= type;
     m_error = "";
 }
Exemplo n.º 49
0
        private static Event[] Fetch(int? id, eType? type, string fromUsername,
                                     int? fromGroup, DateTime? date, ulong? bitMask,
                                     int? numberOfEvents, eSortColumn sortColumn)
        {
            date = date.HasValue ? date.Value.Date : (DateTime?)null;

            using (var db = new ezFixUpDataContext())
            {
                var events = from e in db.Events
                             where (!id.HasValue || e.e_id == id)
                                   && (!type.HasValue || e.e_type == (long?)type)
                                   && (fromUsername == null || e.e_fromusername == fromUsername)
                                   && (!fromGroup.HasValue || e.e_fromgroup == fromGroup)
                                   && (!date.HasValue || e.e_date.Date == date)
                                   && (!bitMask.HasValue || (e.e_type & (long?)bitMask) > 0)
                             select new Event
                             {
                                 id = e.e_id,
                                 fromUsername = e.e_fromusername,
                                 type = (eType)e.e_type,
                                 fromGroup = e.e_fromgroup,
                                 detailsXML = e.e_details,
                                 date = e.e_date
                             };

                if (sortColumn == eSortColumn.Date)
                    events = events.OrderByDescending(e => e.date);

                if (numberOfEvents.HasValue)
                    events = events.Take(numberOfEvents.Value);

                return events.ToArray();
            }
        }
Exemplo n.º 50
0
        public static void Delete(int? id, string fromUsername, int? fromGroup, eType? type,
                                  DateTime? date)
        {
            using (var db = new ezFixUpDataContext())
            {
                var events = from e in db.Events
                             where (!id.HasValue || e.e_id == id)
                                   && (!type.HasValue || e.e_type == (long?)type)
                                   && (fromUsername == null || e.e_fromusername == fromUsername)
                                   && (!fromGroup.HasValue || e.e_fromgroup == fromGroup)
                                   && (!date.HasValue || e.e_date.Date == date)
                             select e;
                foreach (var ev in events)
                {
                    db.EventComments.DeleteAllOnSubmit(ev.EventComments);
                }

                db.Events.DeleteAllOnSubmit(events);
                db.SubmitChanges();
            }
        }
Exemplo n.º 51
0
 public static GroupMember[] Fetch(int groupID, eType type, eSortColumn sortColumn)
 {
     return Fetch(groupID, null, type, null, null, null, null, sortColumn);
 }
Exemplo n.º 52
0
	List<Tbl_Action_Effect> GetEffectElements(ref XmlNode _next, int _count, eType _type)
	{
		List<Tbl_Action_Effect> listEffect = new List<Tbl_Action_Effect>();
		
		for(int i=0; i<_count; ++i)
		{
			_next = _next.NextSibling;
			
			float fxTiming = 0;
			string fxName = "NONE";
			eLinkType fxLink = eLinkType.NONE;
			eLoopType fxLoop = eLoopType.NONE;
			float fxDuration = 0;
			bool positionFix = false;
			float startSize = 1;
			
			SetAttribute(ref fxTiming, _next, "Timing");
			SetAttribute(ref fxName, _next, "FileName");
			SetAttribute<eLinkType>(ref fxLink, _next, "LinkType");
			SetAttribute<eLoopType>(ref fxLoop, _next, "LoopType");
			SetAttribute(ref fxDuration, _next, "LoopDuration");
			SetAttribute(ref positionFix, _next, "PositionFix");
//			if(_type == eType.User)
				SetAttribute(ref startSize, _next, "StartSize");
			
			listEffect.Add(new Tbl_Action_Effect(this, fxTiming, fxName, fxLink, fxLoop, fxDuration, positionFix, startSize));
		}
		
		return listEffect;
	}
Exemplo n.º 53
0
        /// <summary>
        /// Fetches group members from DB by specified group ID, username, type or active status.
        /// If all arguments are null it returns all group members from DB.
        /// If it cannot find a record in DB by specified arguments it returns an empty array.
        /// </summary>
        /// <param name="groupID">The group ID.</param>
        /// <param name="username">The username.</param>
        /// <param name="type">The type.</param>
        /// <param name="active">The active.</param>
        /// <param name="joinDate">The join date.</param>
        /// <param name="invitedBy">The invited by.</param>
        /// <param name="numberOfMembers">The number of members.</param>
        /// <returns>Group members array or an empty array if no group members are found in DB.</returns>
        private static GroupMember[] Fetch(int? groupID, string username, eType? type, bool? active,
                                                DateTime? joinDate, string invitedBy,
                                                int? numberOfMembers, eSortColumn sortColumn)
        {
            using (SqlConnection conn = Config.DB.Open())
            {
                SqlDataReader reader = (SqlDataReader) SqlHelper.GetDB().ExecuteReader( "FetchGroupMembers",
                                                                groupID, username, type, active, joinDate, invitedBy, numberOfMembers, sortColumn);

                List<GroupMember> groupMembers = new List<GroupMember>();

                while (reader.Read())
                {
                    GroupMember groupMember = new GroupMember();

                    groupMember.groupID = (int) reader["GroupID"];
                    groupMember.username = (string) reader["Username"];
                    groupMember.type = (eType) reader["Type"];
                    groupMember.active = (bool) reader["Active"];
                    groupMember.joinDate = (DateTime) reader["JoinDate"];
                    groupMember.invitedBy = reader["InvitedBy"] != DBNull.Value
                                                                    ? (string) reader["InvitedBy"] : null;
                    groupMember.joinAnswer = (string) reader["JoinAnswer"];
                    groupMember.isWarned = (bool) reader["IsWarned"];
                    groupMember.warnReason = reader["WarnReason"] != DBNull.Value ? (string) reader["WarnReason"] : null;
                    groupMember.warnExpirationDate = reader["WarnExpirationDate"] != DBNull.Value
                                                         ? (DateTime?) reader["WarnExpirationDate"]
                                                         : null;

                    groupMembers.Add(groupMember);
                }

                return groupMembers.ToArray();
            }
        }
Exemplo n.º 54
0
 public Expression(eType type)
 {
     mType = type;
 }
Exemplo n.º 55
0
 /// <summary>
 /// Counts group members by specified arguments.
 /// </summary>
 /// <param name="groupID">The group ID.</param>
 /// <param name="type">The type.</param>
 /// <param name="active">The active.</param>
 /// <returns></returns>
 private static int Count(int groupID, eType? type, bool? active)
 {
     using (SqlConnection conn = Config.DB.Open())
     {
         return Convert.ToInt32(SqlHelper.GetDB().ExecuteScalar( "FetchGroupMembersCount", groupID, type, active));
     }
 }
Exemplo n.º 56
0
        public static Hashtable FetchHourlyStatsForNewUsers(DateTime from, DateTime to, eType type)
        {
            //using (var conn = Config.DB.Open())
            {
                var reader = SqlHelper.GetDB().ExecuteReader( "FetchHourlyStatsForNewUsers", from, to, type);

                Hashtable htStats = new Hashtable();

                while(reader.Read())
                {
                    htStats.Add((DateTime) reader["Time"], (int) reader["NewUsers"]);
                }

                return htStats;
            }
        }
Exemplo n.º 57
0
 public static string NewLine(eType type)
 {
     switch (type)
     {
         case eType.HTML:
             return "<br />";
         case eType.None:
         case eType.Markdown:
         case eType.Slack:
         default:
             return Environment.NewLine;
     }
 }
Exemplo n.º 58
0
        private static object GetFrom_OtherSource(eType m_eType, string param, Type type)
        {
            object o = new object();
            switch (m_eType)
            {

                case eType.IniFile_Settings:
                    if (type == typeof(string))
                    {
                        return (string)Settings_List.Get(param);
                    }
                    else if (type == typeof(int))
                    {
                        return (int)Settings_List.Get(param);
                    }
                    else
                    {
                        MessageBox.Show("ERROR:LogFile:Settings." + param + ":type = "+type.ToString()+" not implemented !");
                        return null;
                    }

                default:
                    MessageBox.Show("ERROR:LogFile.Settings." + param + ":get m_eType not implemented !");
                    if (type == typeof(int))
                    {
                        o = (int)0;
                    }
                    else if (type == typeof(long))
                    {
                        o = (long)0;

                    }
                    else if (type == typeof(decimal))
                    {
                        o = (decimal)0;

                    }
                    else if (type == typeof(float))
                    {
                        o = (float)0;

                    }
                    else if (type == typeof(short))
                    {
                        o = (short)0;

                    }
                    else if (type == typeof(uint))
                    {
                        o = (uint)0;

                    }
                    else if (type == typeof(bool))
                    {
                        o = (bool)false;

                    }
                    else if (type == typeof(DateTime))
                    {
                        o = DateTime.MinValue;
                    }
                    else if (type == typeof(System.Drawing.Color))
                    {
                        o = System.Drawing.Color.Black;
                    }
                    else
                    {
                        return null;
                    }
                    return o;
            }
        }
Exemplo n.º 59
0
		public void Bind_Fields(
			eType FieldType_, 
			bool MultipleSelection_, 
			int SpecificTable_, 
			eType SelectionType_
		) {
			bool _canAdd;
			lvwFields.Items.Clear();
			
			for ( // tweaked for-cycle!
				int t = (SpecificTable_ >= 0) ? SpecificTable_ : 0; 
				t < frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection.Count;
				t++
			) {
				for (int f = 0; f < frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection.Count; f++) {
					_canAdd = false;

					switch (FieldType_) {
						case eType.OnlyIdentityKey:
							_canAdd = frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isIdentity;
							break;
						case eType.OnlyPrimaryKeys:
							_canAdd = frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isPK;
							break;
						case eType.NoKeys:
							_canAdd = !frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isPK;
							break;
						case eType.All:
							_canAdd = true;
							break;
						case eType.None:
							_canAdd = false;
							break;
					}
					if (_canAdd) {
						lvwFields.Items.Add(
							//new ListViewItem(
								string.Format( 
									"{0}{1}", 
									(SpecificTable_ >= 0) ? "" : frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].Name + "\\", 
									frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].Name
								)
							//)
						);

						switch (SelectionType_) {
							case eType.OnlyIdentityKey:
								lvwFields.Items[lvwFields.Items.Count - 1].Selected = 
									frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isIdentity;
								break;
							case eType.OnlyPrimaryKeys:
								lvwFields.Items[lvwFields.Items.Count - 1].Selected = 
									frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isPK;
								break;
							case eType.NoKeys:
								lvwFields.Items[lvwFields.Items.Count - 1].Selected = 
									!frm_Main.NTierProject.Metadata.MetadataDBCollection[0].Tables.TableCollection[t].TableFields.TableFieldCollection[f].isPK;
								break;
							case eType.All:
								lvwFields.Items[lvwFields.Items.Count - 1].Selected = true;
								break;
							case eType.None:
								lvwFields.Items[lvwFields.Items.Count - 1].Selected = false;
								break;
						}
					}
				}

				// tweaked for-cycle!
				if (SpecificTable_ >= 0) break;
			}
			lvwFields.MultiSelect = MultipleSelection_;
		}
Exemplo n.º 60
0
 public static Event[] Fetch(int fromGroup, eType type, DateTime date)
 {
     return Fetch(null, type, null, fromGroup, date, null, null, eSortColumn.None);
 }