Esempio n. 1
0
        /// <summary>
        /// 使用するペーンを指定する
        /// 記述例:  Pane=Resource
        /// </summary>
        /// <param name="param"></param>
        public override void ParseParameter(string param)
        {
            base.ParseParameter(param);
            var coms = new List <string>(StrUtil.SplitTrim(param, ";"));

            foreach (var com in coms)
            {
                var ops = new List <string>(StrUtil.SplitTrim(com, "="));
                if (ops.Count == 2)
                {
                    if (ops[0].ToUpper() == "PANE")
                    {
                        _tarPane = Pane.GetPane(ops[1]);
                    }
                    if (ops[0].ToUpper() == "SPEED")
                    {
                        try
                        {
                            _speed = double.Parse(ops[1]);
                            if (_speed == 0.0 || Math.Abs(_speed) > 1000)
                            {
                                throw new Exception();
                            }
                        }
                        catch (Exception e)
                        {
                            Debug.Assert(false, GetType().Name + " : 'Speed' Parameter syntax error\r\nusage : Speed=<value>\r\nvalue> 1.0=Normal speed / 0.5=Half.(max 1000)");
                            throw e.InnerException;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// パラメータを取得する
        /// </summary>
        /// <param name="param"></param>
        public override void ParseParameter(string param)
        {
            base.ParseParameter(param);
            foreach (var c1 in StrUtil.SplitTrim(param, ";"))
            {
                var com = StrUtil.SplitTrim(c1, "=");
                if (com.Length != 2)
                {
                    continue;
                }

                if (com[0].Equals("Pane", StringComparison.CurrentCultureIgnoreCase))
                {
                    _tarPane = Pane.GetPane(com[1]);
                }
                if (com[0].Equals("MarginL", StringComparison.CurrentCultureIgnoreCase))
                {
                    _margin.LT.X = int.Parse(com[1]);
                }
                if (com[0].Equals("MarginT", StringComparison.CurrentCultureIgnoreCase))
                {
                    _margin.LT.Y = int.Parse(com[1]);
                }
                if (com[0].Equals("MarginR", StringComparison.CurrentCultureIgnoreCase))
                {
                    _margin.RB.X = int.Parse(com[1]);
                }
                if (com[0].Equals("MarginB", StringComparison.CurrentCultureIgnoreCase))
                {
                    _margin.RB.Y = int.Parse(com[1]);
                }
            }
        }
Esempio n. 3
0
 public override void OnInitInstance()
 {
     base.OnInitInstance();
     TarPane       = Pane.GetPane("GuiViewMain");
     _isAutoScroll = (DataSharingManager.Boolean)Share.Get("_isAutoScroll", typeof(DataSharingManager.Boolean));
     Timer.AddTrigger(1000, OnPorling);
 }
Esempio n. 4
0
 /// <summary>
 /// フィーチャー初期化
 /// </summary>
 public override void OnInitInstance()
 {
     base.OnInitInstance();
     _tarPane = Pane.GetPane("Resource");        // デフォルト。ParseParameterで指定してください
     _bar     = createScrollBarPart();
     Parts.Add(_tarPane, _bar, Const.Layer.StaticLayers.ScrollBarH);
 }
Esempio n. 5
0
        /// <summary>
        /// パラメータ解析
        /// </summary>
        /// <param name="param"></param>
        public override void ParseParameter(string param)
        {
            base.ParseParameter(param);

            var coms = param.Split(new char[] { ';' });

            foreach (var com in coms)
            {
                var od = com.Split(new char[] { '=' });
                if (od.Length < 2)
                {
                    continue;
                }

                if (od[0].ToLower() == "pane")
                {
                    _filterPane = Pane.GetPane(od[1]);
                }
                if (od[0].ToLower() == "layer")
                {
                    _filterLayer = int.Parse(od[1]);
                }
                if (od[0].ToLower() == "avoid")
                {
                    var ts = od[1].Split(new char[] { ',' });
                    foreach (var tt in ts)
                    {
                        var t = tt.Trim().ToLower();
                        switch (t)
                        {
                        case "top":
                            _isTop = false;
                            break;

                        case "left":
                            _isLeft = false;
                            break;

                        case "right":
                            _isRight = false;
                            break;

                        case "bottom":
                            _isBottom = false;
                            break;

                        case "inside":
                            _isInside = false;
                            break;

                        case "move":
                            _isMove = false;
                            break;
                        }
                    }
                }
            }
        }
Esempio n. 6
0
        public override void OnInitInstance()
        {
            base.OnInitInstance();
            TarPane = Pane.GetPane("GuiViewMain");

            Timer.AddTrigger(1100, () =>
            {
                Start(null);
            });
        }
Esempio n. 7
0
        public override void OnInitInstance()
        {
            base.OnInitInstance();
            TarPane = Pane.GetPane("GuiViewMain");

            Parts.Add(TarPane, _parts = new PartsMask
            {
                Hot                 = Hot,
                IsMasking           = true,
                PartsPositioner     = TalkPositioner,
                PartsPositionCorder = TalkPosCoder,
            }, 65535);
            Timer.AddTrigger(500, PlayingMonitor);
        }
Esempio n. 8
0
        public override void OnInitInstance()
        {
            base.OnInitInstance();
            Hot.FirstSpeech = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute / 10 * 10, 0);

            TarPane = Pane.GetPane("GuiViewMain");

            Hot.AddRowID(ROWID_TIMELINE, orderNo: 100, layoutHeight: 24); // Set Timeline Height
            Hot.AddRowID(-999, 101, 4);                                   // Dummy Space
            Hot.TimelineParts = new PartsTimeline
            {
                Hot                 = Hot,
                Rect                = CodeRect.FromLTRB(0, ROWID_TIMELINE, 0, ROWID_TIMELINE),
                PartsPositioner     = TalkPositioner,
                PartsPositionCorder = TalkPosCoder,
            };
            Parts.Add(TarPane, Hot.TimelineParts);
        }
Esempio n. 9
0
        public override void OnInitInstance()
        {
            base.OnInitInstance();
            TarPane = Pane.GetPane("GuiViewMain");

            Box            = (TextBox)GetControl("textBoxTime");
            BgColor        = Box.BackColor;
            Box.GotFocus  += Box_GotFocus;
            Box.KeyDown   += Box_KeyDown;
            Box.Validated += Box_Validated;

            ClickJump = (Label)GetControl("LabelTalkBarTime");
            if (ClickJump != null)
            {
                ClickJump.Click += ClickJump_Click;
            }

            Timer.AddTrigger(500, UpdateBoxValue);
        }
Esempio n. 10
0
 /// <summary>
 /// 初期化
 /// </summary>
 public override void OnInitInstance()
 {
     base.OnInitInstance();
     _tarPane = Pane.GetPane("Resource");
 }
Esempio n. 11
0
 public override void OnInitInstance()
 {
     base.OnInitInstance();
     TarPane = Pane.GetPane("GuiViewMain");
 }
Esempio n. 12
0
 public override void OnInitInstance()
 {
     _tarRps = new IRichPane[] { Pane.GetPane("Resource") };
 }
Esempio n. 13
0
 /// <summary>
 /// 初期化
 /// </summary>
 public override void OnInitInstance()
 {
     base.OnInitInstance();
     _pos     = (PartsPositionManager)Share.Get("MovingParts", typeof(PartsPositionManager)); // 移動中のパーツ一覧
     _tarPane = Pane.GetPane("Resource");
 }