Пример #1
0
 public void HideAll()
 {
     foreach (Transform item in BrainController.instance.transform) {
         item.gameObject.SetActive (false);
     }
     showStatus = ShowStatus.HIDE_ALL;
 }
Пример #2
0
        public bool Save()
        {
            bool returnValue;

            try
            {
                using (RegistryKey registryKey = OpenRegistryKey())
                {
                    registryKey.SetValue(ANIMATION_SPEED, (int)AnimationSpeed, RegistryValueKind.DWord);
                    registryKey.SetValue(FRAMES_PER_SECOND, FramesPerSecond, RegistryValueKind.DWord);
                    registryKey.SetValue(MAXIMUM_HEARTS, MaximumHearts, RegistryValueKind.DWord);
                    registryKey.SetValue(SCALE, Scale, RegistryValueKind.DWord);
                    registryKey.SetValue(SHOW_HELP, ShowHelp.ToString(), RegistryValueKind.String);
                    registryKey.SetValue(SHOW_STATUS, ShowStatus.ToString(), RegistryValueKind.String);

                    registryKey.Close();
                }

                returnValue = true;
            }
            catch (Exception e)
            {
                Logging.LogException(e);
                returnValue = false;
            }

            return(returnValue);
        }
Пример #3
0
        static void Main(string[] args)
        {
            Scoreboard board = new Scoreboard();

            ShowStatus points = new ShowStatus(board.PointsAwarded);
            ShowStatus hit    = new ShowStatus(board.TargetHit);

            ShowStatus display = points;

            display += hit;

            CalculateScore getScore;
            int            time    = 60;
            int            targets = 20;

            getScore = new CalculateScore(Scoreboard.CalculateAdultScore);
            Console.WriteLine("Adult score: {0}", getScore(time, targets));

            getScore = null;

            getScore = new CalculateScore(Scoreboard.CalculateChildScore);
            Console.WriteLine("Child score: {0}", getScore(time, targets));

            getScore = null;

            display();

            display -= hit;
            display  = null;

            Console.ReadKey();
        }
Пример #4
0
 void BringOut()
 {
     _spring = SpringPosition.Begin(gameObject, InitialPos, BringInForce);
     _spring.eventReceiver    = gameObject;
     _spring.callWhenFinished = "FinishSpring";
     _nowStatus = ShowStatus.BringOut;
 }
Пример #5
0
 public void ShowAll()
 {
     foreach (Transform item in BrainController.instance.transform) {
         item.gameObject.SetActive (true);
     }
     showStatus = ShowStatus.SHOW_ALL;
 }
Пример #6
0
 void BringOut()
 {
     _colorTweener.enabled = true;
     _colorTweener.from    = _to;
     _colorTweener.to      = _from;
     _colorTweener.Reset();
     _nowStatus = ShowStatus.BringOut;
 }
Пример #7
0
 public void ShowSelected()
 {
     foreach (Transform item in BrainController.instance.transform) {
         bool selected = BrainController.itemsSelected.Contains (item.gameObject);
         item.gameObject.SetActive (selected);
     }
     showStatus = ShowStatus.SHOW_SELECTED;
 }
Пример #8
0
 void BringIn()
 {
     gameObject.transform.localPosition = InitialPos;
     _spring = SpringPosition.Begin(gameObject, Vector3.zero, BringInForce);
     _spring.eventReceiver    = gameObject;
     _spring.callWhenFinished = "FinishSpring";
     _nowStatus = ShowStatus.BringIn;
 }
Пример #9
0
 void BringIn()
 {
     StopAllCoroutines();
     _isWaitBringOut       = false;
     _colorTweener.enabled = true;
     _colorTweener.from    = _from;
     _colorTweener.to      = _to;
     _colorTweener.Reset();
     _nowStatus = ShowStatus.BringIn;
 }
