コード例 #1
0
        /// <summary>
        /// Attach behaviour to given connector
        /// </summary>
        /// <param name="connector">Attached connector</param>
        /// <param name="engine">Engine using attached behaviour</param>
        /// <param name="moveHandler">Handler used for move events</param>
        internal static void Attach(ConnectorDrawing connector, DisplayEngine engine, OnConnectorMove moveHandler)
        {
            var item = connector.OwningItem;

            UpdateGlobalPosition.WidthChange.AddValueChanged(item, (e, args) =>
            {
                moveHandler(connector);
            });

            UpdateGlobalPosition.HeightChange.AddValueChanged(item, (e, args) =>
            {
                moveHandler(connector);
            });
        }
コード例 #2
0
        static void Input()
        {
            var operation = -1;

            do
            {
                ShowMenu();
                operation = int.Parse(Console.ReadLine());
                switch (operation)
                {
                case 1:
                    DisplayCar d = new DisplayCar();
                    break;

                case 2:
                    DisplayEngine de = new DisplayEngine();
                    break;

                case 3:
                    DisplayCarPrice dcp = new DisplayCarPrice();
                    break;
                }
            } while (operation != closeOperationId);
        }
コード例 #3
0
 public ViewMainDepartments(CatalogTasks catalogTask,
                            DisplayEngine displayEngine)
 {
     catalog_tasks = catalogTask;
     display_engine = displayEngine;
 }
コード例 #4
0
 public ViewMainDepartments(DisplayEngine display_engine, CatalogTasks catalog_tasks)
 {
     this.display_engine = display_engine;
     this.catalog_tasks = catalog_tasks;
 }
コード例 #5
0
 public ViewMainDepartmentsCommand(DepartmentRegistry department_registry, DisplayEngine display_engine)
 {
     this.department_registry = department_registry;
     this.display_engine = display_engine;
 }
コード例 #6
0
ファイル: Program.cs プロジェクト: mike-daly/toolbox
 public ExtensionToEngineMap(String extension, DisplayEngine de = null)
 {
     this.fileExtension = extension;
     this.displayEngine = de;
 }