示例#1
0
        /// <summary>
        /// Adds a text status item to the status bar</summary>
        /// <param name="width">Text panel width</param>
        /// <returns>Text panel on status bar</returns>
        public Atf.Applications.IStatusText AddText(int width)
        {
            var statusText = new StatusText(width);

            m_composer.Container.ComposeExportedValue <IStatusItem>(statusText);
            return(new StatusTextAdapter(statusText));
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (RequestId != 0)
            {
                hash ^= RequestId.GetHashCode();
            }
            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (StatusText.Length != 0)
            {
                hash ^= StatusText.GetHashCode();
            }
            if (Lat != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Lat);
            }
            if (Long != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Long);
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        protected override void Update(GameTime gameTime)
        {
            CurrentGameTime = gameTime;

            InputKeyboard.UpdateState();
            InputMouse.UpdateState();

            if (InputKeyboard.KeyNowPressed(Keys.I))
            {
                StatusText.DrawStatus = !StatusText.DrawStatus;
            }

            if (InputKeyboard.KeyNowPressed(Keys.H))
            {
                StatusText.DrawControls = !StatusText.DrawControls;
            }

            StatusText.Update();

            ManipulationMenu.Update();

            if (Pause)
            {
                PausedActions();
            }
            else
            {
                RunningActions();
            }

            CamControl.Update();
        }
示例#4
0
 public static void SetStatusText(int line, string leftText = "", string rightText = "")
 {
     if (line > consoleStatus.Length - 1)
     {
         if (!string.IsNullOrEmpty(leftText) || !string.IsNullOrEmpty(rightText))
         {
             Array.Resize(ref consoleStatus, line + 1);
             for (int i = 0; i < consoleStatus.Length; i++)
             {
                 if (consoleStatus[i] == null)
                 {
                     consoleStatus[i] = new StatusText();
                 }
             }
         }
     }
     else
     {
         if (string.IsNullOrEmpty(leftText) && string.IsNullOrEmpty(rightText))
         {
             consoleStatus = consoleStatus.RemoveAt(line);
             return;
         }
     }
     consoleStatus[line].RightText = rightText;
     consoleStatus[line].LeftText  = leftText;
 }
示例#5
0
        async Task UploadFileToShare(FilePathSourceAndTarget pathes)
        {
            var source = pathes.Get().SourcePath;
            var target = pathes.Get().TargetPath;

            Contract.Requires(source != null && !string.IsNullOrEmpty(source.FullName) && !source.Equals(target));

            CommonExtensions.Logger(LogTypes.Info, $"Идет отправка файла {source.FullName} -> {target.FullName}");
            //  StatusText?.Invoke(this, new TextEventArgs($"Идет отправка файла {source.FullName} -> {target.FullName}"));

            try
            {
                await Task.Run(() => fileSystem.File.Copy(source.FullName, target.FullName, true));

                CommonExtensions.Logger(LogTypes.Info, $"Файл '{target.FullName}' на сервер доставлен успешно.");
                StatusFinishedUploading?.Invoke(this, new BoolEventArgs(true));
                StatusText?.Invoke(this, new TextEventArgs($"Файл '{target.FullName}' на сервер доставлен успешно."));
            }
            catch (Exception err)
            {
                CommonExtensions.Logger(LogTypes.Info, $"Отправка файла '{target.FullName}' на сервер выполнена с ошибками! {err.ToString()}");
                StatusFinishedUploading?.Invoke(this, new BoolEventArgs(false));
                StatusText?.Invoke(this, new TextEventArgs($"Отправка файла '{target.FullName}' на сервер выполнена с ошибками! {err.ToString()}"));
            }
        }
示例#6
0
    public void addCombatText(string text)
    {
        StatusText combatText = gameObject.AddComponent(typeof(StatusText)) as StatusText;

        combatText.text = text;
        combatTextStack.Add(combatText);
    }
