Ejemplo n.º 1
0
 public ApplicationMutation(IApplicationLogic applicationLogic)
 {
     FieldAsync <BooleanGraphType>(
         "addApplication",
         arguments: new QueryArguments(new QueryArgument <ApplicationInputType>
     {
         Name = "app"
     }),
         resolve: async context => { return(await applicationLogic.Insert(context.GetArgument <Application>("app"))); }
         );
     FieldAsync <BooleanGraphType>(
         "editApplication",
         arguments: new QueryArguments(new QueryArgument <ApplicationInputType>
     {
         Name = "app"
     }),
         resolve: async context => { return(await applicationLogic.Update(context.GetArgument <Application>("app"))); }
         );
     FieldAsync <BooleanGraphType>(
         "deleteApplication",
         arguments: new QueryArguments(new QueryArgument <ApplicationInputType>
     {
         Name = "app"
     }),
         resolve: async context => { return(await applicationLogic.Delete(context.GetArgument <Application>("app"))); }
         );
 }
Ejemplo n.º 2
0
        public static void Run(IApplicationLogic logic, ApplicationSettings settings)
        {
            if (m_currentApplication == null)
            {
                if (logic == null)
                {
                    throw new ArgumentException("logic");
                }
                if (settings == null)
                {
                    throw new ArgumentException("settings");
                }

                try
                {
                    using (m_currentApplication = new Application(logic, settings))
                    {
                        m_currentApplication.Run();
                    }
                }
                finally
                {
                    m_currentApplication = null;
                }
            }
        }
Ejemplo n.º 3
0
 public DeviceCommunication(IApplicationLogic applicationLogicIn, ILogger loggerIn, IChromeCastMessages chromeCastMessagesIn)
 {
     applicationLogic      = applicationLogicIn;
     logger                = loggerIn;
     chromeCastMessages    = chromeCastMessagesIn;
     chromeCastDestination = string.Empty;
     chromeCastSource      = string.Format("client-8{0}", new Random().Next(10000, 99999));
     requestId             = 0;
 }
Ejemplo n.º 4
0
 public ProjectType(IApplicationLogic applicationLogic, IProjectProposalLogic projectProposalLogic)
 {
     Field(x => x.ProjectID);
     Field(x => x.AdoptionDate);
     Field(x => x.Note);
     Field(x => x.Description);
     //Field<EmployeeType>("internalMentor", resolve: context => { return employeeLogic.GetByID(context.Source.InternalMentor.EmployeeID); });
     //Field<EmployeeType>("decisionMaker", resolve: context => { return employeeLogic.GetByID(context.Source.DecisionMaker.EmployeeID); });
     FieldAsync <ProjectProposalType>("projectProposal", resolve: async context => { return(await projectProposalLogic.GetByProjectId(context.Source.ProjectID)); });
     FieldAsync <ListGraphType <ApplicationType> >("applications", resolve: async context => { return(await applicationLogic.GetAllForProject(context.Source.ProjectID)); });
 }
Ejemplo n.º 5
0
        public MainForm(IApplicationLogic applicationLogicIn, IDevices devicesIn, ILogger loggerIn)
        {
            InitializeComponent();

            applicationLogic = applicationLogicIn;
            devices          = devicesIn;
            logger           = loggerIn;
            logger.SetCallback(Log);
            devices.SetDependencies(this, applicationLogic);
            applicationLogic.SetDependencies(this);
        }
        public MainForm(IApplicationLogic applicationLogicIn, IDevices devicesIn, ILoopbackRecorder loopbackRecorderIn, ILogger loggerIn)
        {
            InitializeComponent();

            ApplyLocalization();
            loopbackRecorder = loopbackRecorderIn;
            applicationLogic = applicationLogicIn;
            devices          = devicesIn;
            logger           = loggerIn;
            logger.SetCallback(Log);
            devices.SetDependencies(this, applicationLogic);
            applicationLogic.SetDependencies(this);
            wavGenerator = new WavGenerator();
        }
Ejemplo n.º 7
0
        // コンストラクタ
        public MainWindow()
        {
            var drawArea = this.ClientSize;
            drawArea.Width -= 45;
            m_JimakuRenderer = new JimakuRenderer(this.ClientSize);

            m_ApplicationLogic = new ApplicationLogic();
            m_ApplicationLogic.Attach(this);

            m_SoundEffect = new SoundPlayer();
            m_SoundEffect = new SoundPlayer(@"C:\Tools\nicocast108\newnico.wav");

            InitializeComponent(); // 画面のDPIによっては Resize とか Paint を飛ばしてくるので最後。
        }
Ejemplo n.º 8
0
        public PluginOperationController(IEnumerable <IPluginView> plugins, IApplicationLogic applicationLogic)
        {
            this.plugins          = new SortedDictionary <string, Type>();
            this.applicationLogic = applicationLogic;

            foreach (IPluginView plugin in plugins)
            {
                this.plugins.Add(plugin.DisplayName, plugin.GetType());
                ////pluginOperationView.AddPlugin(plugin.RawPluginModel.DisplayName);
            }

            ////pluginOperationView.AddPlugin(PluginOperationController.closePluginName);

            ////pluginOperationView.PluginCreate += this.PluginCreate;
        }
Ejemplo n.º 9
0
 public Application(IApplicationLogic logic, ApplicationSettings settings)
 {
     m_keys = new bool[0xFF];
     m_thread = Thread.CurrentThread;
     m_actions = new Queue<Action>();
     m_logic = logic;
     m_display = new Display(this, WindowProc, settings.DisplayStyle);
     GL.Initialize(
         m_display,
         settings.DisplayColorBits,
         settings.DisplayDepthBits,
         settings.Debug
     );
     GL.SwapInterval(settings.VerticalSynchronization ? 1 : 0);
     m_synchronizationContext = new ApplicationSynchronizationContext(m_display.Handle);
     m_stopwatch = new Stopwatch();
 }
