This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.Dispatcher.Invoke((Action)(() => | |
| { | |
| //Code | |
| })); | |
| //OR | |
| this.Dispatcher.BeginInvoke(new Action(() => {METHOD(ARGS)})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Korisnik | |
| { | |
| public string Ime { get; set; } | |
| public string Prezime { get; set; } | |
| public int oib { get; set; } | |
| public Korisnik getShallow() | |
| { | |
| return (Korisnik)this.MemberwiseClone(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public clsDeep CreateDeepCopy(clsDeep inputcls) | |
| { | |
| MemoryStream m = new MemoryStream(); | |
| BinaryFormatter b = new BinaryFormatter(); | |
| b.Serialize(m, inputcls); | |
| m.Position = 0; | |
| return (clsDeep)b.Deserialize(m); | |
| } | |
| //USE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) | |
| //OR | |
| Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Control.Invoke: Executes on the UI thread, but calling thread waits for completion before continuing. | |
| //Control.BeginInvoke: Executes on the UI thread, and calling thread doesn't wait for completion. | |
| //Normally every BeginXXX should have a corresponding EndXXX call, usually in the callback. | |
| public void updateGuiFromWorkerThread(String message, Color color) | |
| { | |
| Invoke(new StatusEventHandler(UpdateUI), new StatusArguments(message, color)); | |
| } | |
| private void UpdateUI(StatusArguments e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO TEST_TABLE_2013 (DATUM,ID) VALUES (TO_DATE('22.05.2013 08:56:12', 'DD.MM.YYYY hh24:mi:ss'), 'ASD111') | |
| /*SELECT*/ | |
| select to_char(datum,'DD.MM.YYYY. hh24:mi:ss') dat, id, rfid, geo_d, geo_s from TEST_TABLICA_2013 order by dat desc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss") | |
| //22.05.2013 08:56:12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var t = new Thread(() => SaljiPodatke(BarCode, lastRFID, Longitude, Latitude)); | |
| t.Start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using (StreamWriter outfile = new StreamWriter("TxtFile.txt", true)) | |
| { | |
| outfile.WriteLine("Test" + Environment.NewLine + "2. row"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ComparerGeneric : IComparer<Customer> | |
| { | |
| #region IComparer<Customer> Members | |
| public int Compare(Customer x, Customer y) | |
| { | |
| return x.Name.CompareTo(y.Name); | |
| } | |
| #endregion | |
| } | |
OlderNewer