public BarcodeDefinition(Stage stage, BaseHost host) : base(stage, host) { InitializeComponent(); dataGridView.CellPainting += dataGridView_CellPainting; this.DataContext = this; }
public BarcodeDefForm(Stage stage, BaseHost host) : base(stage, host) { InitializeComponent(); InitDataGridView(); dataGridView.CellValueChanged += dataGridView_CellValueChanged; this.Loaded += BarcodeDefForm_Loaded; }
public StepMonitorForm(Stage stage, BaseHost host) : base(stage, host) { log.Info("StepMonitorForm"); logForm = new LogForm(); logForm.Visible = false; timer.Interval = 1000; timer.Elapsed += timer_Elapsed; timeNeeded = CalculateTimeNeeded(); InitializeComponent(); }
/// <summary> /// 所有服务控制中心 /// </summary> public static void Init() { //基础服务 BaseHost.Init(false); //特巡报告服务 ReportHost.Init(false); //用户信息服务 UserHost.Init(false); //Web管理后台特巡报告服务 PatrolHost.Init(false); }
public void should_use_all_the_available_plugins() { using (var baseHost = new BaseHost()) { baseHost.LoadPlugins(); var result = baseHost.SomeOperation(); result.Should().Contain("plugin1 + string provided by base"); result.Should().Contain("plugin2"); } }
public MainWindowViewModel(INotificationBox notificationBoxProvider) { var baseHost = new BaseHost(); // ReSharper disable LocalizableElement baseHost.ApplicationName = @"Agent"; // ReSharper restore LocalizableElement LogManager.ConfigureLogging(baseHost); this.notificationBoxProvider = notificationBoxProvider; this.Title = "AgentApplicationTitle"; ///Resources.AgentApplicationTitle; // this.serverViewViewModel = new ServerViewControlViewModel(notificationBoxProvider); }
public MainWindowViewModel(INotificationBox notificationBoxProvider) { var baseHost = new BaseHost(); // ReSharper disable LocalizableElement baseHost.ApplicationName = @"Agent"; this.IconSource = ServerViewControlViewModel.GreenIcon; this.host = new AgentHost(); this.ServiceDataReceiver = new ServiceDataReceiver(); // ReSharper restore LocalizableElement LogManager.ConfigureLogging(baseHost); this.notificationBoxProvider = notificationBoxProvider; this.Title = Resources.AgentApplicationTitle; this.serverViewViewModel = new ServerViewControlViewModel(notificationBoxProvider, this); }
public ProtocolSelection(Stage stage, BaseHost host) : base(stage, host) { InitializeComponent(); var wholePaths = EnumScripts(); foreach (string s in wholePaths) { FileInfo fileInfo = new FileInfo(s); allScripts.Add(fileInfo.Name.Replace(".esc", "")); } lstAssay.ItemsSource = ReadAssays(); lstAssay.SelectedIndex = 0; chkOneStep.Click += chkOneStep_Click; chkMag.Click += chkMag_Click; //lstProtocols.ItemsSource = allScripts; //lstProtocols.SelectionChanged += lstProtocols_SelectionChanged; //lstProtocols.SelectedIndex = 0; OnProtocolChanged(); }
/// <summary> /// 根据模板生成代码 /// </summary> /// <param name="templateFilePath">模板文件路径</param> /// <param name="outputPath">输出路径</param> /// <param name="logAction">日志记录函数</param> public static void ProcessTemplate(string templateFilePath, string outputPath = null, Action <string> logAction = null) { var host = new BaseHost() { TemplateFile = templateFilePath }; var input = File.ReadAllText(templateFilePath); var output = Engine.ProcessTemplate(input, host); if (string.IsNullOrWhiteSpace(outputPath)) { outputPath = Path.Combine(Path.GetDirectoryName(templateFilePath), Path.GetFileNameWithoutExtension(templateFilePath) + host.FileExtension); } File.WriteAllText(outputPath, output, host.FileEncoding); if (logAction == null) { return; } foreach (CompilerError error in host.Errors) { logAction(error.ToString()); } }
public LayoutForm(Stage stage, BaseHost host) : base(stage, host) { InitializeComponent(); this.Loaded += Protocol_Loaded; }
public void BeginReconnect() { BaseHost.BeginReconnect(this); }
public StepMonitor(Stage stage, BaseHost host) : base(stage, host) { InitializeComponent(); EVOController.Instance.onCloseSucceed += Instance_onCloseSucceed; EVOController.Instance.onStartFinished += Instance_onStartFinished; }
public void BeginSendTo(ISocketConnection connection, byte[] buffer) { BaseHost.BeginSendTo((BaseSocketConnection)connection, buffer); }
public void BeginSendToAll(byte[] buffer, bool includeMe) { BaseHost.BeginSendToAll(this, buffer, includeMe); }