Exemple #1
0
            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);

                }
            }
Exemple #2
0
 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; 
 }
Exemple #3
0
        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); 
            }
        }
Exemple #4
0
 private void change_Click(object sender, RoutedEventArgs e)
 {
     Pyworks pw = new Pyworks(Srctext.Text);
     string result =  pw.work();
     Destext.Text = result; 
 }