Пример #10
0
 private void FormMergeMca_Load(object sender, EventArgs e)
 {
     lblCount.Text      = "";
     lblLines.Text      = "";
     tslblStatus.Text   = "等待数据";
     btnCombine.Enabled = false;
     myPerformStep      = new PerformStep(progressAdd);
     myProgressInit     = new ProgressInit(progressSetMax);
     myShowCount        = new ShowCount(showCount);
     myShowStatus       = new ShowStatus(showStatus);
     myAddListView      = new AddListView(addListView);
 }
Пример #11
0
 void FinishSpring(SpringPosition sp)
 {
     if (_nowStatus == ShowStatus.BringIn)
     {
         StartCoroutine(WaitToBringOut());
     }
     else if (_nowStatus == ShowStatus.BringOut)
     {
         TurnText.text = string.Empty;
         _nowStatus    = ShowStatus.Hide;
     }
 }
        //constructor
        public ChatProxy(ShowReceivedMessage srm, ShowStatus sst, string myport, string partneraddress)
        {
            StartChatServer(myport);
            if (Status)
            {
                _srm = srm;
                _sst = sst;
                _client = new HttpClient() { BaseAddress = new Uri(partneraddress) };

                ChatController.ThrowMessageArrivedEvent += (sender, args) => { ShowMessage(args.Message); };
            }
        }
Пример #13
0
 void FinishTween(UITweener tweener)
 {
     if (_nowStatus == ShowStatus.BringIn)
     {
         StartCoroutine(WaitToBringOut());
     }
     else if (_nowStatus == ShowStatus.BringOut)
     {
         _msgLabel.text = string.Empty;
         _nowStatus     = ShowStatus.Hide;
     }
 }
Пример #14
0
 public Show(string name, ShowType type, int number, DateTime start, float price, ShowStatus status, Address address, string picture)
 {
     Name          = name;
     Type          = type;
     NumberOfSeats = number;
     Start         = start;
     Price         = price;
     Status        = status;
     Address       = address;
     Comments      = new List <Comment>();
     Picture       = picture;
 }
Пример #15
0
        private void Bind()
        {
            if (Off)
            {
                return;
            }

            var showService         = Ioc.GetInstance <IShowService>();
            List <ShowStatus> shows = showService.GetShowStatusByYear(Year);

            //Shows is populated in Main.aspx with all the ShowStatus's for the ListenedShows
            if (Shows != null && Shows.Count > 0)
            {
                foreach (var s in Shows)
                {
                    //If the user has a listened status set for this show then its a match
                    var match = shows.Find(x => x.ShowId == s.ShowId);
                    if (match == null)
                    {
                        continue;
                    }

                    //The new ShowStatus to use for binding
                    var copy = new ShowStatus(match.ShowId, s.Status, match.ShowDate, match.ShowName, s.Attended);

                    //Put the new ShowStatus where the old one was because order is important
                    var index = shows.IndexOf(match);
                    //Remove the old one
                    shows.Remove(match);
                    //Insert the new one where the old one was
                    shows.Insert(index, copy);
                }
            }

            if (MonthMode && (shows != null && shows.Count >= 0))
            {
                SetupMonthMode(shows);
            }

            if (Tutorial && (shows != null && shows.Count >= 0))
            {
                var displayCount = ShowsToDisplay > 0 ? ShowsToDisplay : _DEFAULT_SHOWS_TO_DISPLAY;
                shows = shows.GetRange(0, displayCount);
            }

            //Set the one year box
            yearBox.Shows    = shows;
            yearBox.Month    = Year.ToString();
            yearBox.Tutorial = Tutorial;
        }
Пример #16
0
        public frmSyncTCPClient()
        {
            InitializeComponent();

            #region 实例化委托
            // 显示消息
            showMessageCallback = new ShowMessage(showMessage);

            // 显示状态
            showStatusCallBack = new ShowStatus(showStatus);

            // 重置消息
            resetMessageCallBack = new ResetMessage(resetMessage);
            #endregion
        }
