public FindPrintInfo Find(string title, PrintType printType = PrintType.Unknow, bool forceSelect = false, Date? expectedDate = null) { //if (_version == 1) // return _Find(title, printType, forceSelect, expectedDate); //else return FindPrint.Find(this, title, printType, forceSelect, expectedDate); }
public PrintProgressWindow(DataTable dt, PrintType printType, string templateFile) { InitializeComponent(); printDataTable = dt; this.printType = printType; this.templateFile = templateFile; Owner = Application.Current.MainWindow; }
public PrintNewStudentViewModel(PrintType type) { printType = type; //初始化命令 InitCommand(); //创建菜单 RefreshYuanXi(); RefreshShengFen(); RefreshZhuanYe(); }
public FrmInDangKy(PrintType printType, string ID) { InitializeComponent(); this.ID = ID.Trim(); this.printType = printType; txtInput.Text = ID.Trim(); //Chọn tabPage tương ứng để hiển thị TabPage tab1 = tabControl.TabPages[(int)printType]; tabControl.TabPages.Clear(); tabControl.TabPages.Add(tab1); }
public void Print(PrintType type) { switch (type) { case PrintType.PREVIEW: ExportService.ShowPrintPreview(); break; case PrintType.PRINT: ExportService.Print(); break; } }
public static string GetPrintType(PrintType type) { string result = String.Empty; switch (type) { case PrintType.PdfBuffer: default: result = "pdf-buffer"; break; } return(result); }
private void WriteConsoleMessage(string agent, string text, PrintType type) { BeginInvoke((MethodInvoker) delegate { int initPoint = textConsole.Text.Length; Font baseFont = textConsole.Font; if (!currentConsoleMessageRequestingAgent.Equals(agent)) { textConsole.AppendText("\r\n"); textConsole.AppendText(agent); textConsole.Select(initPoint, textConsole.Text.Length); textConsole.SelectionFont = new Font(baseFont.FontFamily, 12, FontStyle.Bold); initPoint = textConsole.Text.Length; textConsole.AppendText("\r\n\r\n"); textConsole.Select(initPoint, textConsole.Text.Length); textConsole.SelectionFont = baseFont; } initPoint = textConsole.Text.Length; textConsole.AppendText(text); textConsole.Select(initPoint, textConsole.Text.Length); switch (type) { case PrintType.NORMAL: break; case PrintType.DEBUGING: textConsole.SelectionColor = Color.Blue; break; case PrintType.WARNING: textConsole.SelectionColor = Color.Orange; break; case PrintType.ERROR: textConsole.SelectionColor = Color.Red; break; default: break; } textConsole.AppendText("\r\n"); currentConsoleMessageRequestingAgent = agent; textConsole.ScrollToCaret(); }); }
public PrintOneInfo( String name, PrintType type, PrintFrom from, bool IsDuplex, bool IsValid) : base(name) { // base(name); this.mPrintName = name; this.mPrintType = type; this.mPrintFrom = from; this.mCanDuplex = IsDuplex; this.mIsValid = false; }
/// <summary> /// Print a message to the debugger for ASP.NET Core <br /> with a specified type. /// </summary> /// <param name="type"> </param> /// <param name="data"> </param> public static void PrintDebugger(PrintType type, string data) { switch (type) { case PrintType.Error: System.Diagnostics.Debug.WriteLine("!-------------------------!"); System.Diagnostics.Debug.WriteLine($"Error: {data}"); System.Diagnostics.Debug.WriteLine("!-------------------------!"); return; case PrintType.Information: System.Diagnostics.Debug.WriteLine($"DEBUG: {data}"); return; } }
private string GetPostTypeDirectory(PrintType postType) { if (_findPrintManager.PostTypeDirectories.ContainsKey(postType)) { return(_findPrintManager.PostTypeDirectories[postType]); } else { if (__traceWarning) { Trace.WriteLine("warning directory of post type {0} is not defined use \"UndefinedPostTypeDirectory\" instead"); } return("UndefinedPostTypeDirectory"); } }
public FindPrintInfo FindPrint(string title, PrintType postType = PrintType.Unknow, bool forceSelect = false) { FindPrintInfo findPrint = null; if (Try(() => findPrint = _findPrintManager.Find(title, postType, forceSelect))) { return(findPrint); } else { return new FindPrintInfo { found = false } }; }
public string PrintpriceEstimation(PriceModel priceModel, PrintType pType) { string retString = string.Empty; try { retString = _pricingService.EstimatePrice(priceModel, pType); } catch (Exception ex) { retString = ex.Message; //Log Exception } return(retString); }
public override bool Print(PrintType type, Printer printer) { printer.Write($"{FunctionCall.Name}("); foreach (var i in FunctionCall.Parameter) { i.Print(type, printer); if (!i.Equals(FunctionCall.Parameter.Last())) { printer.Write(", "); } } printer.WriteLine(");"); return(true); }
internal static void Write(PrintType pt, string s) { ConsoleColor prev = Console.BackgroundColor; switch (pt) { case PrintType.Exception: Console.BackgroundColor = ConsoleColor.DarkRed; break; case PrintType.Child: Console.BackgroundColor = ConsoleColor.DarkBlue; break; default: break; } Console.WriteLine(s); Console.BackgroundColor = prev; }
public override bool Print(PrintType type, Printer printer) { printer.Write("{"); foreach (var i in Values) { i.Print(type, printer); if (!i.Equals(Values.Last())) { printer.Write(", "); } } printer.Write("}"); return(true); }
public override bool Print(PrintType type, Printer printer) { printer.Write("while ("); Condition.Print(type, printer); printer.WriteLine(")"); printer.WriteLine("{"); printer.Push(); foreach (var i in Body) { i.Print(PrintType.FunctionSource, printer); } printer.Pop(); printer.WriteLine("}"); return(true); }
private static GraphicsInfo AddImage(CardSide side, PrintType printType, int xOffset, int yOffset, int fillColor, ZebraCardImageI zebraCardImage) { return(new GraphicsInfo { Side = side, PrintType = printType, GraphicType = zebraCardImage != null ? GraphicType.BMP : GraphicType.NA, XOffset = xOffset, YOffset = yOffset, FillColor = fillColor, Opacity = 0, Overprint = false, GraphicData = zebraCardImage ?? null }); }
/// <summary> /// Konstruktor /// </summary> /// <param name="sheetName"></param> public Libre_LopOffListConverter(PrintType sheetName) { // Hole relevante Daten aus der Konfigurationsdatei. try { this._EMPTYLINES = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "LOPOFFLIST_EMPTYLINES")); } catch { throw new Exception("Fehler in der Konfigurationsdatei (LOPOFFLIST_EMPTYLINES)."); } if (sheetName == PrintType.LopOffList) this._SheetName = "B E R E C H T I G U N G S N A C H W E I S"; Generate(this._Filename); this.CSVReader(); this.saveFileAndOpenOO(); }
public PrintOneInfo( String name, PrintType type, PrintFrom from, String status) : base(name) { this.mPrintName = name; this.mPrintType = type; this.mPrintFrom = from; this.mStatus = status; if (String.IsNullOrEmpty(this.mStatus)) { this.mStatus = "未定义,崔兵兵"; } }
public int Print(int printTypeID, int personID, int numberOfCopies) { Person person = GetPersonById(personID); PrintType printType = PrintTypeDb.GetPrintTypeById(printTypeID); double totalPrice = printType.Price * numberOfCopies; if (person.Balance >= totalPrice) { person.Balance -= totalPrice; return(PersonDb.UpdatePersonBalance(person)); } else { return(0); } }
public void Print(ITicket ticket, PrintType printType, int ticketIndex) { switch (printType) { case PrintType.Console: ToConsole(ticket, ticketIndex); break; case PrintType.File: ToFile(ticket, ticketIndex); break; case PrintType.Output: ToOutput(ticket, ticketIndex); break; } }
public void PrintOnlyOddOrEvenItems(PrintType Print) { Node tmp = this.Head.Next; while (tmp != null) { if (Print == PrintType.Even && tmp.Value % 2 == 0) { System.Console.Write(tmp.Value + "->"); } else if (Print == PrintType.Odd && tmp.Value % 2 != 0) { System.Console.Write(tmp.Value + "->"); } tmp = tmp.Next; } }
public static void Print(PrintType type, string message) { Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.White; switch (type) { case PrintType.SUCC: Console.ForegroundColor = ConsoleColor.Magenta; Console.Write($"[SUCC]"); Console.ForegroundColor = ConsoleColor.White; break; case PrintType.ACK: Console.ForegroundColor = ConsoleColor.Blue; Console.Write($"[ACK]"); Console.ForegroundColor = ConsoleColor.White; break; case PrintType.SEND: Console.ForegroundColor = ConsoleColor.Yellow; Console.Write($"[SEND]"); Console.ForegroundColor = ConsoleColor.White; break; case PrintType.ERR: Console.BackgroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.Black; Console.Write($"[ERR]"); break; case PrintType.DISCON: Console.ForegroundColor = ConsoleColor.Red; Console.Write($"[DISCONN]"); Console.ForegroundColor = ConsoleColor.White; break; case PrintType.CONN: Console.ForegroundColor = ConsoleColor.Green; Console.Write($"[CONN]"); Console.ForegroundColor = ConsoleColor.White; break; } Console.Write($" {message}\n"); }
public void AddPrintOnClaster(int volume, PrintType typeOfPrint) { switch (typeOfPrint) { case PrintType.ASK: { this.Volume_sum += volume; this.Volume_Ask_sum += volume; } break; case PrintType.BID: { this.Volume_sum += volume; this.Volume_Bid_sum += volume; } break; } }
public static void PrintPhieu(XtraForm mainForm, PrintType CachIn, PhieuType LoaiPhieu, long[] IDs, GetPrintObj Print) { try { _Print _print = Print(mainForm, LoaiPhieu, IDs); _print.MainForm = mainForm; if (_print != null) { if (CachIn == PrintType.PREVIEW) HelpReport.Preview(_print); else if (CachIn == PrintType.DIRECT) HelpReport.Print(_print); } } catch { } }
public void PrintOddOrEven(PrintType Print) { if (Print == PrintType.Odd) { Node tmp = this.Head.Next; while (tmp != null) { System.Console.Write(tmp.Value + "->"); if (tmp.Next != null && tmp.Next.Next != null) { tmp = tmp.Next.Next; } else { tmp = null; } } } else if (Print == PrintType.Even) { Node tmp = null; if (this.Head.Next != null && this.Head.Next.Next != null) { tmp = this.Head.Next.Next; while (tmp != null) { System.Console.Write(tmp.Value + "->"); if (tmp.Next != null && tmp.Next.Next != null) { tmp = tmp.Next.Next; } else { tmp = null; } } } } else { throw new Exception("Invalid Argument"); } }
public static void Print(string message, PrintType type) { switch (type) { case PrintType.Custom: Game.PrintChat(message); break; case PrintType.Message: Game.PrintChat("<font color = \"#00E5EE\">" + message + "</font>"); break; case PrintType.Warning: Game.PrintChat("<font color = \"#FFA500\">" + message + "</font>"); break; case PrintType.Error: Game.PrintChat("<font color = \"#FF0000\">" + message + "</font>"); break; } }
/// <summary> /// Konstruktor /// </summary> /// <param name="sheetName"></param> public Libre_LopOffListConverter(PrintType sheetName) { // Hole relevante Daten aus der Konfigurationsdatei. try { this._EMPTYLINES = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "LOPOFFLIST_EMPTYLINES")); } catch { throw new Exception("Fehler in der Konfigurationsdatei (LOPOFFLIST_EMPTYLINES)."); } if (sheetName == PrintType.LopOffList) { this._SheetName = "B E R E C H T I G U N G S N A C H W E I S"; } Generate(this._Filename); this.CSVReader(); this.saveFileAndOpenOO(); }
public List <PrintType> GetAllPrintType() { List <PrintType> results = new List <PrintType>(); try { using (SqlConnection cn = new SqlConnection(connectionString)) { string query = "SELECT * FROM PrintType;"; SqlCommand cmd = new SqlCommand(query, cn); cn.Open(); using (SqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { if (results == null) { results = new List <PrintType>(); } PrintType printType = new PrintType(); printType.Id = (int)dr["IdPrintType"]; printType.Description = (string)dr["Description"]; printType.Color = (string)dr["Color"]; printType.RectoVerso = (string)dr["RectoVerso"]; printType.Price = (double)dr["Price"]; results.Add(printType); } } } } catch (Exception e) { throw e; } return(results); }
public PrintModul(PrintType dataGridInfo, dynamic detail = null) { this.dataGridInfo = dataGridInfo; PrintType ch = dataGridInfo; // Entscheide was gedruckt werden soll switch (ch) { case PrintType.Team: this.CheckCSV(); Teams teams = new Teams(detail); break; case PrintType.Sponsor: this.CheckCSV(); Sponsor sponsor = new Sponsor(detail); break; case PrintType.Client: this.CheckCSV(); Client customer = new Client(detail); break; case PrintType.LopOffList: this.CheckCSV(); LopOffList lopOff = new LopOffList(); break; case PrintType.Statistic: KöTaf.Utils.Printer.CSVExporter csv = new Utils.Printer.CSVExporter(detail); var header = csv.GetHeader(); var content = csv.GetData(); var csvFull = csv.GetCsv(); csv.Write(); try { Libre_TeSpClConverter ooConv = new Libre_TeSpClConverter(PrintType.Statistic); } catch (Exception ex) { throw ex; } break; } }
public IPrintService Create(string printType) { PrintType type = DeterminePrintType(printType); // or any place stored switch (type) { case PrintType.pdf: return(new PrintPDFService()); // resolve using di container case PrintType.file: return(new PrintToFileService()); // resolve using di container case PrintType.paper: return(new PrintToPaperService()); // resolve using di container default: return(new PrintPDFService()); } }
private static void PrintPositions(int[] positions, PrintType printType) { for (int row = 0; row < positions.Length; row++) { for (int col = 0; col < positions.Length; col++) { if (row == positions[col]) { Console.Write(printType == PrintType.Char ? $"{'H',3} " : $"{positions[col],3} "); } else { Console.Write($"{'-',3} "); } } Console.WriteLine(); } }
public static void Print(string message, PrintType printType, Exception innerException = null) { if (printType.HasFlag(PrintType.DebugWindow)) { System.Diagnostics.Debug.Print($"** SPECKY :: {message}"); } if (printType.HasFlag(PrintType.LogFile)) { throw new NotImplementedException($"{nameof(Log)}.{nameof(Print)} does not yet support {nameof(PrintType.LogFile)}"); } if (printType.HasFlag(PrintType.ThrowException)) { throw innerException == null ? throw new Exception(message) : new Exception(message, innerException); } }
private static AddProductDto FromCsvToDto(CategoryType category, CsvProduct product) { var shopColor = LamodaColorType.StringToLamodaColorType(product.Color, true); ContentPath path = new ContentPath(); var handler = new ResourceHandler(); //TODO вынести это и чтобы сразу при запуске программы все ресурсы подгрузились var lamodaColors = handler.ReadeResourceFile <LamodaColorsDeserializer>(path.LamodaColors); var printIds = product.Print.Split(",").Select(x => PrintType.StringToPrintType(x.Trim(), true).Id).ToList(); var printTypeId = printIds[0]; var extraPrintTypeId = printIds.Count >= 2 ? printIds[1] : 0; if (printIds.Count > 2) { throw new System.Exception("There are more than 2 printType"); } var result = new AddProductDto { BrandName = product.Brand, ShopColorId = shopColor.Id, ShopTypeId = 0, ColorIds = lamodaColors.Colors.First(x => x.LamodaColorType == shopColor.Id).HexColors.Select(ServerColor.ToInt).ToList(), CategoryTypeId = category.Id, Country = product.MadeInCountry, Link = product.Link, Photos = product.PhotosUrls.ToList(), Price = decimal.Parse(product.Price, CultureInfo.InvariantCulture.NumberFormat), PrintTypeId = printTypeId, ExtraPrintTypeId = extraPrintTypeId, Sizes = product.Sizes.Select(x => new SizeDto { CountryCode = x.CountryCode, IsAvailable = x.IsAvailable, OtherCountry = x.OtherCountry, RussianSize = x.RussianSize }).ToList(), VendorCode = product.VendorCode }; return(result); }
/// <summary> /// 统一消息处理 /// </summary> /// <param name="printType"></param> /// <param name="message"></param> /// <param name="exception"></param> public void PrintMsg(PrintType printType, string message, Exception exception = null) { switch (printType) { case PrintType.info: log.Debug(message); break; case PrintType.error: log.Error(message, exception); if (ErrorMessagNotice != null) { ErrorMessagNotice(exception); } break; default: break; } }
public void Print(PrintType type) { switch (type) { case PrintType.DLR: PrintDLR(Root); break; case PrintType.LDR: PrintLDR(Root); break; case PrintType.LRD: PrintLRD(Root); break; default: break; } Console.WriteLine(); }
private XmlNode _xmlnode = null; //��ǰ��_sworkUnitһ�µĽڵ� #endregion Fields #region Constructors // ͨ��workUnitName�õ����е�����Դdataitem,��ͨ��dataitem�鵽��Ӧ��sqltext,���õ�table // workUnitFileԭ���ڴ�ָ�����������ļ�������workitem.xml��Ŀǰworkitem.xml��hmsys���ݿ��������ˣ����Բ��ٿ��� // ��ʱ��workUnitNameΪ��Ԫ���ƣ�ֻ����hmsys��unititem���ҵ�workUnitName���ϼ���,Ȼ����ȡ��workUnitName��Ԫ���������� public UnitItem(string workUnitFile,string workUnitName) { if (workUnitName == "") return; this._unitFile = workUnitFile; CreateAppTable(workUnitFile,workUnitName); if (this.dtWorkUnit == null) return; DataRow[] _drnodes = this.dtWorkUnit.Select("ntype='UnitItem'"); if (_drnodes.Length == 0) return; this._drnode = _drnodes[0]; this.SetWorkUnit(workUnitName); this.WorkItemList = this.GetWorkItemList(); this.CommandItemList = this.GetCommandItemList(); this.AppendItemList = this.GetAppendItemList(); this.UnitType = this.GetWorkUnitType(); this.DataSrcFile = this.GetDataSrcFile(); this.FileEditTp = this.GetFileEditTp(); this.WorkFlow = this.GetWorkFlow(); this.FilePrnTp = this.GetFilePrintTp(); this.SaveOPType = this.GetSaveType(); this.DictColSrcFile = this.GetDictColSrcFile(); this.StFilter = this.GetShortcutFilter(); this.treeFilter = this.GetTreeFilter(); this.BillType = this.GetBillType(); this.PrintType = this.GetPrnType(); this.IsVisibleNav = this.GetVisibleNav(); }
public bool netPrintBeginningOfMacroNode(StreamWriter sw, PrintType destination, String prefix, PacketIF.PacketIFCallback callback, Object clientdata) { String s = netBeginningOfMacroNodeString(prefix); if (s == null) return true; if (destination == PrintType.PrintFile || destination == PrintType.PrintCut || destination == PrintType.PrintCPBuffer) { sw.Write(s); if (callback != null) callback(clientdata, s); } else { DXApplication.theDXApplication.getPacketIF().sendBytes(s); } return true; }
/// <summary> /// Print the stuff that belongs in a .cfg file /// </summary> /// <param name="sw"></param> /// <param name="destination"></param> /// <returns></returns> public virtual bool cfgPrintNode(StreamWriter sw, PrintType destination) { return true; }
internal static void PrintChat(string message, PrintType type) { if (type == PrintType.Error) { Game.PrintChat("<font color = \"#FF0000\">" + message + "</font>"); } else if (type == PrintType.Message) { Game.PrintChat("<font color = \"#00E5EE\">" + message + "</font>"); } else if (type == PrintType.Warning) { Game.PrintChat("<font color = \"#FFA500\">" + message + "</font>"); } else if (type == PrintType.Custom) { Game.PrintChat(message); } else Console.WriteLine("lol ur so bad lrn 2 code dumass"); }
public bool netPrintNode(StreamWriter sw, PrintType destination, String prefix, PacketIF.PacketIFCallback callback, Object clientdata) { DXPacketIF pif = DXApplication.theDXApplication.getPacketIF(); bool r = true; if (destination == PrintType.PrintFile || destination == PrintType.PrintCut || destination == PrintType.PrintCPBuffer) { if (!netPrintCommentHeader(sw)) return false; } else if (pif != null) { // We have a connection to the executive/server // // If this node has a message protocol with the executive, then // update any state associated with the protocol. if (hasModuleMessageProtocol()) updateModuleMessageProtocol(pif); prepareToSendNode(); } String s = netNodeString(prefix); if (destination == PrintType.PrintFile || destination == PrintType.PrintCut || destination == PrintType.PrintCPBuffer) { sw.Write(s); if (callback != null) callback(clientdata, s); } else { Debug.Assert(destination == PrintType.PrintExec); if (s.Length > 0) pif.sendBytes(s); } return r; }
private void PrintOnField(bool isStuck, PrintType type) { Console.SetCursorPosition(position.x, position.y); switch (direction) { case Direction.Left: for (int i = 0; i < elements.GetLength(1); i++) { for (int j = 0; j < elements.GetLength(0); j++) { if (elements[j, i]) { if (type == PrintType.RemovePart) { field[position.x + j, Console.CursorTop] = false; Console.Write(" "); } else if (isStuck) { field[position.x + elements.GetLength(0) - 1 - j, Console.CursorTop] = true; } else Console.Write("#"); } } Console.CursorTop++; Console.CursorLeft = position.x; } break; case Direction.Right: for (int i = elements.GetLength(1) - 1; i >= 0; i--) { for (int j = 0; j < elements.GetLength(0); j++) { if (elements[j, i]) { if (type == PrintType.RemovePart) { Console.Write(" "); } else if (isStuck) { field[position.x + j, Console.CursorTop] = true; } else Console.Write("#"); } else { Console.Write(" "); } } Console.CursorTop++; Console.CursorLeft = position.x; } break; case Direction.Up: for (int i = elements.GetLength(0) - 1; i >= 0; i--) { for (int j = elements.GetLength(1) - 1; j >= 0; j--) { if (elements[i, j]) { if (type == PrintType.RemovePart) { field[position.x + j, Console.CursorTop] = false; Console.Write(" "); } else if (isStuck) { field[position.x + j, Console.CursorTop] = true; } else Console.Write("#"); } else { Console.Write(" "); } } Console.CursorTop++; Console.CursorLeft = position.x; } break; case Direction.Down: for (int i = 0; i < elements.GetLength(0); i++) { for (int j = 0; j < elements.GetLength(1); j++) { if (elements[i, j]) { if (type == PrintType.RemovePart) { field[position.x + j, Console.CursorTop] = false; Console.Write(" "); } else if (isStuck) { field[position.x + j, Console.CursorTop] = true; } else Console.Write("#"); } else { Console.Write(" "); } } Console.CursorTop++; Console.CursorLeft = position.x; } break; default: break; } }
public static FindPrintInfo Find(FindPrintManager findPrintManager, string title, PrintType printType = PrintType.Unknow, bool forceSelect = false, Date? expectedDate = null) { FindPrint findPrint = new FindPrint(); findPrint._findPrintManager = findPrintManager; findPrint._sourceTitle = title; findPrint._printType = printType; findPrint._forceSelect = forceSelect; findPrint._expectedDate = expectedDate; findPrint._Find(); return findPrint.GetFindPrintInfo(); }
public static void Test_OneFindPrint(DownloadAutomateManager downloadAutomate, string title, string category = null, PrintType postType = PrintType.Unknow) { TestFindPrint testFindPrint = FindPrint(downloadAutomate, new TestPrint { title = title, category = category, postType = postType }); Trace.WriteLine(testFindPrint.zToJson()); }
// 通过workUnitName得到其中的数据源dataitem,再通过dataitem查到对应的sqltext,最后得到table // workUnitFile原用于打开指定操作集的文件名,即workitem.xml,目前workitem.xml由hmsys数据库替代,因此,可以不再考虑 // 此时,workUnitName为单元名称,只需在hmsys的unititem中找到workUnitName集合即可,然后再取出workUnitName单元的所有属性 public UnitItem(string workUnitFile,string workUnitName) { if (workUnitName == "") return; this._unitFile = workUnitFile; string strConn = DataAccRes.DefaultDataConnInfo.Value; myConnection = new SqlConnection(strConn); CreateAppTable(workUnitFile, workUnitName); if (this.dtWorkUnit == null || this.dtWorkUnit.Columns.Count < 1 || !this.dtWorkUnit.Columns.Contains("ntype")) return; DataRow[] _drnodes = this.dtWorkUnit.Select("ntype='UnitItem'"); if (_drnodes.Length == 0) return; this._drnode = _drnodes[0]; this.SetWorkUnit(workUnitName); this.WorkItemList = this.GetWorkItemList(); this.CommandItemList = this.GetCommandItemList(); this.AppendItemList = this.GetAppendItemList(); this.UnitType = this.GetWorkUnitType(); this.DataSrcFile = this.GetDataSrcFile(); this.FileEditTp = this.GetFileEditTp(); this.WorkFlow = this.GetWorkFlow(); this.FilePrnTp = this.GetFilePrintTp(); this.SaveOPType = this.GetSaveType(); this.DictColSrcFile = this.GetDictColSrcFile(); this.StFilter = this.GetShortcutFilter(); this.treeFilter = this.GetTreeFilter(); this.BillType = this.GetBillType(); this.PrintType = this.GetPrnType(); this.IsVisibleNav = this.GetVisibleNav(); }
/// <summary> /// Print parameter name/value ('name,name = value,value;') pairs. /// </summary> /// <param name="sw"></param> /// <param name="prefix"></param> /// <param name="dest"></param> /// <returns></returns> public virtual bool printValues(StreamWriter sw, String prefix, PrintType dest) { throw new Exception("Not Yet Implemented"); }
/// <summary> /// Konstuktor, hole alle relevanten Variablen-Werte aus der Konfigurationsdatei. /// </summary> /// <param name="sheetName"></param> public Libre_TeSpClConverter(PrintType sheetName){ try { this._POST_KURZ = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "CTIYCODE_SHORT").ToLower()); this._POST_LANG = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "CTIYCODE_LONG").ToLower()); this._AKTIV = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "AKTIV").ToLower()); this._GRUPPE = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "GROUP").ToLower()); this._ANR = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "ANR").ToLower()); this._GEBURTSDATUM = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "BIRTHDAY").ToLower()); this._ADRESSE = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "ADRESS").ToLower()); this._NAME = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "NAME").ToLower()); this._STREET = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "STREET").ToLower()); this._FUNKTION = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "FUNCTION").ToLower()); this._NATIONAL = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "NATIONAL").ToLower()); this._CITYNAME = Convert.ToInt32(Parser.IniParser.GetSetting("LIBRECONVERTER", "FUNCTION").ToLower()); } catch { throw new Exception("Fehler in der Konfiguarationsdatei"); } switch (sheetName) { case PrintType.Team: this.sheetName = "T E A M L I S T E"; break; case PrintType.Sponsor: this.sheetName = "S P O N S O R E N L I S T E"; break; case PrintType.Client: this.sheetName = "K U N D E N L I S T E"; break; case PrintType.Statistic: this.sheetName = "S T A T I S T I K"; break; } // Styles für die Kunden if (sheetName == PrintType.Client) { this.dicDistance.Add("PLZ", _POST_KURZ); this.dicDistance.Add("Aktiv", _AKTIV); this.dicDistance.Add("Gruppe", _GRUPPE); this.dicDistance.Add("Ausweis Nummer", _ANR); this.dicDistance.Add("Geburtsdatum", _GEBURTSDATUM); this.dicDistance.Add("Name", _NAME); this.dicDistance.Add("Nationalität", _NATIONAL); this.dicDistance.Add("Straße", _STREET); this.dicDistance.Add("Wohnort", _CITYNAME); } // Styles für die Statistik if (sheetName == PrintType.Statistic) { this.dicDistance.Add("Adresse", _ADRESSE); } // Styles für Team if (sheetName == PrintType.Team) { this.dicDistance.Add("Straße", _STREET); this.dicDistance.Add("Aktiv", _AKTIV); this.dicDistance.Add("Funktion", _FUNKTION); this.dicDistance.Add("Name", _NAME); } // Styles für Sponsor if (sheetName == PrintType.Sponsor) { this.dicDistance.Add("Name", _NAME); this.dicDistance.Add("Postleitzahl", _POST_LANG); this.dicDistance.Add("Aktiv", _AKTIV); this.dicDistance.Add("Straße",_STREET); } loadXLSFormatter(this.sheetName.ToString()); // Lese die derzeitige CSV Datei aus, und fülle Daten in XML Datei. this.CSVReader(); this.saveFileAndOpenOO(); }
/// <summary> /// 打印功能 /// </summary> /// <param name="engine">打印引擎</param> /// <param name="printer_name">打印机名称</param> /// <param name="type">打印类型</param> /// <param name="select">规格</param> /// <param name="count">打印数量</param> public void Print(Engine engine,string printer_name,PrintType type,int select,int count) { string str_size_name = string.Empty; string str_size_type = string.Empty; string str_ean13_type = string.Empty; LabelFormatDocument format = null; //先得到对应的规格号型 foreach(var data in this.m_size_data_list) { if(data.Id == select) { str_size_name = data.SizeName; str_size_type = data.SizeType; break; } } foreach(var data in this.m_ean13_data_list) { if(data.SizeName == str_size_name) { str_ean13_type = data.BarcodeType.Trim(); } } switch(type) { case PrintType.TagEAN13: case PrintType.TagCODE93: if (type == PrintType.TagEAN13) { if (str_ean13_type == string.Empty) return; format = engine.Documents.Open(this.m_tagEAN13_filename); } else { format = engine.Documents.Open(this.m_tagCODE93_filename); } format.SubStrings.SetSubString("PinMin", this.m_parntname); format.SubStrings.SetSubString("HuoHao", this.m_huohao); if (this.m_huohao.Substring(0, 1) != "L" && this.m_huohao.Substring(0, 1) != "W") //排除领带 { format.SubStrings.SetSubString("GuiGe", str_size_name); format.SubStrings.SetSubString("XingHao", str_size_type); } format.SubStrings.SetSubString("SafeData", this.m_safedata); format.SubStrings.SetSubString("StandardData", this.m_standarddata); format.SubStrings.SetSubString("JiaGe", string.Format("¥{0:F2}", Convert.ToDecimal(this.m_price))); format.SubStrings.SetSubString("ChanDi", this.m_madeplace); format.SubStrings.SetSubString("DengJi", this.m_dengji); format.SubStrings.SetSubString("ChengFeng",this.BuildMaterialDataString(str_size_name)); if (type == PrintType.TagEAN13) { format.SubStrings.SetSubString("TiaoMa", str_ean13_type); if (this.m_huohao.Substring(0, 1) != "L") format.SubStrings.SetSubString("info",string.Format("货号:{0} 规格:{1}",this.m_huohao,str_size_name)); else format.SubStrings.SetSubString("info", string.Format("货号:{0}", this.m_huohao)); } else { format.SubStrings.SetSubString("TiaoMa", this.BuildBarcode(str_size_name)); } if(this.PartName_Id == 21) { format.SubStrings.SetSubString("Colour", this.m_colordata); format.SubStrings.SetSubString("Date", string.Format("{0}年{1}月", this.Gyear, this.Gmonth)); } break; case PrintType.Wash: format = engine.Documents.Open(this.m_wash_filename); if (this.m_huohao.Substring(0, 1) != "L") { format.SubStrings.SetSubString("HuoHao", this.m_huohao); format.SubStrings.SetSubString("GuiGe", str_size_name); format.SubStrings.SetSubString("XingHao", str_size_type); format.SubStrings.SetSubString("ChengFeng", this.BuildMaterialDataString(str_size_name)); if (this.m_ptemplate) { format.SubStrings.SetSubString("Template", this.m_template_data); } } else { format.SubStrings.SetSubString("HuoHao", this.m_huohao); } break; //case PrintType.TagEAN13: // if (str_ean13_type == string.Empty) return; // format = engine.Documents.Open(this.m_tag2_filename); // format.SubStrings.SetSubString("HaoXing",string.Format("货号:{0} 规格:{1}",this.m_huohao,str_size_name)); // format.SubStrings.SetSubString("TiaoMa", str_ean13_type); // break; } format.PrintSetup.IdenticalCopiesOfLabel = Convert.ToInt32(count); format.PrintSetup.PrinterName = printer_name; format.Print(); }
protected virtual bool cfgPrintPanelComment(StreamWriter sr, PrintType dest) { throw new Exception("Not Yet Implemented"); }
public virtual bool cfgPrintPanel(StreamWriter sw, PrintType dest) { throw new Exception("Not Yet Implemented"); }
private string GetPostTypeDirectory(PrintType postType) { if (_findPrintManager.PostTypeDirectories.ContainsKey(postType)) return _findPrintManager.PostTypeDirectories[postType]; else { if (__traceWarning) Trace.WriteLine("warning directory of post type {0} is not defined use \"UndefinedPostTypeDirectory\" instead"); return "UndefinedPostTypeDirectory"; } }
public override bool cfgPrintNode(StreamWriter sw, PrintType destination) { throw new Exception("Not Yet Implemented"); return base.cfgPrintNode(sw, destination); }
public override bool printValues(StreamWriter sw, string prefix, PrintType dest) { throw new Exception("Not Yet Implemented"); return base.printValues(sw, prefix, dest); }
public bool netPrintNode(StreamWriter sw, PrintType destination, String prefix, PacketIF.PacketIFCallback callback) { return netPrintNode(sw, destination, prefix, callback, null); }
public FindPrintInfo FindPrint(string title, PrintType postType = PrintType.Unknow, bool forceSelect = false) { FindPrintInfo findPrint = null; if (Try(() => findPrint = _findPrintManager.Find(title, postType, forceSelect))) return findPrint; else return new FindPrintInfo { found = false }; }
protected virtual bool cfgPrintNode(String f, PrintType dest) { throw new Exception("not implemented yet"); }
/// <summary> /// Print the invocation of the script language Node call. /// </summary> /// <param name="sw"></param> /// <param name="destination"></param> /// <param name="prefix"></param> /// <returns></returns> public bool netPrintNode(StreamWriter sw, PrintType destination, String prefix) { return netPrintNode(sw, destination, prefix, null, null); }
protected virtual bool cfgPrintInteractorInstances(StreamWriter sw, PrintType dest) { throw new Exception("Not Yet Implemented"); }
public bool netPrintEndOfMacroNode(StreamWriter sw, PrintType destination, String prefix, PacketIF.PacketIFCallback callback, Object clientdata) { bool r = true; String s = netEndOfMacroNodeString(prefix); if (s == null) return true; if (destination == PrintType.PrintFile || destination == PrintType.PrintCut || destination == PrintType.PrintCPBuffer) { sw.Write(s); if (callback != null) callback(clientdata, s); } else { Debug.Assert(destination == PrintType.PrintExec); DXPacketIF pif = DXApplication.theDXApplication.getPacketIF(); pif.sendBytes(s); } return r; }