public FrmTester() { InitializeComponent(); log = new TextBoxStreamWriter(txtConsole); modules = new Dictionary <string, ConnectionManager>(); autoResponders = new List <AutoResponder>(); prompters = new List <Prompter>(); dataReceived = new ProducerConsumer <ReceivedPacket>(100); receivedResponses = new List <Response>(); quickCommands = new List <QuickCommand>(); ValidateAddModuleButton(); ValidateAddAutoResponderButton(); ValidateAddPrompterButton(); ValidateStartPerformanceTest(); ValidateAddQuickCommandButton(); SelectModule(null); SelectResponder(null); SelectPrompter(null); SelectQuickCommand(null); dlgConsole = new StringEventHandler(Console); dlgMainThreadTask = new ThreadStart(MainThreadTask); dlgGetPromptDialog = new GetPromptDialogCaller(GetPromptDialog); dlgShowPromptDialog = new ShowPromptDialogCaller(ShowPromptDialog); stopwatch = new Stopwatch(); mainThread = new Thread(dlgMainThreadTask); mainThread.IsBackground = true; mainThread.Start(); }
private void InitializeLog() { TextBoxStreamWriter tsw; tsw = new TextBoxStreamWriter(txtLog, Application.ExecutablePath + ".log", 512); this.log = new LogWriter(tsw); }
public MoonboardTester() { InitializeComponent(); string relative = @"..\..\..\MoonServer\App_Data\"; string absolute = Path.GetFullPath(relative); AppDomain.CurrentDomain.SetData("DataDirectory", absolute); logStream = new TextBoxStreamWriter(LogTextBox); db = new MoonServerDB(); client = new MoonboardClient(db, logStream); }
/********************** * FORM EVENTS **********************/ private void BasicCad_Load(object sender, EventArgs e) { LMBControls.Renderer = new ToolStripButtonRenderer(); RMBControls.Renderer = new ToolStripButtonRenderer(); cadSystem = new CadSystem(new PointF(145, 24), this.Size, .25F, 96); ShapeSystem.setBaseColors( new Pen(Color.FromArgb(255, 20, 20, 20), 2), new Pen(Color.OrangeRed, 2)); AdjustSnapDistance.Value = (decimal)cadSystem.gridSystem.getGridIncrements(); _writer = new ConsoleRedirection.TextBoxStreamWriter(txt_Console); // Redirect the out Console stream Console.SetOut(_writer); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); treeView_Init(); }
public DebugConsole() { this.InitializeComponent(); this.allowVisibilityChange = false; #if DEBUG this.allowVisibilityChange = true; #endif this.Load += this.OnLoad; this.writer = new TextBoxStreamWriter(this); Console.SetOut(this.writer); Program.ConsoleCreated = true; }
private void Common_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { var vm = this.DataContext as LayoutViewModel; if (vm == null) { return; } Console.SetOut(_writer = Cns.Writer); _innerTarget = NavigationHelper.FindFrame("ContentFrame", this); vm.NavigationProvider.GoAction = delegate(NavigationEndpoint endpoint, UserContext context) { NavigationCommands.GoToPage.Execute(endpoint.Destination, _innerTarget); _innerTarget.DataContext = new LiveChartOhclDesignViewModel(); }; }
public MainWindow() { InitializeComponent(); //CreateModel(); //OxyPlotChartTime.Model = model1; openFileDialog = new OpenFileDialog(); // Instantiate the writer TextWriter _writer = new TextBoxStreamWriter(OutputTextbox); // Redirect the out Console stream Console.SetOut(_writer); Console.WriteLine("Now redirecting console output to the text box"); testsInProgress = false; //Initializing the Background Worker _backgroundWorker = new BackgroundWorker(); _backgroundWorker.WorkerSupportsCancellation = true; _backgroundWorker.DoWork += _backgroundWorker_DoWork; _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted; reportGenerator = new ReportGenerator(); reportGenerator.ResultsChange += reportGenerator_ResultsChange; }
public ServerGUI() { InitializeComponent(); TextWriter tw = new TextBoxStreamWriter(txtOutput); Console.SetOut(tw); Console.SetError(tw); server = ServerBase.CreateReflection(); Config config = Config.ReadFile(settingsFilename); if (config == null) { config = server.CreateDefaultConfig(); config.SaveToFile(settingsFilename); } server.Start(true, config); this.Text = server.Name; }
public ConsoleView() { InitializeComponent(); Writer = new TextBoxStreamWriter(Tb1, Tb1, Dispatcher); StartButton.Click += StartButton_Click; }