Пример #1
0
            protected override void OnDoubleClick(DataGridViewCellEventArgs e)
            {
                base.OnDoubleClick(e);
                var cell = this.DataGridView[e.ColumnIndex, e.RowIndex];

                if (cell.IsInEditMode)
                {
                    this.DataGridView.EndEdit();
                }
                using (TextVisualizer dialog = new TextVisualizer()) {
                    dialog.TextValue = this.Value as string;
                    dialog.ReadOnly  = this.DataGridView.ReadOnly || this.OwningColumn.ReadOnly;
                    dialog.ShowDialog(null);
                    if (dialog.TextValueChanged)
                    {
                        this.Value = dialog.TextValue;
                        this.DataGridView.EndEdit();
                    }
                }
            }
Пример #2
0
    public IEnumerator SetPanelHeight()
    {
        yield return(new WaitForEndOfFrame());

        TextVisualizer textVisualizer = TextAppController.Instance.TextViewController.TextProg.textVisualizer;

        float         height      = transform.parent.GetChild(1).GetComponent <RectTransform>().sizeDelta.y;
        float         panelHeight = height + marginSize;
        RectTransform rt          = GetComponent <RectTransform>();

        if (textVisualizer != null)
        {
            textVisualizer.defaultPanelSize = panelHeight;
        }
        rt.sizeDelta = new Vector2(rt.sizeDelta.x, 0);
        //if (textVisualizer != null)
        //    textVisualizer.AdjustScrolling(textVisualizer.GetComponent <TextProgression>().endLoc,
        //        textVisualizer.transform.GetChild(textVisualizer.transform.childCount - 1).
        //        GetComponent<TextMessageController>().bubbleHeight);

        //textVisualizer.GetComponent<RectTransform>().localPosition = new Vector3(0, -textVisualizer.maxScroll, 0);

        yield return(null);
    }
Пример #3
0
 static void Main(string[] args)
 {
     var random     = new Random();
     var visualizer = new TextVisualizer();
     var game       = new Game(visualizer, HangmanWords[random.Next(HangmanWords.Length)]);
 }