Пример #17
0
        //constructor
        public ChatProxy(ShowReceivedMessage srm, ShowStatus sst, string myport, string partneraddress)
        {
            StartChatServer(myport);
            if (Status)
            {
                _srm    = srm;
                _sst    = sst;
                _client = new HttpClient()
                {
                    BaseAddress = new Uri(partneraddress)
                };

                ChatController.ThrowMessageArrivedEvent += (sender, args) => { ShowMessage(args.Message); };
            }
        }
        public frmSyncTCPClient()
        {
            InitializeComponent();

            #region 实例化委托
            // 显示消息
            showMessageCallback = new ShowMessage(showMessage);

            // 显示状态
            showStatusCallBack = new ShowStatus(showStatus);

            // 重置消息
            resetMessageCallBack = new ResetMessage(resetMessage);
            #endregion
        }
Пример #19
0
    IEnumerator SP3_CandidatesPresentation()
    {
        OverlapCamPanel.SetActive(false);


        ShowPhase = ShowStatus.PHASE2;

        OverlapCamPanel.SetActive(true);
        int candidateNumber = -1;

        foreach (Person candidate in Census)
        {
            candidateNumber++;
            yield return(StartCoroutine(SP3_CandidatePresentationTime(candidate, candidateNumber)));
        }
        StartCoroutine(SP3_CompileShadows());
    }
        public frmSyncTcpServer()
        {
            InitializeComponent();

            #region 实例化委托
            // 显示消息
            showMessageCallback = new ShowMessage(showMessage);

            // 显示状态
            showStatusCallBack = new ShowStatus(showStatus);

            // 重置消息
            resetMessageCallBack = new ResetMessage(resetMessage);
            #endregion

            ipaddress        = IPAddress.Loopback;
            tbxserverIp.Text = ipaddress.ToString();
            tbxPort.Text     = Port.ToString();
        }
Пример #21
0
        public void Examine()
        {
            DateTime now = DateTime.Now;

            if (expired <= now)
            {
                Status    = new ShowStatus(ShowRed);
                expAlarm += mess.Message;
                expAlarm();
            }
            if (expired > now && expired <= now.AddDays(7))
            {
                Status = new ShowStatus(ShowWhite);
            }
            if (expired > now.AddDays(7))
            {
                Status = new ShowStatus(ShowGreen);
            }
        }
Пример #22
0
        public frmSyncTcpServer()
        {
            InitializeComponent();

            #region 实例化委托
            // 显示消息
            showMessageCallback = new ShowMessage(showMessage);

            // 显示状态
            showStatusCallBack = new ShowStatus(showStatus);

            // 重置消息
            resetMessageCallBack = new ResetMessage(resetMessage);
            #endregion

            ipaddress = IPAddress.Loopback;
            tbxserverIp.Text = ipaddress.ToString();
            tbxPort.Text = Port.ToString();
        }
Пример #23
0
        public async Task <JsonResult> UpdateList(int id, ShowStatus status, ShowRating rating, string type)
        {
            var user = await GetCurrentUserAsync();

            if (user == null)
            {
                return(Json("ERROR: failed to update"));
            }
            var toModify = await _context.MyListShows
                           .Include(x => x.MyList)
                           .SingleOrDefaultAsync(x => x.SafeCompareId(type, id) && x.MyList.UserForeignKey == user.Id);

            if (toModify == null)
            {
                return(Json("ERROR: Show not in list"));
            }
            _context.Update(toModify);
            toModify.Status = (int)status;
            toModify.Rating = (int)rating;
            await _context.SaveChangesAsync();

            return(Json("Updated list"));
        }
Пример #24
0
 public virtual void Visit(ShowStatus node)
 {
     VisitInternal(node.Where);
 }
Пример #25
0
 void Start()
 {
     status = GetComponent <ShowStatus>();
     UIGlobal.instance.InputLogin.text = "Player_" + Random.Range(1000, 10000);
 }
