private void checktime(int count) { Thread.Sleep(1000); string now = DateTime.Now.ToString("yyyy-MM-dd"); MyConfig con = new MyConfig(); string oldtime = con.GetValue("time"); if(oldtime.Equals("")) { con.SetValue("time", now); return; } DateTime told = DateTime.Parse(oldtime); DateTime tnow = DateTime.Parse(now); System.TimeSpan t3 =tnow - told ; if (t3.TotalDays > 30 ) { con.SetValue("time", now); Pyworks pw = new Pyworks(); string pass = pw.work("..\\pyscript\\makepass " + count.ToString()); MessageBox.Show("Passwd Timeout" + pass, "WARNING", MessageBoxButton.OK); } }
private void change_Click(object sender, RoutedEventArgs e) { if(Srctext.Text == "") { MessageBox.Show("path is empty"); return; } Pyworks pw = new Pyworks(Srctext.Text); string result = pw.work(); Destext.Text = result; }
private void RefreshTree() { Pyworks pw = new Pyworks(); for(int i = 0 ; i < argpath.Length; i++) { string para = pypath + argpath[i]; string filename = pw.work(para); AddTreeNode(i, filename); } }
private void change_Click(object sender, RoutedEventArgs e) { Pyworks pw = new Pyworks(Srctext.Text); string result = pw.work(); Destext.Text = result; }