コード例 #1
0
ファイル: CntP_Playfield.cs プロジェクト: wshanshan/DDD
        public void AssetSelectionChanged(string asset_id)
        {
            switch (Mode)
            {
                case ContentPanelMode.Preview:
                case ContentPanelMode.Timeline:
                    if (asset_id != _current_asset)
                    {
                        if (_timeline.ContainsKey(_current_asset))
                        {
                            _timeline[_current_asset].CtlTimeline.Hide();
                        }
                        _current_asset = asset_id;

                        SelectAssetInstanceDataStruct d = new SelectAssetInstanceDataStruct();
                        d.ID = _current_asset;
                        Notify(d);

                        if (_timeline.ContainsKey(_current_asset))
                        {
                            _timeline[_current_asset].CtlTimeline.Show();
                        }
                        else
                        {
                            _timeline.Add(_current_asset, new AssetTimelines(new TimelinePanel(), new Dictionary<string, Node>()));
                            _timeline[_current_asset].CtlTimeline.ContentPane = this;
                            if (_current_asset == string.Empty)
                            {
                                _timeline[_current_asset].CtlTimeline.HeaderText = "Global Events";
                            }
                            else
                            {
                                _timeline[_current_asset].CtlTimeline.HeaderText = _current_asset + " Events";
                            }
                            _timeline[_current_asset].CtlTimeline.Parent = splitContainer1.Panel2;
                            _timeline[_current_asset].CtlTimeline.Dock = DockStyle.Fill;
                            _timeline[_current_asset].CtlTimeline.Show();
                        }
                    }
                    break;
                case ContentPanelMode.Playfield:
                    break;
            }
        }
コード例 #2
0
ファイル: View_Playfield.cs プロジェクト: wshanshan/DDD
 public object Clone()
 {
     SelectAssetInstanceDataStruct obj = new SelectAssetInstanceDataStruct();
     obj.ID = ID;
     return obj;
 }