public Form1() { InitializeComponent(); print pr = new print(); pr.p(this); }
private void pictureBox9_Click(object sender, EventArgs e) { print s = new print(); s.Show(); this.Hide(); }
private void Button_Click(object sender, RoutedEventArgs e) { Button but = sender as Button; string content = but.Content as string; //look for count as included in button label after ( int pos = content.IndexOf('('); if (pos == -1) { pos = content.Count(); } vm.reason = content.Substring(0, pos); string message = vm.saveQCS(Barcode.Text, vm.reason); if (message != string.Empty) { Errormsg.Text = message; ErrorTxt.Visibility = Visibility.Visible; return; } print popup = new print(vm); popup.ShowDialog(); Barcode.Text = ""; Barcode.Focus(); BarcodeChars = 0; vm.BarcodeEntered = false; }
static void Main(string[] args) { delegateclass d = new delegateclass(); print p = d.PrintNumber; p += d.PrintMoney; p += d.PrintHexaDecimal; p(100000); }
static void Main(string[] args) { print add = printAdd; add(10); add = printRemove; add(10); // printAdd(10); }
static void Main(string[] args) { Printing p = new Printing(); print p1 = p.printNumber; p1 += p.printMoney; p1 += p.hexaDecimal; p1(100000); }
public ClassPrintCloseTicket(List <ClassCheck.localTypesPay> typePay, string nameTicketWindow) { pr = new print(typePay, nameTicketWindow); PrintDocument pd = new PrintDocument(); pd.PrintPage += printPage; pd.Print(); }
private void Form1_Load(object sender, EventArgs e) { string[] portnames = SerialPort.GetPortNames(); comboBox1.Items.AddRange(portnames); temp = new print(Print_temp); vlaz = new print1(Print_vlaz); tvn = new print2(Print_tvnutri); rpm = new print3(Print_rpm); dav = new print4(Print_dav); contr = new print6(Print_temp_contr); }
public ClassPrintCloseTicketG(ClassSync.ClassCloseTicket.CloseTicketG G, List <ClassSync.ClassCloseTicket.CloseTicket> C, String Head) { print p = new print(G, C); pr = p; PrintDocument pd = new PrintDocument(); pd.PrintPage += printPage; pd.Print(); }
static void Main(string[] args) { print printDel = printNumber; printDel(1000); printDel(100); Console.WriteLine(); printDel = printMoney; printDel(1000000); printDel(10000); Console.Read(); }
static void Main(string[] args) { print p1 = PrintNumber; p1(100000); p1(200); p1 = PrintMoney; p1(3000); p1(30); Console.ReadLine(); }
public void SetupPrint() { prnlab.SetZero(); prntext.SetZero(); TotalPage = 0; page = 1; //print label from listview if (selectItemPrint) { if (byPrint.Text.Equals("Label")) { // print selected label switchPrint = print.SLABEL; } else { // print select text switchPrint = print.SLIST; } ListView.SelectedListViewItemCollection getSelect = lsv.SelectedItems; multiSelecteItem.Clear(); foreach (ListViewItem item in getSelect) { multiSelecteItem.Add(item.Index); } if (multiSelecteItem.Count == 0) { // switchPrint=print.ALIST; } } else { if (byPrint.Text.Equals("Label")) { //print all lable switchPrint = print.ALABEL; } else { //print all text switchPrint = print.ALIST; } } }
static void Main(string[] args) { print p = delegate(string j) { Console.WriteLine(j); }; print del = (n) => { string st = "world"; Console.WriteLine(st); }; // Lambda statement p("Using direct Delegates"); p = new print(Program.NamedMethod); p("Using Named Method"); }
public static void Main() { A a = new A(); A a2 = new A(new print(a.print)); a.invokeDelegate(new print(printMethod)); a.invokeDelegate(new print(a.print)); for (int i = 0; i < 10; i++) { print p = new print(a.print); a.invokeDelegate(p); } if (y != 1) { System.Environment.Exit(1); } if (a.x != 12) { System.Environment.Exit(1); } System.Console.WriteLine("Delegates test successfully."); System.Environment.Exit(0); }
private void Button_Click(object sender, RoutedEventArgs e) { Button but = sender as Button; vm.reason = but.Content as string; string message = vm.saveQCS(Barcode.Text, vm.reason); if (message != string.Empty) { Errormsg.Text = message; ErrorTxt.Visibility = Visibility.Visible; return; } print popup = new print(vm); popup.ShowDialog(); Barcode.Text = ""; Barcode.Focus(); BarcodeChars = 0; vm.BarcodeEntered = false; }
private void button1_Click(object sender, EventArgs e) { print print = new print(); print.printer(id_sys, textBox1.Text, textBox2.Text, textBox6.Text, textBox5.Text, textBox3.Text); }
public void SetupPrint() { prnlab.SetZero(); prntext.SetZero(); TotalPage=0; page =1; //print label from listview if(selectItemPrint){ if(byPrint.Text.Equals("Label")){ // print selected label switchPrint=print.SLABEL; } else{ // print select text switchPrint=print.SLIST; } ListView.SelectedListViewItemCollection getSelect = lsv.SelectedItems; multiSelecteItem.Clear(); foreach ( ListViewItem item in getSelect ) { multiSelecteItem.Add(item.Index); } if(multiSelecteItem.Count==0){ // switchPrint=print.ALIST; } } else{ if(byPrint.Text.Equals("Label")){ //print all lable switchPrint=print.ALABEL; }else{ //print all text switchPrint=print.ALIST; } } }
public void PrintLabel() { SetupPrint(); switchPrint=print.NONE; }
public A(print p) { invokeDelegate(p); }
public void invokeDelegate(print p) { p(""); }
static void Main(string[] args) { Person P1 = new Person("Ali", "TL", "03300000000"); Person P2 = new Person("Hammad", "TM", "03310000000"); Person P3 = new Person("Asghar", "TM", "03320000000"); Document D1 = new Document("ABC", "XYZ"); Document D2 = new Document("ABC1", "XYZ1"); Document D3 = new Document("ABC12", "XYZ12"); Document D4 = new Document("ABC123", "XYZ123"); Event M1 = new Meeting("TS 1", P1, "Loc 1", new DateTime(2020, 07, 25, 9, 0, 0), new DateTime(2020, 07, 25, 14, 0, 0)); Trip T1 = new Trip("BS 1", "Turkey", 1036000, new DateTime(2020, 07, 28, 9, 0, 0), new DateTime(2020, 08, 02, 16, 0, 0)); T1.Add_Document(D1); T1.Add_Document(D2); T1.Add_Document(D3); T1.Add_Document(D4); GroupTrip GT1 = new GroupTrip("BS 2", "USA", 1834000, new DateTime(2020, 08, 03, 9, 0, 0), new DateTime(2020, 08, 22, 16, 0, 0)); GT1.Add_Document(D3); GT1.Add_Document(D4); GT1.Add_Person(P2); GT1.Add_Person(P3); //Event Type Indexer Indexer <Event> Events = new Indexer <Event>(); Events[0] = M1; Events[1] = T1; Events[2] = GT1; //Polymorphism //Events[0].Print_Details(); //Events[1].Print_Details(); //Events[2].Print_Details(); //Delegate print eventDelegate = new print(Event.Total_Events); eventDelegate(); User u1 = new User("Nabeel", "*****@*****.**", "123123", "User-1", "03364994623"); u1.addEvent(M1); u1.addEvent(T1); u1.addEvent(GT1); //Polymorphism and Lambda Expression u1.events.ForEach(e => e.printDetails()); }
public static void main(string[] args) { print objDel = new print(Disp); objDel(); }
/// <summary> /// This generates a number of images and saves them along with a PDF to a directory specified by the user. /// </summary> /// <param name="filePath"></param> /// <returns></returns> bool PrintResults(string filePath) { if (!filePath.EndsWith("/")) { filePath += "/"; } Console.Out.WriteLine("Saving output to: " + filePath); Image displayToSave = new Image(1024, 1024); List <string> Filepaths = new List <string>(); List <string> Descriptions = new List <string>(); //Just Trails RenderImage(ref displayToSave, true, false, true, false); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-0.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-0.png"); Descriptions.Add("Initial Conditions. Environment and Spawn"); //All Values RenderImage(ref displayToSave, true, true, true, true); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-1.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-1.png"); Descriptions.Add("Showing Environment, Trails, Spawns, and Agents"); //No Agents RenderImage(ref displayToSave, true, true, true, false); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-2.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-2.png"); Descriptions.Add("Showing Environment, Trails, and Spawns"); //No Agents or spawns RenderImage(ref displayToSave, true, true, false, false); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-3.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-3.png"); Descriptions.Add("Showing Environment and Trails"); //Just Trails RenderImage(ref displayToSave, false, true, false, false); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-4.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-4.png"); Descriptions.Add("Showing Trails"); //Position Heatmap w/ Spawns RenderHeatmap(ref displayToSave, data.PositionHeatmap); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-5.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-5.png"); Descriptions.Add("Showing Position Heatmap"); //Repair Heatmap w/ Spawns RenderHeatmap(ref displayToSave, data.RepairHeatmap); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-6.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-6.png"); Descriptions.Add("Showing Repair Heatmap"); //Aid Heatmap w/ Spawns RenderHeatmap(ref displayToSave, data.AidHeatmap); displayToSave.SaveToFile(filePath + "SimulationDisplayOutput-7.png"); Filepaths.Add(filePath + "SimulationDisplayOutput-7.png"); Descriptions.Add("Showing Aid Heatmap"); print printer = new print(); if (!printer.printfunction(Descriptions, Filepaths, filePath)) { ErrorText.CurrentErrorText.ShowErrorText("Error creating pdf", 10f); // delta time triples during sim stage compared to input stage so need to multiply the value you want by 3 return(false); } return(true); }
public void PrintLabel() { SetupPrint(); switchPrint = print.NONE; }
private void button3_Click(object sender, EventArgs e) { print print = new print(); print.printer(id_sys, textBox1.Text, textBox2.Text, dateTimePicker1.Text, dateTimePicker2.Text, textBox3.Text.Remove(0, 5)); }