예제 #1
0
파일: PIM_Class.cs 프로젝트: mff-uk/xcase
        void Derive_Click(object sender, RoutedEventArgs e)
        {
            ContextMenuDiagramItem m = sender as ContextMenuDiagramItem;

            if (m.Diagram == null)
            {
                ClassController.DerivePSMClassToNewDiagram();
            }
            else
            {
                ClassController.DerivePSMClassToDiagram(m.Diagram as PSMDiagram);
            }
        }
예제 #2
0
파일: PIM_Class.cs 프로젝트: mff-uk/xcase
        void mDerive_ContextMenuOpening(object sender, ContextMenuEventArgs e)
        {
            ContextMenuDiagramItem m;

            mDerive.Items.Clear();
            foreach (PSMDiagram d in Controller.DiagramController.Project.PSMDiagrams)
            {
                m        = new ContextMenuDiagramItem(d.Caption, d);
                m.Click += new RoutedEventHandler(Derive_Click);
                mDerive.Items.Add(m);
            }
            if (Controller.DiagramController.Project.PSMDiagrams.Count > 0)
            {
                mDerive.Items.Add(new Separator());
            }

            m        = new ContextMenuDiagramItem("New PSM diagram", null);
            m.Icon   = ContextMenuIcon.GetContextIcon("page_white");
            m.Click += new RoutedEventHandler(Derive_Click);
            mDerive.Items.Add(m);
        }