Exemplo n.º 1
0
        public void WriteSettings()
        {
            try
            {
                IniFile ini = new IniFile(TargetFile);
                ini.IniWriteValue("config", "Volume", Volume.ToString());
                ini.IniWriteValue("config", "AyahLastOpen", AyahLastOpen.ToString());
                ini.IniWriteValue("config", "SurahLastOpen", SurahLastOpen.ToString());
                ini.IniWriteValue("config", "ReciterLastOpen", ReciterLastOpen.ToString());
                ini.IniWriteValue("config", "LanguageLastOpen", LanguageLastOpen.ToString());
                ini.IniWriteValue("config", "JuzLastOpen", JuzLastOpen.ToString());
                ini.IniWriteValue("config", "UrlRecitation", UrlRecitation);

                ini.IniWriteValue("config", "VerseSize", VerseSize.ToString());
                ini.IniWriteValue("config", "ClickMode", ClickMode.ToString());
                ini.IniWriteValue("config", "PlayMode", PlayMode.ToString());
                ini.IniWriteValue("config", "isVoiceEnable", isVoiceEnable.ToString());
                ini.IniWriteValue("config", "isGestureEnable", isGestureEnable.ToString());
                ini.IniWriteValue("config", "isAutoShutdownEnable", isAutoShutdownEnable.ToString());
                ini.IniWriteValue("config", "ShutdownTime", ShutdownTime.ToString());
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Clicks the specified element selector.
 /// </summary>
 /// <param name="elementSelector">The element selector.</param>
 /// <param name="clickMode">The click mode.</param>
 /// <param name="conditions">The conditions.</param>
 public void Click(string elementSelector, ClickMode clickMode, MatchConditions conditions)
 {
     if (this.EnableRemoteExecution)
     {
         this.RemoteCommands.Add(new RemoteCommands.RemoteCommandDetails()
         {
             Name      = "Click",
             Arguments = new Dictionary <string, dynamic>()
             {
                 { "selector", elementSelector },
                 { "clickMode", clickMode.ToString() },
                 { "matchConditions", conditions.ToString() }
             }
         });
     }
     else
     {
         CurrentActionBucket.Add(() =>
         {
             var field = Provider.GetElement(elementSelector, conditions);
             field.Click(clickMode);
         });
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Clicks the specified element selector.
 /// </summary>
 /// <param name="elementSelector">The element selector.</param>
 /// <param name="clickMode">The click mode.</param>
 /// <param name="conditions">The conditions.</param>
 public void Click(string elementSelector, ClickMode clickMode, MatchConditions conditions)
 {
     if (this.EnableRemoteExecution)
     {
         this.RemoteCommands.Add(new RemoteCommands.RemoteCommandDetails()
         {
             Name = "Click",
             Arguments = new Dictionary<string, dynamic>()
             {
                 { "selector", elementSelector },
                 { "clickMode", clickMode.ToString() },
                 { "matchConditions", conditions.ToString() }
             }
         });
     }
     else
     {
         CurrentActionBucket.Add(() =>
         {
             var field = Provider.GetElement(elementSelector, conditions);
             field.Click(clickMode);
         });
     }
 }
Exemplo n.º 4
0
 public override string ToString()
 {
     return("Cursor: " + this.CursorMode.ToString() + " Click: " + ClickMode.ToString());
 }