Example #1
0
 void CreateConnector(SystemViewModel start, SystemViewModel end)
 {
     System.AddConnector(start.System, end.System);
 }
 private void Diagram_Created(object sender, RoutedEventArgs e)
 {
     this.MouseLeftButtonDown += new MouseButtonEventHandler(Diagram_MouseLeftButtonDown);
     this.MouseLeftButtonUp += new MouseButtonEventHandler(DragFinishedMouseHandler);
     this.MouseMove += new MouseEventHandler(Diagram_MouseMove);
     this.MouseLeave += new MouseEventHandler(Diagram_MouseLeave);
     _context = DataContext as SystemViewModel;
 }
Example #3
0
 void DeleteSystem(SystemViewModel sys)
 {
     if (TreeVMs.Contains(sys))
        {
        TreeVMs.Remove(sys);
        TabVMs.Remove(sys);
        sys.Dispose();
        sys = null;
        }
        else
        {
        sys.Delete();
        }
 }
Example #4
0
 void OpenSystem()
 {
     string filename = FileManager.OpenFile(Resources.DefaultFilename, Resources.Extension, Resources.Filter);
        if (filename != null)
        {
        SystemViewModel sys = new SystemViewModel(new QuickArch.Model.System(filename));
        TreeVMs.Add(sys);
        TabVMs.Add(sys);
        }
 }
Example #5
0
 //overloaded method
 void CreateNewSystem(String title)
 {
     if (SelectedComponentVM != null && SelectedComponentVM is SystemViewModel)
        {
        ((SystemViewModel)SelectedComponentVM).AddSubsystem(title);
        }
        //for top level system
        else
        {
        SystemViewModel sys = new SystemViewModel(new QuickArch.Model.System(title, null));
        TreeVMs.Add(sys);
        }
 }