Ejemplo n.º 10
0
 public Application(IApplicationLogic logic, ApplicationSettings settings)
 {
     m_keys           = new bool[0xFF];
     m_pressedButtons = new HashSet <MouseButton>();
     m_thread         = Thread.CurrentThread;
     m_actions        = new Queue <Action>();
     m_logic          = logic;
     m_display        = new Display(this, WindowProc, settings.DisplayStyle);
     GL.Initialize(
         m_display,
         settings.DisplayColorBits,
         settings.DisplayDepthBits,
         settings.Debug
         );
     GL.SwapInterval(settings.VerticalSynchronization ? 1 : 0);
     m_synchronizationContext = new ApplicationSynchronizationContext(m_display.Handle);
     m_stopwatch = new Stopwatch();
 }
Ejemplo n.º 11
0
 public ApplicationQuery(IApplicationLogic applicationLogic)
 {
     FieldAsync <ApplicationType>(
         "applicationByIds",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectId"
     }, new QueryArgument <IntGraphType>
     {
         Name = "studentId"
     }),
         resolve: async context => { return(await applicationLogic.GetById(context.GetArgument <long>("projectId"), context.GetArgument <int>("studentId"))); }
         );
     FieldAsync <ListGraphType <ApplicationType> >(
         "applicationsByProject",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectId"
     }),
         resolve: async context => { return(await applicationLogic.GetAllForProject(context.GetArgument <long>("projectId"))); }
         );
     FieldAsync <ListGraphType <ApplicationType> >(
         "applicationsByProjectAccepted",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectId"
     }),
         resolve: async context => { return(await applicationLogic.GetAllForProjectAccepted(context.GetArgument <long>("projectId"))); }
         );
     FieldAsync <ListGraphType <ApplicationType> >(
         "applicationsByCriteria",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectId"
     }, new QueryArgument <StringGraphType>
     {
         Name = "criteria"
     }),
         resolve: async context => { return(await applicationLogic.GetByCriteriaForProject(context.GetArgument <long>("projectId"), context.GetArgument <string>("criteria"))); }
         );
 }
Ejemplo n.º 12
0
 public ApplicationController(IApplicationLogic applicationLogic, IApplicationWorkflowLogic applicationWorkflowLogic)
 {
     _applicationLogic         = applicationLogic;
     _applicationWorkflowLogic = applicationWorkflowLogic;
 }
Ejemplo n.º 13
0
 private void Initialize( IApplicationInfo programInfo )
 {
     if ( programInfo is IToolInfo )
     {
         this._programLogic = new ToolLogic( programInfo );
     }
     else
     {
         this._programLogic = new GameLogic( programInfo );
     }
 }
 public void SetDependencies(MainForm mainFormIn, IApplicationLogic applicationLogicIn)
 {
     mainForm         = mainFormIn;
     applicationLogic = applicationLogicIn;
 }
Ejemplo n.º 15
0
        public MainWindow(FileOperationController fileOperationController, PluginOperationController pluginOperationController, ImageManagerView imageManagerView, PluginManagerView pluginManagerView, AboutBoxView aboutBoxView, IApplicationLogic applicationLogic)
        {
            this.fileOperationController   = fileOperationController;
            this.pluginOperationController = pluginOperationController;
            this.imageManagerView          = imageManagerView;
            this.pluginManagerView         = pluginManagerView;
            this.aboutBoxView     = aboutBoxView;
            this.applicationLogic = applicationLogic as ApplicationLogic;
            this.InitializeComponent();

            this.mainSplitContainer.Panel1.Controls.Add(this.imageManagerView);
            this.mainSplitContainer.Panel2.Controls.Add(this.pluginManagerView);

            this.InitializePlugins();
        }
Ejemplo n.º 16
0
 public HomeController(IApplicationLogic applicationLogic)
 {
     _applicationLogic = applicationLogic;
 }
Ejemplo n.º 17
0
        public static void Run(IApplicationLogic logic, ApplicationSettings settings)
        {
            if (m_currentApplication == null)
            {
                if (logic == null) throw new ArgumentException("logic");
                if (settings == null) throw new ArgumentException("settings");

                try
                {
                    using (m_currentApplication = new Application(logic, settings))
                    {
                        m_currentApplication.Run();
                    }
                }
                finally
                {
                    m_currentApplication = null;
                }
            }
        }
 //private readonly IMapper _mapper;
 public ApplicationController(IApplicationLogic logic)
 {
     _logic = logic;
     //_mapper = mapper;
 }
Ejemplo n.º 19
0
 public FileOperationController(FileOperationService fileOperationService, IApplicationLogic applicationLogic)
 {
     this.fileOperationService = fileOperationService;
     this.applicationLogic     = applicationLogic;
 }
 protected StrategyBase(String name, IBusinessLogic businessLogic, IApplicationLogic applicationLogic)
 {
     this.Name         = name;
     _businessLogic    = businessLogic;
     _applicationLogic = applicationLogic;
 }
Ejemplo n.º 21
0
 public ApplicationController(IApplicationLogic logic) : base(logic)
 {
 }
Ejemplo n.º 22
0
 public HomeController(IApplicationLogic applicationLogic)
 {
     _applicationLogic = applicationLogic;
 }
Ejemplo n.º 23
0
 public ApplicationController(IApplicationLogic logic, IMapper mapper)
 {
     _logic  = logic;
     _mapper = mapper;
 }