Ejemplo n.º 1
0
 public MainForm()
 {
     InitializeComponent();
     _canvasController = IocContainer.GetInstance<ICanvasController>();
     OnUpdateSelection();
     _canvasController.UpdateSelection = OnUpdateSelection;
 }
Ejemplo n.º 2
0
 public Canvas(ICanvasController controller)
 {
     _controller = controller;
     InitializeComponent();
     this.AllowDrop = true;
     this.Control = new ControlInstance(this);
     this.ControlInstances = new List<ControlInstance>();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor for the tampa controller
        /// </summary>
        public TampaController()
        {
            // Enable theming for the application
            Application.EnableVisualStyles();

            // Use GDI to draw the text instead of GDI+- makes the text look better
            Application.SetCompatibleTextRenderingDefault(false);

            // Create the main view and the child window controllers
            _tampaMainWindow = new TampaWindow(this as ITampaController);
            _paletteController = new PaletteController((ToolStrip) _tampaMainWindow.Controls["toolStrip1"]);
            _canvasController = new CanvasController();
            _propertyDialogController = new PropertyDialogController();
        }
Ejemplo n.º 4
0
 void Create(ICanvasController canvasController)
 {
     _canvasController = canvasController;
     transform.SetParent(_canvasController.Canvas.transform, false);
 }
Ejemplo n.º 5
0
 public void CloseCanvas()
 {
     _canvasController.Close();
     _tampaMainWindow.CanvasClosed();
     _canvasController = null;
 }
Ejemplo n.º 6
0
        public void NewCanvas(string fileName)
        {
            CloseCanvas();
            _canvasController = new CanvasController();

            if (fileName != null)
            {
                XmlDocument document = new XmlDocument();
                document.Load(fileName);
                _canvasController.SetCanvasXml(document);
            }

            _canvasController.Show(_tampaMainWindow);
        }