public static void Run(Google.Voice.GoogleVoice c)
 {
     timer.Interval = 45000;
     timer.Tick    += new EventHandler(HandleEvents);
     googleVoice    = c;
     timer.Enabled  = true;
     timer.Start();
 }
Beispiel #2
0
        public void FireCurrentEvents(Google.Voice.GoogleVoice c, TimeSpan withinPastTimeFrame)
        {
            DateTime since = DateTime.Now.Subtract(withinPastTimeFrame);

            foreach (GoogleVoiceEventArgs e in Items)
            {
                if (e.Time <= since && e.Handled == false)
                {
                    e.Handle(c);
                }
            }
        }
Beispiel #3
0
        internal void Handle(Google.Voice.GoogleVoice c)
        {
            Handled = true;

            if (type == VoiceEventType.Call)
            {
                c.Call(ContactPhoneNumber, OutgoingPhoneNumber);
            }
            else if (type == VoiceEventType.SMS)
            {
                //c.SMS(c.GoogleNumber.ToString(), "Sending SMS to " + contactName + ": " + TextMessage);
                c.SMS(ContactPhoneNumber, TextMessage);
            }
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            GoogleVoice = new Google.Voice.GoogleVoice();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            if (args.Length == 0)
            {
                LoginForm = new FormLogin();
                Application.Run(LoginForm);
            }
            else
            {
                CLIRUnner cli    = new CLIRUnner();
                var       result = Parser.Default.ParseArguments <Options, testRailOptions>(args)
                                   .WithParsed <testRailOptions>(options => cli.runTestRail(options))
                                   .WithParsed <Options>(options => cli.runCLIMode(options))
                                   .WithNotParsed(errors => System.Console.WriteLine(errors.ToString()));
            }
        }