Пример #26
0
        static async Task Main(string[] args)
        {
            #region MultiCasting
            Scoreboard board = new Scoreboard();

            ShowStatus points  = new ShowStatus(board.PointsAwarded);
            ShowStatus hit     = new ShowStatus(board.TargetHit);
            ShowStatus another = new ShowStatus(board.AnotherMethodAdded);

            ShowStatus display = points;

            //Using the compound assignment operator the second delegate is added to the
            //invocation chain so that when display is called, both of the underlying
            //methods are executed.

            display += hit;
            display += another;
            display += () => Console.WriteLine("And this is a lamda method added to invocation chain");

            display();
            #endregion

            #region Delegate
            CalculateScore getScore;
            int            time    = 60;
            int            targets = 20;

            // Puedo pasar al delegado el metodo en cuestion
            //getScore = new CalculateScore(CalculateAdultScore);

            // o puedo igualar el delegado a una lambda (arrow function)
            //getScore = (seconds, targets1) => { return (targets1 * 10) - (seconds * 2); };
            //Console.WriteLine("Adult score: {0}", getScore(time, targets));

            ////getScore = new CalculateScore(CalculateChildScore);

            //getScore = (seconds, targets1) => { return (targets * 15) - seconds;};
            //Console.WriteLine("Child score: {0}", getScore(time, targets));
            #endregion

            //Timer tm = new Timer(TimerCallback,null,0,3000);


            //int x = await AsyncDemo.SomeMethod(10);

            //Console.WriteLine("sync value {0}", x);



            //Console.ReadLine();



            //List<Customer> list = new List<Customer>()
            //{
            //    new Customer {Name = "Bob", Type="Direct"},
            //    new Customer {Name = "Jhon", Type="Direct"},
            //    new Customer {Name = "Joseph", Type="Indirect"},
            //    new Customer {Name = "Mary", Type="Indirect"},

            //};

            //var filteredElement = list.RunCustomWhere(p => p.Type == "Direct").ToList();

            //filteredElement.ForEach(c => Console.WriteLine(c.Name));

            //Console.Write(filteredElement);
        }
Пример #27
0
 public void GoToAdvertising(AdvertisingTime setUp)
 {
     ShowPhase = ShowStatus.ADVERTISING;
     setUp.InitAddTime(this);
 }
Пример #28
0
 public void EndOfAdvertising()
 {
     ShowPhase = ShowStatus.SHOW;
 }
Пример #29
0
 // Update is called once per frame
 void Update()
 {
     status = _nowStatus;
 }
Пример #30
0
 /// <summary>
 /// Управление статусом сериала
 /// </summary>
 /// <param name="ShowId">АйДи сериала</param>
 /// <param name="status">Статус сериала</param>
 /// <returns>Код ответа</returns>
 public int SetShowStatuse(string ShowId, ShowStatus status)
 {
     int result = -1;
     try
     {
         string stat = "";
         switch (status)
         {
             case ShowStatus.watching:
                 stat = "watching";
                 break;
             case ShowStatus.later:
                 stat = "later";
                 break;
             case ShowStatus.cancelled:
                 stat = "cancelled";
                 break;
             case ShowStatus.remove:
                 stat = "remove";
                 break;
             default:
                 break;
         }
         req = System.Net.HttpWebRequest.Create(@"http://api.myshows.ru/profile/shows/" + ShowId + "/" + stat);
         req.Proxy = System.Net.HttpWebRequest.GetSystemWebProxy();
         (req as HttpWebRequest).CookieContainer = new CookieContainer();
         (req as HttpWebRequest).CookieContainer.Add(cookies);
         System.Net.WebResponse resp = req.GetResponse();
         result = ((int)(resp as System.Net.HttpWebResponse).StatusCode);
     }
     catch (WebException ex)
     {
         try
         {
             result = (int)(ex.Response as System.Net.HttpWebResponse).StatusCode;
         }
         catch
         {
         }
     }
     return result;
 }
        private void SwitchVisual()
        {
            if (this.currentVisability == ShowStatus.Hide)
            {
                this.currentVisability = ShowStatus.Show;
            }
            else if (this.currentVisability == ShowStatus.Show)
            {
                this.currentVisability = ShowStatus.Timer;
                this.showTimer = 10;
            }
            else
            {
                this.currentVisability = ShowStatus.Hide;
            }

            if (this.currentVisability == ShowStatus.Hide)
            {
                this.flag_showVisually = false;
            }
            else
            {
                this.flag_showVisually = true;
            }

            //flag_showVisually = !flag_showVisually;
        }
