init
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
namespace DTS.Serialization
|
||||
{
|
||||
partial class BadCRCBypass
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtFileName = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cbRememberChoice = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Location = new System.Drawing.Point(201, 133);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOK.TabIndex = 0;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(320, 133);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnCancel.TabIndex = 1;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(81, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Bad CRC in file:";
|
||||
//
|
||||
// txtFileName
|
||||
//
|
||||
this.txtFileName.AutoSize = true;
|
||||
this.txtFileName.Location = new System.Drawing.Point(12, 36);
|
||||
this.txtFileName.Name = "txtFileName";
|
||||
this.txtFileName.Size = new System.Drawing.Size(13, 13);
|
||||
this.txtFileName.TabIndex = 3;
|
||||
this.txtFileName.Text = "a";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 61);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(320, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Do you want to continue anyhow? [channel data could be invalid]";
|
||||
//
|
||||
// cbRememberChoice
|
||||
//
|
||||
this.cbRememberChoice.AutoSize = true;
|
||||
this.cbRememberChoice.Location = new System.Drawing.Point(16, 98);
|
||||
this.cbRememberChoice.Name = "cbRememberChoice";
|
||||
this.cbRememberChoice.Size = new System.Drawing.Size(272, 17);
|
||||
this.cbRememberChoice.TabIndex = 5;
|
||||
this.cbRememberChoice.Text = "Remember this choice for other channels in this test.";
|
||||
this.cbRememberChoice.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BadCRCBypass
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(596, 169);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.cbRememberChoice);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.txtFileName);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "BadCRCBypass";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "WARNING";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label txtFileName;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox cbRememberChoice;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* TDMS.File.cs
|
||||
*
|
||||
* Copyright © 2015
|
||||
* Diversified Technical Systems, Inc.
|
||||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Serialization.TDMS
|
||||
{ ///
|
||||
/// <summary>
|
||||
/// Basic representation of a TDMS file.
|
||||
/// </summary>
|
||||
///
|
||||
public partial class File
|
||||
: Serialization.File, IWritable<Test>
|
||||
{ ///
|
||||
/// <summary>
|
||||
/// Initialize an instance of the TDMS.File class.
|
||||
/// </summary>
|
||||
///
|
||||
public File(Common.ISO.TestPlan plan)
|
||||
: base("TDMS")
|
||||
{
|
||||
_testPlan = plan;
|
||||
}
|
||||
|
||||
private readonly Common.ISO.TestPlan _testPlan = null;
|
||||
/// <summary>
|
||||
/// Get this file format's extension.
|
||||
/// </summary>
|
||||
public static string Extension => ".tdms";
|
||||
public bool UseZeroForUnfiltered { get; set; } = false;
|
||||
public bool FilteredExport { get; set; } = false;
|
||||
private readonly Dictionary<string, FilteredData> _EUUnfilteredDataForLinearizedChannels = new Dictionary<string, FilteredData>();
|
||||
public override void SetEUData(string channelId, FilteredData fd) { _EUUnfilteredDataForLinearizedChannels[channelId] = fd; }
|
||||
public override FilteredData GetEUData(string channelId) { return _EUUnfilteredDataForLinearizedChannels[channelId]; }
|
||||
/// <summary>
|
||||
/// Get the file writer for this file type.
|
||||
/// </summary>
|
||||
public IWriter<Test> Exporter
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_Exporter == null)
|
||||
{
|
||||
var writer = new Writer(this, DefaultEncoding);
|
||||
writer.TestPlan = _testPlan;
|
||||
_Exporter = writer;
|
||||
}
|
||||
(_Exporter as Writer).WriterParent = this;
|
||||
return _Exporter;
|
||||
}
|
||||
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
throw new Exception("encountered problem getting exporter", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
private IWriter<Test> _Exporter = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user