コード例 #1
0
ファイル: DataManipulation.cs プロジェクト: SidoDenis/tweets
 public static void GetTweetsByStates()
 {
     sortedTweets = TweetFunc.GetDictionary(tweets, states);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: NBLANCHE/Project
 public static extern int setTweetback(AllocFunc allocGlobal, TweetFunc tweetBack, PtrPassFunc saveFullPicture, PtrPassFunc SkeletonLog);
コード例 #3
0
ファイル: DataManipulation.cs プロジェクト: SidoDenis/tweets
 public static void GetListOfTweets(string path)
 {
     tweets = TweetFunc.parse(path);
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: NBLANCHE/Project
        static void Main(string[] args)
        {
            SetUpOSCPort();

            logger = new Logger("./log/log.txt");

            AllocFunc allocGlobalFunc = new AllocFunc(Program.allocGlobal);
            TweetFunc TweetPictureDel = new TweetFunc(Program.TweetPicture); DontThrowOutMaDelegates.Add(TweetPictureDel);
            PtrPassFunc FullPictureDel = new PtrPassFunc(Program.SaveWholePicture); DontThrowOutMaDelegates.Add(FullPictureDel);
            PtrPassFunc SkeletonLogDel = new PtrPassFunc(Program.SkeletonLog); DontThrowOutMaDelegates.Add(SkeletonLogDel);
            int ret = setTweetback(allocGlobalFunc, TweetPictureDel, FullPictureDel,SkeletonLogDel);
            IntNPtrPassFunc RoundStartDel = new IntNPtrPassFunc(Program.RoundStart); DontThrowOutMaDelegates.Add(RoundStartDel);
            IntFunc CountdownDel = new IntFunc(Program.Countdown); DontThrowOutMaDelegates.Add(CountdownDel);
            IntFunc HoldingDel = new IntFunc(Program.Holding); DontThrowOutMaDelegates.Add(HoldingDel);
            IntFunc HoldFailDel = new IntFunc(Program.HoldingFail); DontThrowOutMaDelegates.Add(HoldFailDel);
            VoidFunc TimeoutDel = new VoidFunc(Program.Timeout); DontThrowOutMaDelegates.Add(TimeoutDel);
            ThreeIntFunc ShapeCompletedDel = new ThreeIntFunc(Program.ShapeCompleted); DontThrowOutMaDelegates.Add(ShapeCompletedDel);
            TwoIntFunc ShapeStatusDel = new TwoIntFunc(Program.ShapeStatus); DontThrowOutMaDelegates.Add(ShapeStatusDel);
            PlayerStatusFunc PlayerStatusDel = new PlayerStatusFunc(Program.PlayerStatus); DontThrowOutMaDelegates.Add(PlayerStatusDel);
            ret = setOSCEvents(RoundStartDel, CountdownDel, HoldingDel, HoldFailDel, TimeoutDel, ShapeCompletedDel, ShapeStatusDel, PlayerStatusDel);

            GameStart();

            Action KinectLoop = new Action(openKinectWindow);
            KinectLoop.BeginInvoke(null, null);

            bool run = true;

            //Console.WriteLine("Type -1 and press ENTER to start game.");

            while (run)
            {
                string input = Console.ReadLine();
                try
                {
                    int number = Convert.ToInt32(input);
                    numericCommand(number);
                    
                }
                catch
                {
                    //string commands.
                    switch (input)
                    {
                        case "s":
                            GameID++;
                            startGame(GameID,GameLength);
                            Console.WriteLine("Starting Game " + GameID);
                            break;
                        case "e":
                            endGame();
                            break;
                    }
                }
                input = "";

                //yes, this is an infinite loop. Behold!
            }

        }