Пример #32
0
    IEnumerator SP2_HouseEntryOnStage(GameObject houseCandidate)
    {
        Debug.Log("#####PHASE1####");

        ShowPhase = ShowStatus.PHASE1;

        yield return(StartCoroutine(WaitingInput()));

        #region ShowmanPresentHouse

        //Interpretación de la presentación cambiando las palabras clave
        yield return(StartCoroutine(ConversationManager.Instance.ReplaceDialogueKeywords(ConversationManager.Instance.P2_ShowmanPresentHouse)));

        string[] showmanPresentHouse = ConversationManager.Instance.NextCheckedText;


        TextBoxCanvas.GetComponentInChildren <Text>().text = "";

        yield return(StartCoroutine(NpcToFirstPlane2(Showman.GetComponent <NpcController>().Identificator, false)));

        StartCoroutine(Interlocutor1.GetComponent <NpcController>().TalkDialogue(showmanPresentHouse));

        yield return(StartCoroutine(WaitingInput()));

        #endregion



        #region House entry on stage
        SpotsPlane.SetActive(false);

        SwapCamera(1, CinemachineBlendDefinition.Style.EaseInOut);

        float timeToReachTarget = HouseEntrySeconds;
        float t = 0;

        float firstDistance = Vector3.Distance(new Vector2(houseCandidate.transform.position.x, houseCandidate.transform.position.y), new Vector3(HouseOnStagePos.x, HouseOnStagePos.y));
        float distance      = Mathf.Abs(HouseOnStagePos.x - houseCandidate.transform.position.x);

        TextBoxCanvas.GetComponentInChildren <Text>().text = "";

        yield return(new WaitForSeconds(gameObject.GetComponent <CinemachineBrain>().m_DefaultBlend.m_Time / 2));


        while (distance > 0.1f)
        {
            float timeToResearchTargetSeconds = timeToReachTarget * 10;
            t += Time.deltaTime / timeToResearchTargetSeconds;


            houseCandidate.transform.position = Vector3.Lerp(houseCandidate.transform.position, HouseOnStagePos, t);

            //houseCandidate.GetComponent<Rigidbody>().velocity = new Vector3(1,0,0)* HouseEntrySpeed;
            distance = Mathf.Abs(HouseOnStagePos.x - houseCandidate.transform.position.x);

            yield return(null);
        }
        #endregion

        //Showman aproaches de house

        yield return(StartCoroutine(SP2_ShowmanBuddyMovesTowardsHouse()));

        StartCoroutine(SP2_HouseFirstSpeak(houseCandidate));
    }
Пример #33
0
 public void hack()
 {
     ShowPhase = ShowStatus.SHOW;
 }
Пример #34
0
 private static UIFont GetShowEndTimeFont(ShowStatus status)
 {
     return(status == ShowStatus.Finished
         ? Theme.VenueShowFinishedEndTimeFont : Theme.VenueShowEndTimeFont);
 }
Пример #35
0
 protected override void Awake()
 {
     base.Awake ();
     menus.Add("ShowMenu", this);
     showStatus = ShowStatus.SHOW_ALL;
 }
Пример #36
0
 public void ResumeShow()
 {
     ShowPhase = ShowStatus.SHOW;
 }
Пример #37
0
 private IQueryable<Show> GetShows(ShowStatus status)
 {
     return this.GetAllShows().Where(show => show.Status == status);
 }
Пример #38
0
 public void Visit(ShowStatus node)
 {
 }