public override int GetHashCode() { unchecked { var hashCode = 13; hashCode = (hashCode * 397) ^ MyNum; var myStrHashCode = !string.IsNullOrEmpty(MyStr) ? MyStr.GetHashCode() : 0; hashCode = (hashCode * 397) ^ myStrHashCode; hashCode = (hashCode * 397) ^ Time.GetHashCode(); return(hashCode); } }
/// <summary>localtimeに関する基本的な試験</summary> static private void localtime_test() { Console.WriteLine("{0}", DateTime.Today); Console.WriteLine("基準時間の表示"); Console.WriteLine("UTC_string:{0}", MyStr.UnixEpoch_UTC.ToString()); // 1970/01/01 0:00:00 Console.WriteLine("UTC_ToUniversalTime:{0}", MyStr.UnixEpoch_UTC.ToUniversalTime()); // 1970/01/01 0:00:00 Console.WriteLine("UTC_ToLocalTime:{0}", MyStr.UnixEpoch_UTC.ToLocalTime()); // 1970/01/01 0:00:00 Console.WriteLine("Local_string:{0}", MyStr.UnixEpoch_Local.ToString()); // 1970/01/01 0:00:00 Console.WriteLine("Local_ToUniversalTime:{0}", MyStr.UnixEpoch_Local.ToUniversalTime()); // 1970/01/01 0:00:00 Console.WriteLine("Local_ToLocalTime:{0}", MyStr.UnixEpoch_Local.ToLocalTime()); // 1970/01/01 0:00:00 Console.WriteLine("現在時刻の表示"); Console.WriteLine("unixtime_ToLocalTime(long):{0}", DateTime.Now.ToLocalTime().ToString()); // 2013/08/09 13:24:21 Console.WriteLine("unixtime_ToLocalTime(short):{0}", DateTime.Now.ToLocalTime().ToShortTimeString()); // 13:24 Console.WriteLine("unixtime1:{0}", MyStr.str2unixtime("2013-7-17 14:16:00")); // Console.WriteLine("unixtime2:{0}", MyStr.str2unixtime("2013/7/17 14:16:00")); // Console.WriteLine("unixtime-now:{0}", MyStr.unixtime_now().ToString()); // }
private void timer2_Tick(object sender, EventArgs e) { string tempo; int contador; string MyStr; //PREPARA PEDIDO for (int i = 0; i < listBox3.Items.Count; i++) { //pego o pedido MyStr = listBox3.Items[i].ToString(); Console.WriteLine(MyStr.Trim()); //splito string[] line = MyStr.Split('>'); contador = Convert.ToInt32(line[1]) - 1; if (contador == 1) { listBox3.Items.Remove(MyStr.Trim()); listBox4.Items.Add(line[0].Trim());// + " > " + contador); OrdenaEntrega(); } else { listBox3.Items.Remove(MyStr.Trim()); listBox3.Items.Add(line[0].Trim() + " > " + contador); contador = 1; } } //OrdenaCozinha(); }