예제 #1
0
 public void OnViewportAnimEditChanged(ViewportInfo vi)
 {
     if (ViewportAnimEditChanged != null)
     {
         ViewportAnimEditChanged(vi);
     }
 }
예제 #2
0
        public ViewportInfo(ViewportInfo info)
            : base(info)
        {
            ParentSceneInfo      = info.ParentSceneInfo;
            IsSelected           = false;
            TimeLength           = info.TimeLength;
            CurTimeTick          = info.CurTimeTick;
            IsVisible            = info.IsVisible;
            IsMaximized          = info.IsMaximized;
            IsFullscreenMode     = info.IsFullscreenMode;
            Name                 = ToString();
            SwitchMode           = info.SwitchMode;
            SwitchHotKey         = info.SwitchHotKey;
            ViewScale            = info.ViewScale;
            ElementsCaptionColor = info.ElementsCaptionColor;
            ElementsCaptionScale = info.ElementsCaptionScale;
            ElemGroupCollector   = new ElementGroupCollector(this);

            for (int i = 0; i < info.Elements.Count; ++i)
            {
                if (i == 0 && info.Elements[i] == null)
                {
                    Elements.Add(null);
                }
                else
                {
                    AddElement(ElementInfo.CreateElement(info.Elements[i]));
                }
            }

            for (int i = 0; i < 4; ++i)
            {
                m_vFrameRc[i] = info.m_vFrameRc[i];
            }
        }
예제 #3
0
 public SceneInfo(TaskInfo task, string name)
 {
     ParentTaskInfo = task;
     Name           = name;
     for (int i = 0; i < 4; ++i)
     {
         Viewports[i] = new ViewportInfo(this);
     }
     OnInit();
 }
예제 #4
0
 public SceneInfo(TaskInfo task, XmlElement root)
 {
     ParentTaskInfo = task;
     Name           = root.GetAttribute("Name");
     for (int i = 0; i < 4; ++i)
     {
         var lst = root.GetElementsByTagName("Viewport");
         Viewports[i] = new ViewportInfo(this);
         Viewports[i].LoadFromXmlElement(lst[i] as XmlElement);
     }
     OnInit();
 }
예제 #5
0
 private ProjectDoc()
 {
     foreach (ResourceKind rp in Enum.GetValues(typeof(ResourceKind)))
     {
         ResourceGroups[rp] = new ResourceGroup(rp);
     }
     CurEditUserID                   = 0;
     IsCooperatingEditMode           = false;
     ResolutionRatio                 = new System.Drawing.Size(100, 100);
     PreviewViewport                 = new ViewportInfo(null as SceneInfo);
     FModPlayer                      = new SoundPlayer_FMOD();
     HideSelectionOnPlayingAnimation = false;
     DefaultCubicCurveRibbonColor    = Color.OrangeRed;
     DefaultCubicCurveRibbonWidth    = 6;
 }
예제 #6
0
 public SceneInfo(SceneInfo sinfo)
 {
     ParentTaskInfo = null;
     Name           = sinfo.Name;
     for (int i = 0; i < 4; ++i)
     {
         ViewportInfo vi = new ViewportInfo(sinfo.Viewports[i]);
         vi.ParentSceneInfo        = this;
         Viewports[vi.ScreenIndex] = vi;
     }
     for (int i = 0; i < m_vViewCutLinePts.Length; ++i)
     {
         m_vViewCutLinePts[i] = sinfo.m_vViewCutLinePts[i];
     }
     OnResolutionChanged(ProjectDoc.Instance.ResolutionRatio);
 }
예제 #7
0
        private void StatisticsOrderViewports(ViewportInfo vi)
        {
            if (vi == null)
            {
                return;
            }
            if (vi.IsVisible)
            {
                m_ViewportsInOrder.Add(vi);
            }
            var si = vi.ParentSceneInfo;

            if (si == null)
            {
                return;
            }
            var ti = si.ParentTaskInfo;

            if (ti == null)
            {
                return;
            }
            var pi = ti.ParentProjectInfo;

            if (pi == null)
            {
                return;
            }

            int vIndex = vi.ScreenIndex + 1;

            if (vIndex < si.Viewports.Length)
            {
                //if (AutoNextView)
                StatisticsOrderViewports(si.Viewports[vIndex]);
            }
            else// if (AutoNextScene)
            {
                int sIndex = ti.SceneInfos.IndexOf(si) + 1;
                if (sIndex < ti.SceneInfos.Count)
                {
                    si = ti.SceneInfos[sIndex];
                    StatisticsOrderViewports(si.Viewports[0]);
                }
                else// if (AutoNextTask)
                {
                    do
                    {
                        int tIndex = pi.TaskInfos.IndexOf(ti) + 1;
                        if (tIndex >= pi.TaskInfos.Count)
                        {
                            ti = null;
                            break;
                        }
                        ti = pi.TaskInfos[tIndex];
                    } while (ti.SceneInfos.Count == 0);
                    if (ti != null)
                    {
                        si = ti.SceneInfos[0];
                        StatisticsOrderViewports(si.Viewports[0]);
                    }
                }
            }
        }