示例#7
0
        public Status(JsonNode jnNode) : base(jnNode)
        {
            m_jnNode       = jnNode;
            m_lsReplyNames = new List <string>();

            if (m_jnNode.ContainsKey("text") && m_jnNode["text"].IsString())
            {
                JsonNode          jnEntities = Entities();
                List <JsonObject> ljoUrls    = null;

                if (jnEntities != null && jnEntities.ContainsKey("urls") && jnEntities["urls"].IsList())
                {
                    ljoUrls = jnEntities["urls"].ToList();
                }

                m_stStatusText = StatusText.FromString(RemoveRT(m_jnNode["text"].ToString()), ljoUrls);
                m_bIsReply     = (m_stStatusText.Words.Count > 1) && (m_stStatusText.Words[0].Type == StatusTextElement.StatusTextElementType.ScreenName);
                m_bIsRetweet   = (m_jnNode.ContainsKey("retweeted_status")) || (m_stStatusText.Words.Count > 0) && (m_stStatusText.Words[0].Text.Trim() == "RT");

                for (int i = 0; i < m_stStatusText.Words.Count; i++)
                {
                    if (m_stStatusText.Words[i].Type == StatusTextElement.StatusTextElementType.ScreenName)
                    {
                        m_lsReplyNames.Add(m_stStatusText.Words[i].Text);
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }
示例#8
0
 protected void MakeReport(string message)
 {
     this.BeginInvoke((Action)(() =>
     {
         StatusText.AppendText(message + "\r\n");
     }));
 }
示例#9
0
 // If data is received from the server
 private void Client_DataReceived(object sender, SimpleTCP.Message e)
 {
     StatusText.Invoke((MethodInvoker) delegate()
     {
         StatusText.Text += e.MessageString;
     });
 }
示例#10
0
        void ReleaseDesignerOutlets()
        {
            if (StatusDesc != null)
            {
                StatusDesc.Dispose();
                StatusDesc = null;
            }

            if (StatusLanguage != null)
            {
                StatusLanguage.Dispose();
                StatusLanguage = null;
            }

            if (StatusText != null)
            {
                StatusText.Dispose();
                StatusText = null;
            }

            if (TextEditor != null)
            {
                TextEditor.Dispose();
                TextEditor = null;
            }
        }
示例#11
0
 protected void MakeReport(string message)
 {
     this.Invoke(new Function(delegate()
     {
         StatusText.AppendText(message + "\r\n");
     }));
 }
示例#12
0
 // Use this for initialization
 void Start()
 {
     influenceProtocols = FindObjectOfType <InfluenceProtocols> ().GetComponent <InfluenceProtocols> ();
     playerValues       = FindObjectOfType <PlayerValues> ().GetComponent <PlayerValues> ();
     statusText         = FindObjectOfType <StatusText> ().GetComponent <StatusText> ();
     this.gameObject.SetActive(false);
 }
示例#13
0
    public void UpdateStatus(string statusMsg)
    {
        StatusText.GetComponent <Text>().text = statusMsg;
        Debug.Log(statusMsg);
        if (PeerType == 1)
        {
            CardListPanel.SetActive(true);
            PeerListPanel.SetActive(false);
            //      SendProfileBtn.SetActive(true);

            foreach (string card in cardList)
            {
                Debug.Log("card : " + card);
                GameObject button = (GameObject)Instantiate(CardPrefab);
                button.transform.SetParent(cardParent.transform);
                Debug.Log("Button Created");
                button.GetComponent <RawImage>().texture = imageTextures[cardList.IndexOf(card)];

                button.GetComponent <Button>().onClick.AddListener(() => CardClick(card));
            }
        }
        else
        {
            Image.SetActive(false);
            ConnectedImage.SetActive(true);
        }
        Debug.Log(statusMsg);
    }
示例#14
0
    public override bool Cast()
    {
        bool wasCast = false;

        effectAlpha = 1f;

        Vector2 mousePosition  = player.GetComponent <ClickHandler>().getMousePosition();
        Vector2 playerPosition = player.GetComponent <Rigidbody2D>().position;

        RaycastHit2D[] hits = Physics2D.LinecastAll(playerPosition, mousePosition);
        foreach (RaycastHit2D hit in hits)
        {
            if (hit != null && hit.collider != null)
            {
                if (hit.collider.gameObject.GetComponent <EnemyController>() != null)
                {
                    // CombatText combatText = hit.collider.gameObject.AddComponent(typeof(CombatText)) as CombatText;
                    // combatText.text= damage.ToString();
                    CombatText.Create(hit.collider.gameObject.transform.position, 100.ToString(), false);
                    StatusText.Create(hit.collider.gameObject.transform.position, "Stunned", false);
                    hit.collider.gameObject.GetComponent <CombatTextFactory>().addCombatText("Hit Enemy with dash");
                    Debug.Log("Hit Enemy with dash");
                }
            }
        }

        player.GetComponent <Rigidbody2D>().position = mousePosition;
        DashEffect.Create(playerPosition, mousePosition);
        wasCast = true;

        Debug.Log("Cast Dash");
        return(wasCast);
    }
示例#15
0
 public static void NextTurn()
 {
     if (!IsGameStarted())
     {
         return;
     }
     if (m_currentPlayer == m_player0)
     {
         m_currentPlayer = m_player1;
         m_anotherPlayer = m_player0;
     }
     else
     {
         m_currentPlayer = m_player0;
         m_anotherPlayer = m_player1;
     }
     if (m_currentPlayer.GetRole() == PlayerRole.Cross)
     {
         StatusText.SetText(Constant.STATUS_TEXT.CROSS_TURN);
     }
     else
     {
         StatusText.SetText(Constant.STATUS_TEXT.ROUND_TURN);
     }
     if (m_currentPlayer.IsAI())
     {
         instance.StartCoroutine(CurrentPlayerDoTurnAfterSeconds(Constant.AI_THINKING_SECONDS));
     }
 }
 public EMP_ViewProjects(int id, string type)
 {
     ID            = id;
     Type          = type;
     controllerObj = new Controller();
     InitializeComponent();
     if (Type != "Admin")
     {
         Add.Hide();
         Delete.Hide();
         label2.Hide();
         label5.Hide();
         StatusText.Hide();
         Confirm.Hide();
         newStatus.Hide();
         Company.Hide();
     }
     else
     {
         label5.Hide();
         Company.Hide();
         DataTable C = controllerObj.SelectAllCompanies();
         Company.DataSource    = C;
         Company.DisplayMember = "Name";
         Company.ValueMember   = "CID";
         button_ViewProj.Text  = "Edit Selected";
     }
 }
示例#17
0
    public IEnumerator ProcessPLY(string input, string output)
    {
        string pinput  = Path.GetFullPath(input);
        string poutput = Path.GetFullPath(output);

        Debug.Log("converting " + pinput + " into " + poutput);
        if (File.Exists(input))
        {
            string parameters = " \"" + pinput + "\" -o \"" + poutput + "\" -t " + this.siteData.custom.modelType;

            StatusText.SetText("Converting " + input + "into octree format and caching");

            var stopwatch = new System.Diagnostics.Stopwatch();
            stopwatch.Start();
            var proc = System.Diagnostics.Process.Start(Path.GetFullPath(GameManager.pathToPotreeExecutable), parameters);
            while (!proc.HasExited)
            {
                yield return(null);
            }
            // proc.WaitForExit();
            // proc.CloseMainWindow();
            StatusText.Hide();
            stopwatch.Stop();
            Debug.Log("Done in " + stopwatch.Elapsed.Seconds + " seconds");
        }
        yield return(null);
    }
示例#18
0
 public void UpdateFromStatus(Status stStatus)
 {
     m_stStatusText     = stStatus.StatusText;
     m_bAlreadyUpdating = true;
     rtbTextBox.Rtf     = m_stStatusText.ToRTF(m_fntFont);
     m_bAlreadyUpdating = false;
 }
示例#19
0
    // Use this for initialization
    void Awake()
    {
        score = 0;

        //配列の初期化
        for (int i = 0; i < board.GetLength(0); i++)
        {
            for (int j = 0; j < board.GetLength(1); j++)
            {
                board[i, j]     = -1;
                board_num[i, j] = -1;
            }
        }

        //初期用配列設定
        board[0, 0]     = maxDiceId;
        board_num[0, 0] = 1;

        DiceBase = (GameObject)Resources.Load("Dice");
        Dice     = GameObject.Find("Dice");
        dices.Add(Dice);  //リストにオブジェクトを追加
        Aqui = GameObject.Find("Aqui");
        objAquiController = Aqui.GetComponent <AquiController>();
        objDiceController = Dice.GetComponent <DiceController>();

        if (gameType == 3)
        {
            board[0, 0]     = -1;
            board_num[0, 0] = -1;
            maxDiceId       = 0;
            dices.Clear();
            Destroy(Dice);
        }

        StatusText    = GameObject.Find("StatusText");
        objStatusText = StatusText.GetComponent <StatusTextController>();
        ScreenText    = GameObject.Find("ScreenText");
        objScreenText = ScreenText.GetComponent <ScreenTextController>();

        gobjOGController = GameObject.Find("OnlineGameController");



        //BGM
        if (gameType != 2)
        {
            BgmManager.Instance.Play((stage + 1).ToString()); //BGM
        }
        else
        {
            BgmManager.Instance.Play("tutorial"); //BGM
        }

        //AudioSourceコンポーネントを取得し、変数に格納
        AudioSource[] audioSources = GetComponents <AudioSource>();
        sound_one     = audioSources[0];
        sound_levelup = audioSources[1];
        sound_vanish  = audioSources[2];
    }
示例#20
0
    public IEnumerator CacheTextures(List <Texture2D> textures, string imagePath)
    {
        string cacheDirectory = GetCacheDirectory(imagePath);

        if (Directory.Exists(cacheDirectory))
        {
            foreach (string file in Directory.GetFiles(cacheDirectory))
            {
                File.Delete(file);
            }

            Directory.Delete(cacheDirectory);
        }

        Directory.CreateDirectory(cacheDirectory);

        string fileName = Path.GetFileNameWithoutExtension(imagePath);

        string cachedPathFormat = cacheDirectory + "/" + fileName + "_{0}.png";

        for (int i = 0; i < textures.Count; i++)
        {
            string finalpath = "";

            switch (i)
            {
            case FRONT_INDEX:
                finalpath = string.Format(cachedPathFormat, "front");
                break;

            case BACK_INDEX:
                finalpath = string.Format(cachedPathFormat, "back");
                break;

            case LEFT_INDEX:
                finalpath = string.Format(cachedPathFormat, "left");
                break;

            case RIGHT_INDEX:
                finalpath = string.Format(cachedPathFormat, "right");
                break;

            case UP_INDEX:
                finalpath = string.Format(cachedPathFormat, "up");
                break;

            case DOWN_INDEX:
                finalpath = string.Format(cachedPathFormat, "down");
                break;
            }

            byte[] bytes = textures[i].EncodeToPNG();

            StatusText.SetText("Stage 4: Caching Images:\n" + (i + 1) + " of " + textures.Count);
            yield return(null);

            File.WriteAllBytes(finalpath, bytes);
        }
    }
 void Awake()
 {
     decision_grid  = FindObjectOfType <DecisionGrid>();
     game_settings  = FindObjectOfType <GameSettings>();
     my_characters  = gameObject.GetComponent <MyCharacters>();
     curr_char_text = FindObjectOfType <CurrCharText>();
     status_text    = FindObjectOfType <StatusText>();
 }
示例#22
0
    private StatusText statusTextScript; //The script attached to the above object

    // Use this for initialization


    void Start()
    {
        rb2d             = GetComponent <Rigidbody2D> ();
        statusTextScript = statusDisplay.GetComponent("StatusText") as StatusText;
        hurtSource       = GetComponent <AudioSource> ();
        health           = 3;
        currentWeapon    = shot1;
    }
示例#23
0
 public static string ToDescriptionString(this StatusText val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val
                                         .GetType()
                                         .GetField(val.ToString())
                                         .GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }
示例#24
0
 protected void MakeName(string message)
 {
     this.Invoke(new Function(delegate()
     {
         textBox1.Text = message;
         StatusText.AppendText(message + "\r\n");
     }));
 }
示例#25
0
 private void Start()
 {
     //if statusText is null try to find from scene
     if (statusText == null)
     {
         statusText = FindObjectOfType <StatusText>();
     }
 }
示例#26
0
 protected void MakeReport(string message)
 {
     //if (!StatusText.IsHandleCreated)
     //{
     //    this.CreateHandle();
     //}
     Invoke(new Function(() => StatusText.AppendText(message + "\r\n")));
 }
示例#27
0
        public ActionResult ViewStatus(int ReleaseId, int CPID = 0, bool IsDraft = true)
        {
            using (ReleaseCPRepository db = new ReleaseCPRepository())
            {
                status           = new StatusVM();
                status.ReleaseID = ReleaseId;

                NavigationBreadCrums.SetSesionReleaseID(ReleaseId);

                List <StatusAreaText> statusAreaTexts;
                using (IStatusAreaTextRepository dbStatusAreaText = new StatusAreaTextRepository())
                {
                    statusAreaTexts = dbStatusAreaText.Where(a => a.ReleaseID == ReleaseId).ToList();
                }
                using (IStatusTextRepository dbStatusText = new StatusTextRepository())
                {
                    StatusText statusText = dbStatusText.Where(a => a.ReleaseID == ReleaseId).FirstOrDefault();
                    if (statusText != null)
                    {
                        status.StatusText = new StatusTextVM()
                        {
                            ReleaseID = statusText.ReleaseID, HighLightText = statusText.HighLightText
                        }
                    }
                    ;
                }
                using (IReleaseChecklistAnswerRepository dbChecklist = new ReleaseChecklistAnswerRepository())
                {
                    status.AreaScores = dbChecklist.GetStatus(ReleaseId).Select(q =>
                                                                                new AreaScoreVM()
                    {
                        AreaID         = q.Area.AreaID,
                        ReleaseID      = ReleaseId,
                        Name           = q.Area.Name,
                        Score          = q.Score,
                        ScoreStatus    = IndicatorList.First(i => q.Score >= i.Min && q.Score < i.Max).ScoreIMG,
                        Trand          = q.LastScore != null ? TrandCalculation(q.Score, (double)q.LastScore) : Trand.none,
                        StatusAreaText = statusAreaTexts != null && statusAreaTexts.Where(s => s.AreaID == q.Area.AreaID).FirstOrDefault() != null ? statusAreaTexts.Where(s => s.AreaID == q.Area.AreaID).FirstOrDefault().AreaText : "",
                        SubAreaScors   = q.SubAreaScores.Select(s =>
                                                                new SubAreaScoreVM()
                        {
                            Name        = s.SubArea.Name,
                            Score       = s.Score,
                            ScoreStatus = IndicatorList.First(i => s.Score >= i.Min && s.Score < i.Max).ScoreIMG,
                            SubAreaID   = s.SubArea.SubAreaID,
                            Trand       = s.LastScore != null ? TrandCalculation(s.Score, (double)s.LastScore) : Trand.none,
                        }).ToList()
                    }).ToList();
                }
            }
            status.Details = new ReleaseGeneralDetails()
            {
                ReleaseID = ReleaseId
            };
            status.CPID    = CPID;
            status.IsDraft = IsDraft;
            return(View(status));
        }
示例#28
0
        public ImageWriteTilesGdal(Dataset ds, int sizeTile, string path, StatusText funcST, StatusProgressBar funcSPB)
        {
            _ds       = ds;
            _sizeTile = sizeTile;
            _path     = path;

            _funcStatusText        = funcST;
            _funcStatusProgressBar = funcSPB;
        }
示例#29
0
 // Set the text that will display.
 public static void SetText(string text)
 {
     if (statusText != null)
     {
         // Show the text if it exists.
         StatusText.Show();
         statusText.text = text;
     }
 }
示例#30
0
        /// <summary>
        /// 状況表示(テキスト表示のみ)
        /// </summary>
        public void DispStatus(string addLogText)
        {
            var statusText = new StatusText();

            statusText.AddLogText = addLogText;

            //ステータス表示
            this.BackgroundWorker.ReportProgress(( int )this.NowPercent, statusText);
        }
示例#31
0
        private void Bug663834(OpenXmlValidator validator)
        {
            DocumentFormat.OpenXml.Wordprocessing.StatusText st = new StatusText();
            st.Val = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";

            var errors = validator.Validate(st);
            Assert.Equal(1, errors.Count());
            Assert.Equal(ValidationErrorType.Schema, errors.First().ErrorType);
            Assert.Equal("Sch_AttributeValueDataTypeDetailed", errors.First().Id);
            AssertValidationErrorCategory("Sch_MaxLengthConstraintFailed", errors.First());
            Assert.True(errors.First().Description.EndsWith("The length must be smaller than or equal to 140."));
        }