public Window2(MainWindow mw) { main = mw; InitializeComponent(); Title = "Notes on " + System.IO.Path.GetFileNameWithoutExtension(main.noteFilePath); StreamReader noteFile = new StreamReader(new FileStream(main.noteFilePath, FileMode.OpenOrCreate, FileAccess.Read), Encoding.ASCII); Notes.Text = noteFile.ReadToEnd(); noteFile.Close(); }
public Window1(MainWindow main) { this.main = main; InitializeComponent(); Title = "BDF file information " + main.headerFileName; FileInfo.Text = (main.updateFlag ? "***** This dataset has already been edited for artifacts *****" : "") + Environment.NewLine + main.bdf.ToString().Trim(); SelChan.Text = CCIUtilities.Utilities.intListToString(main.EEGChannels, true); IEnumerable<string> montageFiles = Directory.EnumerateFiles("Montage"); foreach (string montageFile in montageFiles) Montage.Items.Add(System.IO.Path.GetFileNameWithoutExtension(montageFile)); }
public ChannelCanvas(MainWindow containingWindow, int channelNumber) : base() { _channel = channelNumber; this.Width = containingWindow.BDFLength; //NOTE: x-scale in seconds offScaleRegions.Width = containingWindow.BDFLength; bdf = containingWindow.bdf; _channelLabel = new TextBlock(new Run(bdf.channelLabel(_channel))); this.VerticalAlignment = VerticalAlignment.Top; this.HorizontalAlignment = HorizontalAlignment.Stretch; this.ToolTip = bdf.channelLabel(_channel) + "(" + (_channel + 1).ToString("0") + ")"; path.Stroke = Brushes.Black; path.StrokeLineJoin = PenLineJoin.Round; path.Data = geometry; Panel.SetZIndex(path, 0); this.Children.Add(path); baseline.X1 = 0; baseline.X2 = 3000; //should be plenty long enough!!! baseline.VerticalAlignment = VerticalAlignment.Center; baseline.Stroke = Brushes.LightBlue; }