public Task <StatusTextResponse <string> > PrintText( PrintFormat printFormat, bool printToScreen, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
public IHttpActionResult updatePrintFormat([FromBody] PrintFormat printFormat) { Boolean valid = false; SqlConnection connection = new SqlConnection(connectionString); String query = "update MstKOTPrintFormat set CompanyName = '" + printFormat.companyName + "', NormalPrint ='" + printFormat.normalPrint + "', RePrint = '" + printFormat.rePrint + "',CancelPrint = '" + printFormat.cancelledPrint + "', IsCompanyNamePrintable = '" + printFormat.showCompanyName + "', LineBreakOnTop= '" + printFormat.lineBreakOnTop + "', LineBreakOnBottom = '" + printFormat.lineBreakOnBottom + "', CounterPrint = '" + printFormat.counterPrint + "', CounterPrintPath = '" + printFormat.counterPrintPath + "' where id = 1 "; SqlCommand cmd = new SqlCommand(query, connection); try { connection.Open(); cmd.ExecuteNonQuery(); valid = true; } catch (Exception ex) { valid = false; } finally { connection.Close(); } if (valid) { return(Content(HttpStatusCode.OK, "Updated Print Format")); } else { return(Content(HttpStatusCode.NotFound, "Error updating print format, try again")); } }
public void WriteRecord(BinaryWriter writer) { writer.Write((int)RecordType); writer.Write(Type); writer.Write(HasVariableLabel ? 1 : 0); writer.Write(MissingValueType); writer.Write(PrintFormat?.GetInteger() ?? 0); writer.Write(WriteFormat?.GetInteger() ?? 0); writer.Write(_nameRaw); if (HasVariableLabel) { writer.Write(LabelLength); writer.Write(_labelRaw); } if (MissingValueType != 0) { for (int i = 0; i < MissingValues.Count && i < _missingValueCount; i++) { writer.Write(MissingValues[i]); } } }
private void btnChangeSetting_Click(object sender, EventArgs e) { try { for (int i = 0; i < _RB.Length; i++) { if (_RB[i].Checked) { _selectedPrintFormat = (PrintFormat)i; break; } } if (_selectedPrintFormat == PrintFormat.噴墨列印 && (Program.UserSettings.JetPrintSettings.JetExeDefaultPath == string.Empty || Program.UserSettings.JetPrintSettings.JetExecPaths.Count == 0 || Program.UserSettings.JetPrintSettings.MaxPerFile < 1 || Program.UserSettings.JetPrintSettings.PrintFormatter == string.Empty)) { MessageBox.Show("噴墨列印設定尚未完成,請重新設定。"); } else { base.DialogResult = DialogResult.OK; Close(); } } catch (Exception) { Close(); } }
public frmSelectPrintFormat(PrintFormat CurrentPrintFormat) { InitializeComponent(); _RB = new RadioButton[20] { radioButton1, radioButton2, radioButton3, radioButton4, radioButton5, radioButton6, radioButton7, radioButton8, radioButton9, radioButton10, radioButton11, radioButton12, radioButton13, radioButton14, radioButton15, radioButton16, radioButton17, radioButton18, radioButton19, radioButton20 }; for (int i = 0; i < _RB.Length; i++) { _RB[i].Text = PrintCodeUtilties.PrtFmtShowName((PrintFormat)i); if (i == Convert.ToInt32(CurrentPrintFormat)) { _RB[i].Checked = true; } } }
public string Print(PrintFormat format) { string result = string.Empty; switch (format) { case PrintFormat.Readable: result = string.Format( "{0} {1} {2}i", Real, Imaginary > 0 ? "+" : "-", Math.Abs(Imaginary)); break; case PrintFormat.Vector: result = string.Format("({0}, {1})", Real, Imaginary); break; default: result = "Format Unkwown."; break; } return(result); }
public Task <StatusTextResponse <string> > PrintText( PrintFormat printFormat, string file, bool append = false, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
/// <summary> /// Prints automaton/transducer to file. /// </summary> /// <param name="fileName">Path to output file.</param> /// <param name="m">Automaton/transducer.</param> /// <param name="format">Format of output.</param> /// <param name="sort">Sort states, moves, etc.?</param> /// <param name="stateSymbolsFileName">Path to state symbols file (optional and only used with FSM format).</param> /// <param name="inputSymbolsFileName">Path to input arc symbols file (optional and only used with FSM format).</param> /// <param name="outputSymbolsFileName">Path to output arc symbols file (optional and only used with a transducer in FSM format).</param> public static void PrintAutomaton( string fileName, ISSAutomaton <SYMBOL> m, PrintFormat format, bool sort = true, string stateSymbolsFileName = null, string inputSymbolsFileName = null, string outputSymbolsFileName = null) { using (var file = new StreamWriter(fileName)) { PrintAutomaton(file, m, format, sort); } }
public void GetListPrintFormat <T>(T objFilter, ref List <T> listData) where T : class, IModel, new() { string sQuery = "GetListPrintFormat"; PrintFormat objData = objFilter as PrintFormat; List <DbParameter> list = new List <DbParameter>(); list.Add(SqlConnManager.GetConnParameters("RecNo", "RecNo", 8, GenericDataType.Long, ParameterDirection.Input, objData.RecNo)); SqlConnManager.GetList <T>(sQuery, CommandType.StoredProcedure, list.ToArray(), FillPrintFormatDataFromReader, ref listData); }
/// <summary> /// Prints SST in specified format to file. /// </summary> /// <param name="fileName">Path to output file.</param> /// <param name="format">Text format of automaton.</param> /// <param name="sort">If set to <c>true</c>, will sort states, transitions, etc.</param> /// <param name="stateSymbolsFileName">Path to state symbols file (optional and only used with FSM format).</param> /// <param name="inputSymbolsFileName">Path to input arc symbols file (optional and only used with FSM format).</param> /// <param name="outputSymbolsFileName">Path to output arc symbols file (optional and only used with FSM format).</param> public void Print( string fileName, PrintFormat format, bool sort = true, string stateSymbolsFileName = null, string inputSymbolsFileName = null, string outputSymbolsFileName = null) { Printer <SYMBOL> .PrintAutomaton( fileName, this, format, sort, stateSymbolsFileName, inputSymbolsFileName, outputSymbolsFileName ); }
public DataBaseResultSet SavePrintFormat <T>(T objData) where T : class, IModel, new() { PrintFormat obj = objData as PrintFormat; string sQuery = "sprocPrintFormatInsertUpdateSingleItem"; List <DbParameter> list = new List <DbParameter>(); list.Add(SqlConnManager.GetConnParameters("RecNo", "RecNo", 8, GenericDataType.Long, ParameterDirection.Input, obj.RecNo)); list.Add(SqlConnManager.GetConnParameters("LabelType", "LabelType", 50, GenericDataType.String, ParameterDirection.Input, obj.LabelType)); list.Add(SqlConnManager.GetConnParameters("OprtSys", "OprtSys", 50, GenericDataType.String, ParameterDirection.Input, obj.OprtSys)); list.Add(SqlConnManager.GetConnParameters("FormatName", "FormatName", 50, GenericDataType.String, ParameterDirection.Input, obj.FormatName)); list.Add(SqlConnManager.GetConnParameters("PrinterName", "PrinterName", 50, GenericDataType.String, ParameterDirection.Input, obj.PrinterName)); list.Add(SqlConnManager.GetConnParameters("TxtType", "TxtType", 50, GenericDataType.String, ParameterDirection.Input, obj.TxtType)); list.Add(SqlConnManager.GetConnParameters("SampleTxt", "SampleTxt", 200, GenericDataType.String, ParameterDirection.Input, obj.SampleTxt)); list.Add(SqlConnManager.GetConnParameters("FPrefix", "FPrefix", 50, GenericDataType.String, ParameterDirection.Input, obj.FPrefix)); list.Add(SqlConnManager.GetConnParameters("FldName", "FldName", 50, GenericDataType.String, ParameterDirection.Input, obj.FldName)); list.Add(SqlConnManager.GetConnParameters("FSufix", "FSufix", 50, GenericDataType.String, ParameterDirection.Input, obj.FSufix)); list.Add(SqlConnManager.GetConnParameters("PrntFormat", "PrntFormat", 50, GenericDataType.String, ParameterDirection.Input, obj.PrntFormat)); list.Add(SqlConnManager.GetConnParameters("PosX", "PosX", 8, GenericDataType.Long, ParameterDirection.Input, obj.PosX)); list.Add(SqlConnManager.GetConnParameters("PosY", "PosY", 8, GenericDataType.Long, ParameterDirection.Input, obj.PosY)); list.Add(SqlConnManager.GetConnParameters("PWidth", "PWidth", 8, GenericDataType.Long, ParameterDirection.Input, obj.PWidth)); list.Add(SqlConnManager.GetConnParameters("PHeight", "PHeight", 8, GenericDataType.Long, ParameterDirection.Input, obj.PHeight)); list.Add(SqlConnManager.GetConnParameters("FntName", "FntName", 50, GenericDataType.String, ParameterDirection.Input, obj.FntName)); list.Add(SqlConnManager.GetConnParameters("FntStyle", "FntStyle", 50, GenericDataType.String, ParameterDirection.Input, obj.FntStyle)); list.Add(SqlConnManager.GetConnParameters("FntBold", "FntBold", 3, GenericDataType.String, ParameterDirection.Input, obj.FntBold)); list.Add(SqlConnManager.GetConnParameters("FntItalic", "FntItalic", 3, GenericDataType.String, ParameterDirection.Input, obj.FntItalic)); list.Add(SqlConnManager.GetConnParameters("FntStrikout", "FntStrikout", 3, GenericDataType.String, ParameterDirection.Input, obj.FntStrikout)); list.Add(SqlConnManager.GetConnParameters("FntUnderLine", "FntUnderLine", 3, GenericDataType.String, ParameterDirection.Input, obj.FntUnderLine)); list.Add(SqlConnManager.GetConnParameters("FntSize", "FntSize", 8, GenericDataType.Long, ParameterDirection.Input, obj.FntSize)); list.Add(SqlConnManager.GetConnParameters("FntColor", "FntColor", 8, GenericDataType.Long, ParameterDirection.Input, obj.FntColor)); list.Add(SqlConnManager.GetConnParameters("AcrossLbl", "AcrossLbl", 8, GenericDataType.Long, ParameterDirection.Input, obj.AcrossLbl)); list.Add(SqlConnManager.GetConnParameters("PgLbl", "PgLbl", 8, GenericDataType.Long, ParameterDirection.Input, obj.PgLbl)); list.Add(SqlConnManager.GetConnParameters("DuplicateLbl", "DuplicateLbl", 3, GenericDataType.String, ParameterDirection.Input, obj.DuplicateLbl)); list.Add(SqlConnManager.GetConnParameters("PgTopMargin", "PgTopMargin", 8, GenericDataType.Long, ParameterDirection.Input, obj.PgTopMargin)); list.Add(SqlConnManager.GetConnParameters("PgLeftMargin", "PgLeftMargin", 8, GenericDataType.Long, ParameterDirection.Input, obj.PgLeftMargin)); list.Add(SqlConnManager.GetConnParameters("LblVerticalGap", "LblVerticalGap", 8, GenericDataType.Long, ParameterDirection.Input, obj.LblVerticalGap)); list.Add(SqlConnManager.GetConnParameters("LblHorizontalGap", "LblHorizontalGap", 8, GenericDataType.Long, ParameterDirection.Input, obj.LblHorizontalGap)); list.Add(SqlConnManager.GetConnParameters("LblWidth", "LblWidth", 8, GenericDataType.Long, ParameterDirection.Input, obj.LblWidth)); list.Add(SqlConnManager.GetConnParameters("LblHeight", "LblHeight", 8, GenericDataType.Long, ParameterDirection.Input, obj.LblHeight)); list.Add(SqlConnManager.GetConnParameters("NoOfLine", "NoOfLine", 8, GenericDataType.Long, ParameterDirection.Input, obj.NoOfLine)); list.Add(SqlConnManager.GetConnParameters("GapLine", "GapLine", 8, GenericDataType.Long, ParameterDirection.Input, obj.GapLine)); list.Add(SqlConnManager.GetConnParameters("CUser", "CUser", 8, GenericDataType.Long, ParameterDirection.Input, obj.CUser)); list.Add(SqlConnManager.GetConnParameters("CDateTime", "CDateTime", 8, GenericDataType.DateTime, ParameterDirection.Input, obj.CDateTime)); list.Add(SqlConnManager.GetConnParameters("EUser", "EUser", 8, GenericDataType.Long, ParameterDirection.Input, obj.EUser)); list.Add(SqlConnManager.GetConnParameters("EDateTime", "EDateTime", 8, GenericDataType.DateTime, ParameterDirection.Input, obj.EDateTime)); list.Add(SqlConnManager.GetConnParameters("PrintStyle", "PrintStyle", 50, GenericDataType.String, ParameterDirection.Input, obj.PrintStyle)); list.Add(SqlConnManager.GetConnParameters("CreatedBy", "CreatedBy", 50, GenericDataType.String, ParameterDirection.Input, obj.CreatedBy)); list.Add(SqlConnManager.GetConnParameters("CreatedDate", "CreatedDate", 8, GenericDataType.DateTime, ParameterDirection.Input, obj.CreatedDate)); list.Add(SqlConnManager.GetConnParameters("UpdateddBy", "UpdateddBy", 50, GenericDataType.String, ParameterDirection.Input, obj.UpdateddBy)); list.Add(SqlConnManager.GetConnParameters("UpdatedDate", "UpdatedDate", 8, GenericDataType.DateTime, ParameterDirection.Input, obj.UpdatedDate)); list.Add(SqlConnManager.GetConnParameters("UpdatedCount", "UpdatedCount", 4, GenericDataType.Int, ParameterDirection.Input, obj.UpdatedCount)); list.Add(SqlConnManager.GetConnParameters("LUT", "LUT", 8, GenericDataType.DateTime, ParameterDirection.Input, obj.LUT)); list.Add(SqlConnManager.GetConnParameters("OperationFlag", "OperationFlag", 4, GenericDataType.Int, ParameterDirection.Input, (short)obj.OperationFlag)); list.Add(SqlConnManager.GetConnParameters("Message", "Message", 300, GenericDataType.String, ParameterDirection.Output, null)); list.Add(SqlConnManager.GetConnParameters("ErrorCode", "ErrorCode", 4, GenericDataType.Int, ParameterDirection.Output, null)); return(SqlConnManager.Save(sQuery, CommandType.StoredProcedure, list.ToArray())); }
private void FillPrintFormatDataFromReader <T>(DbDataReader DbReader, ref List <T> listData) where T : class, IModel, new() { while (DbReader.Read()) { T obj = new T(); PrintFormat objData = obj as PrintFormat; obj.FillDataFromDB(DbReader); listData.Add(obj); } }
// method to print the contents of LL to console public void PrintList(PrintFormat Writer) { Node currentNode = head; for (int i = 0; i < this.count; i++) { // in Main: LL.PrintList( DetailedString ); string line = Writer(currentNode.Data); WriteLine($"{i,5} { line }"); currentNode = currentNode.Next; } }
/// <summary> /// Prints automaton/transducer to standard output. /// </summary> /// <param name="m">Automaton/transducer.</param> /// <param name="format">Format of output.</param> /// <param name="sort">Sort states, moves, etc.?</param> public static void PrintAutomaton(ISSAutomaton <SYMBOL> m, PrintFormat format, bool sort = true) { StreamWriter file = new StreamWriter(Console.OpenStandardOutput()); TextWriter stdout = Console.Out; Console.SetOut(file); try { PrintAutomaton(file, m, format, sort); } finally { file.Close(); Console.SetOut(stdout); } }
public static void PrintAsNumber(object number, PrintFormat format) { if (format == PrintFormat.twoFloatDigits) { Console.WriteLine("{0:f2}", number); } if (format == PrintFormat.percentage) { Console.WriteLine("{0:p0}", number); } if (format == PrintFormat.precededByEightSpaces) { Console.WriteLine("{0,8}", number); } }
static void PrintAsNumber(double number, PrintFormat format = PrintFormat.FloatLeft) { if (format == PrintFormat.FloatingPoint) { Console.WriteLine("{0:f2}", number); } else if (format == PrintFormat.Percent) { Console.WriteLine("{0:p0}", number); } else if (format == PrintFormat.FloatRight) { Console.WriteLine("{0,8}", number); } else if (format == PrintFormat.FloatLeft) { Console.WriteLine("{0}", number); } }
public static void PrintAsNumber(object number, PrintFormat format) { switch (format) { case PrintFormat.DoublePrecision: Console.WriteLine("{0:f2}", number); break; case PrintFormat.Percentage: Console.WriteLine("{0:p0}", number); break; case PrintFormat.Right: Console.WriteLine("{0,8}", number); break; default: throw new ArgumentException("Format parameter should be a valid PrintFormat enum"); } }
private static void print(PrintFormat fmt, DateTime dt, bool indent, int?x = null) { if (x.HasValue) { if ((fmt & PrintFormat.Javascript) != 0) { Console.WriteLine("T{1}:{2}{0}", (long)Math.Round((dt - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds), x.Value, indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.ISO8601) != 0) { Console.WriteLine("{1}{0}", dt.ToString(ISO8601, CultureInfo.InvariantCulture), indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.RFC1123) != 0) { Console.WriteLine("{1}{0:r}", dt, indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.Localized) != 0) { Console.WriteLine("{1}{0:F}", dt.ToLocalTime(), indent ? "\t" : string.Empty); } } else { if ((fmt & PrintFormat.Javascript) != 0) { Console.WriteLine("{1}{0}", (long)Math.Round((dt - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds), indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.ISO8601) != 0) { Console.WriteLine("{1}{0}", dt.ToString(ISO8601, CultureInfo.InvariantCulture), indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.RFC1123) != 0) { Console.WriteLine("{1}{0:r}", dt, indent ? "\t" : string.Empty); } if ((fmt & PrintFormat.Localized) != 0) { Console.WriteLine("{1}{0:F}", dt.ToLocalTime(), indent ? "\t" : string.Empty); } } }
public static string ArrayToString(byte[] byteArray, PrintFormat printFormat = PrintFormat.Decimal) { var stringBuilder = new System.Text.StringBuilder(); for (int i = 0; i < byteArray.Length; i++) { if (printFormat == PrintFormat.Hexadecimal) { stringBuilder.Append(byteArray[i].ToString("x2")); } else { stringBuilder.Append(byteArray[i].ToString("D")); } // Add space separator if (i + 1 < byteArray.Length) { stringBuilder.Append(' '); } } return(stringBuilder.ToString()); }
/// <summary> /// Prints the a3 temperatur curve. /// </summary> /// <param name="patients">The patients.</param> /// <param name="weeks">The weeks.</param> /// <param name="copies">The copies.</param> /// <param name="printFormat">The print format.</param> /// <param name="opParam">The op.</param> public void PrintA3TemperaturCurve(IList<PatientData> patients, int weeks, int copies, PrintFormat printFormat, OperationData opParam) { if (patients == null || patients.Count == 0) { return; } if (copies < 1 || copies > 20) { return; } if (opParam != null && patients.Count != 1) { return; } IList<PrintablePage> printablePageA4 = new List<PrintablePage>(); IList<PrintablePage> printablePageA3 = new List<PrintablePage>(); PrintableDocument pd = new PrintableDocument(); Font headlineFont = new Font("Arial", 18.0f, FontStyle.Underline | FontStyle.Bold); Font dateFont = new Font("Arial", 10.5f, FontStyle.Bold); Font printFont = new Font("Arial", 11, FontStyle.Bold); Font medicationFont = new Font("Arial", 10, FontStyle.Bold); Font symbolFont = new Font("Arial", 22, FontStyle.Bold); float leftMargin = 65; float topMargin = 30; foreach (PatientData patient in patients) { int daysSinceOp = 0; OperationData op; if (opParam == null) { op = patComp.GetLastOperationByPatientID(patient.Id); } else { op = opParam; } IList<string> medications = new List<string>(); IList<int> medDays = new List<int>(); bool hasCatheter = op.KathDays > 0; long kathDays = op.KathDays + 1; //CR ignoring OP Day. fillMedications(op, medications, medDays); //count = 0; DateTime opDate = op.Date; for (int week = 0; week < weeks; week++) { //PrintablePage pp = new PrintablePage(); PrintablePage a4Page = new PrintablePage(); PrintablePage a3Page = new PrintablePage(); //Organ Images... handleOrganImage(topMargin, op, a4Page, a3Page); addPrintableTextObject(1, a4Page, a3Page, "Paediatric Urology Team Austria", headlineFont, new SolidBrush(Color.FromArgb(0, 61, 120)), leftMargin, topMargin + (float)(0 * 17.56)); addPrintableTextObject(1, a4Page, a3Page, "Paediatric Urology Team Austria", headlineFont, new SolidBrush(Color.FromArgb(0, 61, 120)), leftMargin, topMargin + (float)(0 * 17.56)); addPrintableTextObject(1, a4Page, a3Page, op.Date.Month.ToString() + " " + op.Date.Year.ToString() + " Page: " + (week + 1), dateFont, Brushes.Red, leftMargin, topMargin + (float)28.74); addPrintableTextObject(1, a4Page, a3Page, "Additional Information:", printFont, Brushes.Black, leftMargin + (float)610, topMargin + 10F); //pp.AddPrintableObject(new PrintableTextObject("Notes - Final Report:", printFont, Brushes.Black, leftMargin + (float)635, topMargin + 120F)); addPrintableLineObject(1, a4Page, a3Page, Pens.Black, (int)leftMargin + 610, (int)topMargin + 27, (int)leftMargin + 635 + 175, (int)topMargin + 27); //pp.AddPrintableObject(new PrintableLineObject(Pens.Black, (int)leftMargin + 635, (int)topMargin + 137, (int)leftMargin + 635 + 200, (int)topMargin + 137)); Bitmap imgKinderurologieLogo = SPD.GUI.Properties.Resources.KinderurologieLogo; imgKinderurologieLogo.SetResolution(408, 408); addPrintableImageObject(1, a4Page, a3Page, imgKinderurologieLogo, 500, (int)topMargin); addPrintableRectangleObject(1, a4Page, a3Page, Brushes.Yellow, (int)leftMargin - 5 + 3, (int)topMargin + 198 - (2 * 17), 600, (int)printFont.GetHeight()); //Additional Info Rectangle addPrintableRectangleObject(1, a4Page, a3Page, Pens.Black, (int)(leftMargin + 605), (int)topMargin, 300, 220); addPrintableLineObject(1, a4Page, a3Page, Pens.Black, (int)(leftMargin + 605), (int)topMargin + 110, (int)(leftMargin + 605 + 300), (int)topMargin + 110); List<string> addInfo = new List<string>(); addInfo.Add(op.Additionalinformation.Replace(Environment.NewLine, " ")); addInfo = this.SplitStringsForPrinting(40, addInfo); int count = 0; foreach (string line in addInfo) { addPrintableTextObject(1, a4Page, a3Page, line, printFont, Brushes.Black, leftMargin + (float)610, topMargin + 27F + count * 17); count++; } float y = (float)topMargin + (float)(3 * 17.56) + 9; addPrintableTextObject(1, a4Page, a3Page, "Patient ID: " + patient.Id.ToString(), printFont, Brushes.Black, leftMargin, y); y += 17; addPrintableTextObject(1, a4Page, a3Page, "First name: " + patient.FirstName.Replace(Environment.NewLine, " "), printFont, Brushes.Black, leftMargin, y); y += 17; addPrintableTextObject(1, a4Page, a3Page, "Surname: " + patient.SurName.Replace(Environment.NewLine, " "), printFont, Brushes.Black, leftMargin, y); y += 17; if (patient.DateOfBirth != null && patient.DateOfBirth.Year > 1800) { addPrintableTextObject(1, a4Page, a3Page, "Birthdate: " + patient.DateOfBirth.ToShortDateString() + " - Age: " + StaticUtilities.getAgeFromBirthDate(patient.DateOfBirth), printFont, Brushes.Black, leftMargin, y); y += 17; } addPrintableTextObject(1, a4Page, a3Page, "Resident of Asmara: " + patient.ResidentOfAsmara.ToString(), printFont, Brushes.Black, leftMargin, y); y += 17; addPrintableTextObject(1, a4Page, a3Page, "OP Date: " + op.Date.ToShortDateString(), printFont, Brushes.Black, leftMargin, y); y += 17; addPrintableTextObject(1, a4Page, a3Page, "OP Diagnosis:", printFont, Brushes.Black, leftMargin, y); if (op.Diagnoses.Replace(Environment.NewLine, " ").Length > 60) { List<string> diagnosesList = new List<string>(); diagnosesList.Add(op.Diagnoses.Replace(Environment.NewLine, " ")); diagnosesList = SplitStringsForPrinting(60, diagnosesList); if (diagnosesList.Count >= 1) { addPrintableTextObject(1, a4Page, a3Page, diagnosesList[0], printFont, Brushes.Black, leftMargin + 110, y); } if (diagnosesList.Count >= 2) { y += 17; addPrintableTextObject(1, a4Page, a3Page, diagnosesList[1], printFont, Brushes.Black, leftMargin + 110, y); } } else { addPrintableTextObject(1, a4Page, a3Page, op.Diagnoses.Replace(Environment.NewLine, " "), printFont, Brushes.Black, leftMargin + 110, y); } y += 17; addPrintableTextObject(1, a4Page, a3Page, "Performed OP: " + op.Performed.Replace(Environment.NewLine, " "), printFont, Brushes.Black, leftMargin, y); y += 17; addPrintableTextObject(1, a4Page, a3Page, "OP Team: " + op.Team.Replace(Environment.NewLine, " "), printFont, Brushes.Black, leftMargin, y); //Gray Box addPrintableRectangleObject(1, a4Page, a3Page, Brushes.LightGray, 40, 270, 6 * 182, 30); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40 + j * 182, 270, 40 + j * 182, 270 + 7 * 30); } //horizintal lines for (int j = 0; j < 8; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40, 270 + j * 30, 40 + 6 * 182, 270 + j * 30); } ////Beschriftung begin if (kathDays > (week * 12)) { addPrintableTextObject(1, a4Page, a3Page, "catheter", printFont, Brushes.Black, 41, 305 + 5 * 30); } count = 0; foreach (string medication in medications) { if (week == 0) { addPrintableTextObject(1, a4Page, a3Page, medication, medicationFont, Brushes.Black, 41, 305 + count * 30); } else if (medDays[medications.IndexOf(medication)] >= ((week * 12) + 1)) { addPrintableTextObject(1, a4Page, a3Page, medication, medicationFont, Brushes.Black, 41, 305 + count * 30); } for (int j = 0; j < 6; j++) { int currentMedDay = (week * 12 + j) + 1; if ((currentMedDay > 1) && (((currentMedDay - 1) % 6) != 0) && (medDays[count] >= (currentMedDay + 1))) { addPrintableTextObject(1, a4Page, a3Page, " -", symbolFont, Brushes.Black, 41 + j * 182, (305 + count * 30) - 10); } if ((medDays[count] == currentMedDay)) { addPrintableTextObject(1, a4Page, a3Page, " - >", symbolFont, Brushes.Black, 41 + j * 182, (305 + count * 30) - 10); } } count++; } for (int j = 0; j < 6; j++) { int currentMedDay = (week * 12 + j) + 1; if (hasCatheter && (currentMedDay == kathDays)) { if (((kathDays - 1) % 12) == 0) { addPrintableTextObject(1, a4Page, a3Page, " DK ex ", printFont, Brushes.Black, 41 + j * 182, 305 + 5 * 30); } else { addPrintableTextObject(1, a4Page, a3Page, "DK ex ", printFont, Brushes.Black, 41 + j * 182, 305 + 5 * 30); } } else if (hasCatheter && (currentMedDay < kathDays) && ((currentMedDay - 1) % 12) != 0) { addPrintableTextObject(1, a4Page, a3Page, " -", symbolFont, Brushes.Black, 41 + j * 182, 305 + 5 * 30 - 9); } } //Kalendar Überschrift for (int j = 0; j < 6; j++) { addPrintableTextObject(1, a4Page, a3Page, " " + opDate.DayOfWeek.ToString() + " " + opDate.ToShortDateString(), dateFont, Brushes.Blue, 41 + j * 182, 275); if (daysSinceOp == 0) { addPrintableTextObject(1, a4Page, a3Page, "op", dateFont, Brushes.Red, 41 + j * 182, 275); } else { addPrintableTextObject(1, a4Page, a3Page, daysSinceOp.ToString(), dateFont, Brushes.Red, 41 + j * 182, 275); } opDate = opDate.AddDays(1.0); daysSinceOp++; } //// Beschriftung ende int yNursing = 500; addPrintableTextObject(1, a4Page, a3Page, "Nursing and medical orders:", printFont, Brushes.Black, 41, yNursing); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40 + j * 182, yNursing + 20, 40 + j * 182, yNursing + 150); } //horizintal lines addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40, yNursing + 20, 40 + 6 * 182, yNursing + 20); addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40, yNursing + 150, 40 + 6 * 182, yNursing + 150); int yTemperature = 670; addPrintableTextObject(1, a4Page, a3Page, "Temperature:", printFont, Brushes.Black, 41, yTemperature); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40 + j * 182, yTemperature + 20, 40 + j * 182, yTemperature + 20 + 1/*=number of lines*/ * 30); } //horizintal lines for (int j = 0; j < 2; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40, yTemperature + 20 + j * 30, 40 + 6 * 182, yTemperature + 20 + j * 30); } //Local status int yLocalStatus = 735; addPrintableTextObject(1, a4Page, a3Page, "Localstatus:", printFont, Brushes.Black, 41, yLocalStatus); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40 + j * 182, yLocalStatus + 20, 40 + j * 182, yLocalStatus + 20 + 1/*=number of lines*/ * 30); } //horizintal lines for (int j = 0; j < 2; j++) { addPrintableLineObject(1, a4Page, a3Page, Pens.Black, 40, yLocalStatus + 20 + j * 30, 40 + 6 * 182, yLocalStatus + 20 + j * 30); } printablePageA4.Add(a4Page); a4Page = new PrintablePage(); a3Page.AddPrintableObject(new PrintableLineObject(Pens.LightGray, 0, A4smallSite + 45, A4LargeSite, A4smallSite + 45)); //2. seite addPrintableTextObject(2, a4Page, a3Page, "Patient ID: " + patient.Id.ToString(), printFont, Brushes.Black, leftMargin, 13 + 45); //Gray Box int calendary = (int)topMargin + 45; addPrintableRectangleObject(2, a4Page, a3Page, Brushes.LightGray, 40, calendary, 6 * 182, 30); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40 + j * 182, calendary, 40 + j * 182, calendary + 7 * 30); } //horizintal lines for (int j = 0; j < 8; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40, calendary + j * 30, 40 + 6 * 182, calendary + j * 30); } ////Beschriftung begin if (kathDays > ((week * 12) + 6)) { addPrintableTextObject(2, a4Page, a3Page, "catheter", printFont, Brushes.Black, 41, calendary + 5 + 6 * 30); } count = 0; foreach (string medication in medications) { if (medDays[medications.IndexOf(medication)] >= ((week * 12) + 7)) { addPrintableTextObject(2, a4Page, a3Page, medication, medicationFont, Brushes.Black, 41, calendary + 5 + 30 + count * 30); } for (int j = 0; j < 6; j++) { int currentMedDay = (week * 12 + j) + 1 + 6; if (((currentMedDay - 1) % 6) != 0 && (medDays[count] >= (currentMedDay + 1))) { addPrintableTextObject(2, a4Page, a3Page, " -", symbolFont, Brushes.Black, 41 + j * 182, (calendary + 5 + 30 + count * 30) - 10); } if ((medDays[count] == currentMedDay)) { addPrintableTextObject(2, a4Page, a3Page, " - >", symbolFont, Brushes.Black, 41 + j * 182, (calendary + 5 + 30 + count * 30) - 10); } } count++; } for (int j = 0; j < 6; j++) { int currentMedDay = (week * 12 + j) + 1 + 6; if (hasCatheter && (currentMedDay == kathDays)) { if (((kathDays - 7) % 12) == 0) { addPrintableTextObject(2, a4Page, a3Page, " DK ex ", printFont, Brushes.Black, 41 + j * 182, calendary + 5 + 6 * 30); } else { addPrintableTextObject(2, a4Page, a3Page, "DK ex ", printFont, Brushes.Black, 41 + j * 182, calendary + 5 + 6 * 30); } } else if (hasCatheter && (currentMedDay < kathDays) && ((currentMedDay - 7) % 12) != 0) { addPrintableTextObject(2, a4Page, a3Page, " -", symbolFont, Brushes.Black, 41 + j * 182, calendary + 5 + 6 * 30 - 9); } } //Kalendar Überschrift for (int j = 0; j < 6; j++) { addPrintableTextObject(2, a4Page, a3Page, " " + opDate.DayOfWeek.ToString() + " " + opDate.ToShortDateString(), dateFont, Brushes.Blue, 41 + j * 182, calendary + 5); if (daysSinceOp == 0) { addPrintableTextObject(2, a4Page, a3Page, "op", dateFont, Brushes.Red, 41 + j * 182, calendary + 5); } else { addPrintableTextObject(2, a4Page, a3Page, daysSinceOp.ToString(), dateFont, Brushes.Red, 41 + j * 182, calendary + 5); } opDate = opDate.AddDays(1.0); daysSinceOp++; } //// Beschriftung ende yNursing = 295; addPrintableTextObject(2, a4Page, a3Page, "Nursing and medical orders:", printFont, Brushes.Black, 41, yNursing); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40 + j * 182, yNursing + 20, 40 + j * 182, yNursing + 150); } //horizintal lines addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40, yNursing + 20, 40 + 6 * 182, yNursing + 20); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40, yNursing + 150, 40 + 6 * 182, yNursing + 150); yTemperature = 455; addPrintableTextObject(2, a4Page, a3Page, "Temperature:", printFont, Brushes.Black, 41, yTemperature); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40 + j * 182, yTemperature + 20, 40 + j * 182, yTemperature + 20 + 1/*=number of lines*/ * 30); } //horizintal lines for (int j = 0; j < 2; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40, yTemperature + 20 + j * 30, 40 + 6 * 182, yTemperature + 20 + j * 30); } //Local Status yLocalStatus = 520; addPrintableTextObject(2, a4Page, a3Page, "Localstatus:", printFont, Brushes.Black, 41, yLocalStatus); //vertical lines for (int j = 0; j < 7; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40 + j * 182, yLocalStatus + 20, 40 + j * 182, yLocalStatus + 20 + 1/*=number of lines*/ * 30); } //horizintal lines for (int j = 0; j < 2; j++) { addPrintableLineObject(2, a4Page, a3Page, Pens.Black, 40, yLocalStatus + 20 + j * 30, 40 + 6 * 182, yLocalStatus + 20 + j * 30); } int y3rdBlock = 580; int widthlastbox = 335; int xft = 41; int xcont = xft + widthlastbox + xft; int xfo = xft + widthlastbox + xft + widthlastbox + xft; addPrintableTextObject(2, a4Page, a3Page, "Further Treatment for discharge:", printFont, Brushes.Black, xft, y3rdBlock); addPrintableTextObject(2, a4Page, a3Page, "Control(s) planned for:", printFont, Brushes.Black, xcont, y3rdBlock); addPrintableTextObject(2, a4Page, a3Page, "Further operation planned for:", printFont, Brushes.Black, xfo, y3rdBlock); //3 oberen Linien der Boxen addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft, y3rdBlock + 20, xft + widthlastbox, y3rdBlock + 20); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft, y3rdBlock + 20, xft + widthlastbox + xft + widthlastbox, y3rdBlock + 20); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft + widthlastbox + xft, y3rdBlock + 20, xft + widthlastbox + xft + widthlastbox + xft + widthlastbox, y3rdBlock + 20); //3 unteren Linien der Boxen addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft, y3rdBlock + 177, xft + widthlastbox, y3rdBlock + 177); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft, y3rdBlock + 200, xft + widthlastbox + xft + widthlastbox, y3rdBlock + 200); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft + widthlastbox + xft, y3rdBlock + 200, xft + widthlastbox + xft + widthlastbox + xft + widthlastbox, y3rdBlock + 200); //vertikale Linien der Boxen addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft, y3rdBlock + 20, xft, y3rdBlock + 177); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox, y3rdBlock + 20, xft + widthlastbox, y3rdBlock + 177); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft, y3rdBlock + 20, xft + widthlastbox + xft, y3rdBlock + 200); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft + widthlastbox, y3rdBlock + 20, xft + widthlastbox + xft + widthlastbox, y3rdBlock + 200); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft + widthlastbox + xft, y3rdBlock + 20, xft + widthlastbox + xft + widthlastbox + xft, y3rdBlock + 200); addPrintableLineObject(2, a4Page, a3Page, Pens.Black, xft + widthlastbox + xft + widthlastbox + xft + widthlastbox, y3rdBlock + 20, xft + widthlastbox + xft + widthlastbox + xft + widthlastbox, y3rdBlock + 200); addPrintableTextObject(2, a4Page, a3Page, "Treatment completed: yes no", printFont, Brushes.Black, xft, y3rdBlock + 180); addPrintableRectangleObject(2, a4Page, a3Page, Pens.Black, xft + 195, y3rdBlock + 180, 20, 20); addPrintableRectangleObject(2, a4Page, a3Page, Pens.Black, xft + 246, y3rdBlock + 180, 20, 20); printablePageA4.Add(a4Page); printablePageA3.Add(a3Page); } } pd.PrintPageList = printablePageA3; pd.duplicate(copies); pd.Landscape = false; pd.DocumentName = "SPD Temperature Curve A3"; PrintDialog printDialog = null; if (printFormat == PrintFormat.A3) { pd.PaperKindOrNothing = PaperKind.A3; printDialog = pd.DoPrint(); if (printDialog != null) { pd.PaperKindOrNothing = PaperKind.A4; pd.Landscape = true; pd.PrintPageList = printablePageA4; pd.duplicate(copies); printDialog = pd.DoPrint(printDialog); } } else if (printFormat == PrintFormat.A4) { pd.PaperKindOrNothing = PaperKind.A4; printDialog = pd.DoPrint(); } if (printDialog != null) { MessageBox.Show("Sorry - printing not possible!"); } }
public static void Main(string[] args) { if ((args.Length == 1) && matches(args[0], "/?", "/help", "/h", "-help", "-h", "--help", "--h", "--syntax", "/syntax", "-?", "--?")) { syntax(); return; } DateTime nowtime = DateTime.UtcNow; DateTime reftime = nowtime; List <DateTime> tl = new List <DateTime>(); PrintFormat fmt = PrintFormat.All; for (int argc = 0; argc < args.Length; ++argc) { string a = args[argc]; long l = 0; DateTime dt; TimeSpan ts; if (matches(a, "now", "/now", "-now", "--now")) { reftime = nowtime; tl.Add(reftime); } else if (((argc + 1) < args.Length) && matches(a, "--format", "/format", "--fmt", "/fmt", "-f", "/f")) { if (fmt == PrintFormat.All) { fmt = PrintFormat.None; } a = args[++argc]; if (matches(a, "Javascript")) { fmt = (PrintFormat)(fmt | PrintFormat.Javascript); } else if (matches(a, "ISO8601")) { fmt = (PrintFormat)(fmt | PrintFormat.ISO8601); } else if (matches(a, "RFC1123")) { fmt = (PrintFormat)(fmt | PrintFormat.RFC1123); } else if (matches(a, "Localized")) { fmt = (PrintFormat)(fmt | PrintFormat.Localized); } else { syntax(); return; } } else if (long.TryParse(a, out l) && (a[0] != '+') && (a[0] != '-')) { reftime = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddMilliseconds(l); tl.Add(reftime); } else if (DateTime.TryParseExact(a, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'Z'", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out dt) || DateTime.TryParseExact(a, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out dt)) { reftime = dt; tl.Add(reftime); } else if (DateTime.TryParseExact(a, "r", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out dt)) { reftime = dt; tl.Add(reftime); } else if (DateTime.TryParse(a, CultureInfo.CurrentCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeLocal, out dt)) { reftime = dt; tl.Add(reftime); } else if (TryParsePeriod(a, out ts)) { reftime = reftime + ts; tl.Add(reftime); } else { Console.Error.WriteLine("error: cannot parse {0} as date/time or time interval", a); } } if (tl.Count == 0) { tl.Add(nowtime); } if (tl.Count > 0) { for (int i = 0; i < tl.Count; ++i) { if (i > 0) { Console.WriteLine(); } print(fmt, tl[i], (tl.Count > 1), (tl.Count > 1) ? new int?(i) : null); if (i > 0) { Console.WriteLine("Difference from T{0}:", i - 1); print(tl[i] - tl[i - 1]); } } } }
/// <summary> /// Prints SST in specified format to standard output. /// </summary> /// <param name="format">Text format of automaton.</param> /// <param name="sort">If set to <c>true</c>, will sort states, transitions, etc.</param> public void Print(PrintFormat format, bool sort = true) { Printer <SYMBOL> .PrintAutomaton(this, format, sort); }
/// <summary> /// Prints automaton/transducer to open stream writer. /// </summary> /// <param name="file">Stream writer (caller must close).</param> /// <param name="m">Automaton/transducer.</param> /// <param name="format">Format of output.</param> /// <param name="sort">Sort states, moves, etc.?</param> /// <param name="stateSymbolsFileName">Path to state symbols file (optional and only used with FSM format).</param> /// <param name="inputSymbolsFileName">Path to input arc symbols file (optional and only used with FSM format).</param> /// <param name="outputSymbolsFileName">Path to output arc symbols file (optional and only used with a transducer in FSM format).</param> public static void PrintAutomaton( StreamWriter file, ISSAutomaton <SYMBOL> m, PrintFormat format, bool sort = true, string stateSymbolsFileName = null, string inputSymbolsFileName = null, string outputSymbolsFileName = null) { // make list to enable ordering List <int> states = m.States.ToList(); List <SYMBOL> alphabet = m.Alphabet.ToList(); List <Move <ILabel <SYMBOL> > > moves = m.GenericMoves.Distinct().ToList(); int initialState = m.InitialState; List <int> finalStates = m.FinalStates.ToList(); if (sort) { alphabet.Sort(); if (m.StateNames == null) // sort states by number { states.Sort(); finalStates.Sort(); } else // sort states by name { Comparer <int> comparer = Comparer <int> .Create((s1, s2) => string.Compare(m.StateNames[s1], m.StateNames[s2])); states.Sort(comparer); finalStates.Sort(comparer); } } Dictionary <int, string> stateNames; if (m.StateNames == null) // if no state names, provide defaults { stateNames = new Dictionary <int, string>(states.Count); foreach (int state in states) { stateNames[state] = (format == PrintFormat.DOT) ? string.Format("q_{0}{1}{2}", '{', state, '}') : // DOT can display number as subscript string.Format("q{0}", state); } } else { stateNames = m.StateNames; } Action <StreamWriter, AutomatonType, string, Dictionary <int, string>, PredicateAlgebra <SYMBOL>, List <int>, List <SYMBOL>, List <Move <ILabel <SYMBOL> > >, int, List <int>, string, string, string> print; switch (format) { case PrintFormat.DOT: print = PrintAutomatonDot; break; case PrintFormat.TIMBUK: print = PrintAutomatonTimbuk; break; case PrintFormat.FSA: print = PrintAutomatonFSA; break; case PrintFormat.FSM: print = PrintAutomatonFSM; break; default: throw new ArgumentOutOfRangeException("Invalid print format value"); } // print in given format print( file, m.Type, m.Name, stateNames, new PredicateAlgebra <SYMBOL>(m.Alphabet), states, alphabet, moves, initialState, finalStates, stateSymbolsFileName, inputSymbolsFileName, outputSymbolsFileName ); }
/// <summary> /// ARMC constructor. /// </summary> /// <param name="init">SSA representing initial states.</param> /// <param name="bad">SSA representing bad states.</param> /// <param name="taus">SSTs whose composition represents transition.</param> /// <param name="config">Configuration.</param> public ARMC(SSA <SYMBOL> init, SSA <SYMBOL> bad, SST <SYMBOL>[] taus, Config config) { /* merge alphabets */ Set <SYMBOL> alphabet = init.Alphabet + bad.Alphabet + taus.Select(tau => tau.Alphabet).Aggregate(Set <SYMBOL> .Union); init.Alphabet = alphabet; bad.Alphabet = alphabet; for (int i = 0; i < taus.Length; i++) { taus[i].Alphabet = alphabet; } if (config.PredicateLanguages == config.FiniteLengthLanguages) // sanity check { throw ConfigException.AbstractionNotChosen(); } this.init = init; this.bad = bad; this.tau = SST <SYMBOL> .Union(taus); this.tauInv = tau.Invert(); this.abstr = config.PredicateLanguages ? (Abstraction <SYMBOL>) new PredicateAbstraction <SYMBOL>(config, init, bad, taus) : new FiniteLengthAbstraction <SYMBOL>(config, init, bad, taus); this.verbose = config.Verbose; this.printAutomata = config.PrintAutomata; this.outputDir = config.OutputDirectory; this.format = config.AutomataFormat; this.imgExt = (config.ImageFormat == null) ? "" : config.ImageFormat.ToString(); this.timeout = config.Timeout.Ticks; this.stopwatch = new Stopwatch(); this.loops = 0; if (outputDir != "") { /* clear output directory */ DirectoryInfo dirInfo = Directory.CreateDirectory(outputDir); foreach (FileInfo fi in dirInfo.EnumerateFiles()) { fi.Delete(); } foreach (DirectoryInfo di in dirInfo.EnumerateDirectories()) { di.Delete(true); } } if (printAutomata) { /* print input automata and configuration */ string dir = Path.Combine(outputDir, "armc-input"); Directory.CreateDirectory(dir); PrintAutomaton(init, dir, "init"); PrintAutomaton(bad, dir, "bad"); PrintAutomaton(tau, dir, "tau"); if (taus.Length > 1) // no point in only printing tau1 { for (int i = 0; i < taus.Length; i++) { PrintAutomaton(taus[i], dir, "tau" + (i + 1).ToString()); } } PrintAutomaton(tauInv, dir, "tau-inv"); config.Write(Path.Combine(dir, "armc.properties")); } if (config.ComputationDirection == Config.Direction.Backward) { /* reverse direction, i.e. check if tauInv*(bad) & init is empty */ this.init = bad; this.bad = init; this.tauInv = tau; this.tau = tau.Invert(); } if (!SSA <SYMBOL> .ProductIsEmpty(init, bad)) // no point in further verification { if (printAutomata) { string dir = Path.Combine(outputDir, "armc-counterexample"); Directory.CreateDirectory(dir); PrintAutomaton(init & bad, dir, "initXbad"); } throw ARMCException.InitialPropertyViolation(); } }