Example #1
0
 public Editing3dRot(Editing3d editing3d)
 {
     this.editing3d = editing3d;
     selectionmodel = SelectionModel.GetInstance();
     camera         = Camera.GetInstance();
     graphics       = GraphicsHelperFactory.GetInstance();
 }
 public UIEntityPropertiesDialog()
 {
     selectionmodel = SelectionModel.GetInstance();
     ContextMenuController.GetInstance().ContextMenuPopup += new ContextMenuHandler(_ContextMenuPopup);
     ViewerState.GetInstance().StateChanged += new ViewerState.StateChangedHandler(UIEntityPropertiesDialog_StateChanged);
     //    SetFormSize();
     //KeyNameCache.GetInstance().KeyDown += new KeyNameCache.KeyDownHandler( UIEntityPropertiesDialog_KeyDown );
 }
Example #3
0
        public Editing3dScale( Editing3d editing3d )
        {
            this.editing3d = editing3d;

            camera = Camera.GetInstance();
            graphics = GraphicsHelperFactory.GetInstance();
            selectionmodel = SelectionModel.GetInstance();
        }
 public UIEntityPropertiesDialog()
 {
     selectionmodel = SelectionModel.GetInstance();
     ContextMenuController.GetInstance().ContextMenuPopup += new ContextMenuHandler(_ContextMenuPopup);
     ViewerState.GetInstance().StateChanged += new ViewerState.StateChangedHandler(UIEntityPropertiesDialog_StateChanged);
     //    SetFormSize();
     //KeyNameCache.GetInstance().KeyDown += new KeyNameCache.KeyDownHandler( UIEntityPropertiesDialog_KeyDown );
 }
        public SelectionController()
        {
            selectionmodel = SelectionModel.GetInstance();

            //KeyFilterComboKeys keyfiltercombokeys = KeyFilterComboKeys.GetInstance();
            CommandCombos.GetInstance().RegisterAtLeastCommand("selectobject",
                                                               new KeyCommandHandler(SelectObjectKeyDown));
            CommandCombos.GetInstance().RegisterAtLeastCommand("selectindividual",
                                                               new KeyCommandHandler(SelectIndividualKeyDown));

            //keyfiltercombokeys.RegisterCombo( new string[]{"selectobject"},null, new KeyComboHandler( SelectObjectKeyDown ) );
            //keyfiltercombokeys.RegisterCombo( new string[]{"selectindividual"},null, new KeyComboHandler( SelectIndividualKeyDown ) );
        }
        public SelectionController()
        {
            selectionmodel = SelectionModel.GetInstance();

            //KeyFilterComboKeys keyfiltercombokeys = KeyFilterComboKeys.GetInstance();
            CommandCombos.GetInstance().RegisterAtLeastCommand("selectobject",
                new KeyCommandHandler(SelectObjectKeyDown));
            CommandCombos.GetInstance().RegisterAtLeastCommand("selectindividual",
                new KeyCommandHandler(SelectIndividualKeyDown));

            //keyfiltercombokeys.RegisterCombo( new string[]{"selectobject"},null, new KeyComboHandler( SelectObjectKeyDown ) );
            //keyfiltercombokeys.RegisterCombo( new string[]{"selectindividual"},null, new KeyComboHandler( SelectIndividualKeyDown ) );
        }
Example #7
0
        public Editing3d()
        {
            selectionmodel        = SelectionModel.GetInstance();
            mousefiltermousecache = MouseCache.GetInstance();

            CommandCombos.GetInstance().RegisterCommandGroup(
                new string[] { CMD_EDITPOSITION, CMD_EDITSCALE, CMD_EDITROTATION }, new KeyCommandHandler(EditModeKeyEvent));

            CommandCombos.GetInstance().RegisterAtLeastCommand(
                "leftmousebutton", new KeyCommandHandler(MouseDown));

            mousefiltermousecache.MouseMove += new MouseMoveHandler(MouseMove);

            editing3dpos   = new Editing3dPos(this);
            editing3drot   = new Editing3dRot(this);
            editing3dscale = new Editing3dScale(this);

            RendererFactory.GetInstance().WriteNextFrameEvent += new WriteNextFrameCallback(Editing3d_WriteNextFrameEvent);
        }
Example #8
0
        public void ConnectToServer(string ipaddressstring, int port)
        {
            IPAddress[] addresses = System.Net.Dns.GetHostAddresses(ipaddressstring);
            if (addresses.GetLength(0) == 0)
            {
                return;
            }
            IPAddress ipaddress = addresses[0];

            LogFile.WriteLine("Resolved server address to : " + ipaddressstring);

            try
            {
                network.ConnectAsClient(ipaddress.ToString(), port);
            }
            catch (Exception e)
            {
                DialogHelpers.ShowErrorMessageModal(null, "Failed to connect to server");
                LogFile.WriteLine(e.ToString());
            }

            SelectionModel.GetInstance().Clear();
            worldstorage.Clear();
        }