Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("--- Command Pattern ---");
            StockTradeClient stc = new StockTradeClient();

            stc.Run();

            Console.WriteLine("\n--- Composite Pattern ---");
            GraphicsEditor ge = new GraphicsEditor();

            ge.Run();

            Console.WriteLine("\n--- Decorator Pattern ---");
            GUIDriver gd = new GUIDriver();

            gd.Run();

            Console.WriteLine("\n--- Factory Pattern ---");
            DocClient dc = new DocClient();

            dc.Run();

            Console.WriteLine("\n--- Mediator Pattern ---");
            ChatClient cc = new ChatClient();

            cc.Run();

            Console.WriteLine("\n--- Observer Pattern ---");
            NewsClient nc = new NewsClient();

            nc.Run();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public RBuilderDocument(IApplicationData data) : base(data)
        {
            Editor = new ViewerInterop.ViewerEditor();
            Tree   = new TreeData(Data, this);

            data.Eventaggregator.GetEvent <OnContextCreatedEvent>().Subscribe(OnContextCreated);

            _modelerCommands = new ModelingCommands(data, GraphicsEditor.GetModelingManager());
            _lightCommands   = new LightCommands(data, GraphicsEditor.GetLightsManager());
        }
Ejemplo n.º 3
0
 private void TranslateCommandhandler(RRibbonToggleButton ribbonToggleButton)
 {
     if (ribbonToggleButton.IsChecked == true)
     {
         GraphicsEditor.SetDraggerState(DraggerType.TranslateAxisDragger, true);
     }
     else
     {
         GraphicsEditor.SetDraggerState(DraggerType.TranslateAxisDragger, false);
     }
 }
Ejemplo n.º 4
0
 private void ScaleCommandhandler(RRibbonToggleButton ribbonToggleButton)
 {
     if (ribbonToggleButton.IsChecked == true)
     {
         GraphicsEditor.SetDraggerState(DraggerType.TabBoxTrackballDragger, true);
     }
     else
     {
         GraphicsEditor.SetDraggerState(DraggerType.TabBoxTrackballDragger, false);
     }
 }
Ejemplo n.º 5
0
        public IEditableFrame Capture()
        {
            // Update Location
            _region.Location = _locationFunc();

            Gdi32.BitBlt(_hdcDest, 0, 0, _region.Width, _region.Height,
                         _hdcSrc, _region.X, _region.Y,
                         (int)CopyPixelOperation.SourceCopy);

            var img = new GraphicsEditor(Image.FromHbitmap(_hBitmap));

            if (_includeCursor)
            {
                MouseCursor.Draw(img, _transform);
            }

            return(img);
        }
Ejemplo n.º 6
0
        public IEditableFrame Capture()
        {
            try
            {
                OnCapture();

                var img = new GraphicsEditor(Image.FromHbitmap(_hBitmap));

                if (_includeCursor)
                {
                    MouseCursor.Draw(img, _transform);
                }

                return(img);
            }
            catch (Exception e) when(!(e is WindowClosedException))
            {
                return(RepeatFrame.Instance);
            }
        }
        //Open graphics settings editor
        private void openGraphicsSettings_Click(object sender, EventArgs e)
        {
            GraphicsEditor openGraphicsEditor = new GraphicsEditor();

            openGraphicsEditor.Show();
        }
Ejemplo n.º 8
0
 public IRLightManager GetLightsManager()
 {
     return(GraphicsEditor.GetLightsManager());
 }
Ejemplo n.º 9
0
 public void SetSelectiontype(SelectionType type)
 {
     GraphicsEditor.SetSelectionType(type);
 }
Ejemplo n.º 10
0
 public IRMaterialManager GetMaterialManager()
 {
     return(GraphicsEditor.GetMaterialManager());
 }
Ejemplo n.º 11
0
 public IRModelingManager GetModelingManager()
 {
     return(GraphicsEditor.GetModelingManager());
 }