Esempio n. 1
0
        // return from wordcount db

        public int Return_WordCount(string dbFile, string word, string TableName = "WordCount")  // return db entry for word, returns # of times word logged into wordcounter
        {
            _Database.SQLite sqlite = new _Database.SQLite();
            int Value = sqlite.ReturnInt(dbFile, "select wCount from [" + TableName + "] where word = '" + word + "'");
            //ahk.MsgBox(Value.ToString());
            return Value;
        }
Esempio n. 2
0
        //    public string Generate_TabPage_Code_List(string ProjectFile = "")  // CodeGen: Create TabPage List Function (Populated) To Insert Into Project
        //{
        //    if (ProjectFile == "") { ProjectFile = @"C:\Users\jason\Google Drive\IMDB\SQLiter\NPAD\NPAD.cs"; }
        //    List<string> TabPages = code.ProjectFile_ControlList(ProjectFile, "TABPAGE");

        //    string Code = "public List<TabPage> TabPageList()  // returns list of TabPages to reference throughout project" + Environment.NewLine + "{" + Environment.NewLine;
        //    Code = Code + "\t\t" + "List<TabPage> TabList = new List<TabPage>();" + Environment.NewLine;

        //    foreach (string Tab in TabPages)
        //    {
        //        Code = Code + "\t\t" + "TabList.Add(" + Tab + ");" + Environment.NewLine;
        //    }

        //    Code = Code + "\t\treturn TabList;" + Environment.NewLine + "\t}";

        //    return Code;
        //}

        //    public TabPage Next_Available_TabPage(TabControl tc, string ProjectFile = "", List<TabPage> TabList = null)  // use list of tabs (auto generated code from dev dll) to find next available tab page control
        //    {
        //        if (TabList == null && ProjectFile != "")
        //        {
        //            TabList = TabPageList();
        //        }

        //        foreach (TabPage tp in TabList)
        //        {
        //            int IndexOfTabPage = tc.TabPages.IndexOf(tp);
        //            if (IndexOfTabPage == -1) { return tp; }  // -1 means not created yet - free to use
        //        }

        //        return null;
        //    }

        //    public TabPage TabPage_From_IndexId(TabControl tc, int IndexId, List<TabPage> TabList = null)  // use list of tabs (auto generated code from dev dll) to find next available tab page control
        //    {
        //        if (TabList == null)
        //        {
        //            TabList = TabPageList();  // return list of tab pages from local function
        //        }

        //        if (TabList != null)
        //        {
        //            foreach (TabPage Tab in TabList)
        //            {
        //                int IndexOfTabPage = tc.TabPages.IndexOf(Tab);
        //                if (IndexOfTabPage == IndexId)
        //                { return Tab; }
        //            }
        //        }

        //        return null;
        //    }

        //    public List<TabPage> TabPageList()  // PLACE HOLDER FOR CODEGEN CODE
        //    {
        //        ahk.MsgBox("Need to Populate First With CodeGen.");
        //        return null;
        //    }

        #endregion

        #region === Save / Load Tab Index ===

        /// <summary>Store the selected index for the tab control to SettingsDb</summary>
        /// <param name="tc">TabControl Name</param>
        public void Save_Last_Tab(TabControl tc, bool LoadOnStartupEnabled = true)
        {
            _Database.SQLite sqlite = new _Database.SQLite();
            _AHK             ahk    = new _AHK();

            sqlite.Setting_Save(tc.Name + "_LastTab", tc.SelectedIndex.ToString(), LoadOnStartupEnabled.ToString(), ahk.AppDir() + "\\Settings.sqlite");
        }
Esempio n. 3
0
        public void Create_WordCount_Table(string dbFile, string TableName = "WordCount", bool DropPrevious = false)  // create sqlite table with WordCount columns
        {
            _Database.SQLite sqlite = new _Database.SQLite();
            string NewTableLine = "ID INTEGER PRIMARY KEY, flagged BOOL, FilePath VARCHAR, Word VARCHAR, wCount VARCHAR";

            sqlite.Table_New(dbFile, TableName, NewTableLine, DropPrevious);
        }
Esempio n. 4
0
            public DataTable Return_DataTable_From_PrnChill(string DbFile)
            {
                _Database.SQLite sqlite      = new _Database.SQLite();
                string           SelectLine  = "Select [PostName], [PostURL], [Links], [DateAdded], [LinkCheckDate], [InCollection], [ImageDir] From [PrnChill]";
                DataTable        ReturnTable = sqlite.GetDataTable(DbFile, SelectLine);

                return(ReturnTable);
            }
Esempio n. 5
0
        // wordlist sqlite

        public bool Update_WordCount(string DbFile, string FilePath = "", string Word = "", string wCount = "", string TableName = "WordCount")  // update a wordcount entry with new word count value
        {
            _Database.SQLite sqlite = new _Database.SQLite();
            string UpdateLine = "Update [" + TableName + "] set FilePath = '" + FilePath + "', Word = '" + Word + "', wCount = '" + wCount + "' WHERE Word = '" + Word + "'";
            bool Updated = sqlite.Execute(DbFile, UpdateLine);
            if (GlobalDebug) { ahk.MsgBox("Updated [WordCount] = " + Updated.ToString()); }
            return Updated;
        }
Esempio n. 6
0
 public bool Insert_Into_WordCount(string DbFile, string FilePath = "", string Word = "", string wCount = "", string TableName = "WordCount")  // insert new word into wordcount table
 {
     _Database.SQLite sqlite = new _Database.SQLite();
     string InsertLine = "Insert Into [" + TableName + "] (FilePath, Word, wCount) values ('" + FilePath + "', '" + Word + "', '" + wCount + "')";
     bool Inserted = sqlite.Execute(DbFile, InsertLine);
     if (GlobalDebug) { ahk.MsgBox("Inserted Into [WordCount] = " + Inserted.ToString()); }
     return Inserted;
 }
Esempio n. 7
0
            public DataTable Return_PrnChill_DataTable(string DbFile = "", string TableName = "PrnChill", string WhereClause = "", bool Debug = false)
            {
                _Database.SQLite sqlite = new _Database.SQLite();
                _AHK             ahk    = new _AHK();

                if (DbFile == "")
                {
                    DbFile = ahk.AppDir() + @"\Db\PrnChill.sqlite";
                }
                string SelectLine = "Select * From [PrnChill]";

                if (WhereClause != "")
                {
                    if (WhereClause.ToUpper().Contains("WHERE"))
                    {
                        SelectLine = SelectLine + " " + WhereClause;
                    }
                    if (!WhereClause.ToUpper().Contains("WHERE"))
                    {
                        SelectLine = SelectLine + " WHERE " + WhereClause;
                    }
                }

                DataTable ReturnTable = sqlite.GetDataTable(DbFile, SelectLine);


                DataTable table = new DataTable();

                table.Columns.Add("PostName", typeof(string));
                table.Columns.Add("PostURL", typeof(string));
                table.Columns.Add("Links", typeof(string));
                table.Columns.Add("DateAdded", typeof(string));
                table.Columns.Add("LinkCheckDate", typeof(string));
                table.Columns.Add("InCollection", typeof(string));
                table.Columns.Add("ImageDir", typeof(string));

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        PrnChill returnObject = new PrnChill();

                        returnObject.PostName      = ret["PostName"].ToString();
                        returnObject.PostURL       = ret["PostURL"].ToString();
                        returnObject.Links         = ret["Links"].ToString();
                        returnObject.DateAdded     = ret["DateAdded"].ToString();
                        returnObject.LinkCheckDate = ret["LinkCheckDate"].ToString();
                        returnObject.InCollection  = ret["InCollection"].ToString();
                        returnObject.ImageDir      = ret["ImageDir"].ToString();

                        table.Rows.Add(returnObject.PostName, returnObject.PostURL, returnObject.Links, returnObject.DateAdded, returnObject.LinkCheckDate, returnObject.InCollection, returnObject.ImageDir);
                    }
                }

                return(table);
            }
Esempio n. 8
0
            public List <PrnChill> Return_PrnChill_List(string WhereClause = "", string DbFile = "", string TableName = "[PrnChill]")
            {
                _Database.SQLite sqlite = new _Database.SQLite();
                _AHK             ahk    = new _AHK();

                if (DbFile == "")
                {
                    DbFile = ahk.AppDir() + @"\Db\PrnChill.sqlite";
                }
                string SelectLine = "Select * From " + TableName;

                if (WhereClause != "")
                {
                    if (WhereClause.ToUpper().Contains("WHERE"))
                    {
                        SelectLine = SelectLine + " " + WhereClause;
                    }
                    if (!WhereClause.ToUpper().Contains("WHERE"))
                    {
                        SelectLine = SelectLine + " WHERE " + WhereClause;
                    }
                }
                DataTable ReturnTable = sqlite.GetDataTable(DbFile, SelectLine);

                List <PrnChill> ReturnList = new List <PrnChill>();

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        PrnChill returnObject = new PrnChill();

                        returnObject.PostName      = ret["PostName"].ToString();
                        returnObject.PostURL       = ret["PostURL"].ToString();
                        returnObject.Links         = ret["Links"].ToString();
                        returnObject.DateAdded     = ret["DateAdded"].ToString();
                        returnObject.LinkCheckDate = ret["LinkCheckDate"].ToString();
                        returnObject.InCollection  = ret["InCollection"].ToString();
                        returnObject.ImageDir      = ret["ImageDir"].ToString();

                        ReturnList.Add(returnObject);
                    }
                }

                return(ReturnList);
            }
Esempio n. 9
0
            public bool PrnChill_Insert(PrnChill inObject, string DbFile = "")
            {
                _Database.SQLite sqlite = new _Database.SQLite();
                _AHK             ahk    = new _AHK();

                if (DbFile == "")
                {
                    DbFile = ahk.AppDir() + @"\Db\PrnChill.sqlite";
                }
                string InsertLine = "Insert Into [PrnChill] (PostName, PostURL, Links, DateAdded, LinkCheckDate, InCollection, ImageDir) values ('" + inObject.PostName + "', '" + inObject.PostURL + "', '" + inObject.Links + "', '" + inObject.DateAdded + "', '" + inObject.LinkCheckDate + "', '" + inObject.InCollection + "', '" + inObject.ImageDir + "')";
                bool   Inserted   = sqlite.Execute(DbFile, InsertLine);

                if (!Inserted)
                {
                    ahk.MsgBox("Inserted Into [PrnChill] = " + Inserted.ToString());
                }
                return(Inserted);
            }
Esempio n. 10
0
            public bool PrnChill_Update(PrnChill inObject, string DbFile = "")
            {
                _Database.SQLite sqlite = new _Database.SQLite();
                _AHK             ahk    = new _AHK();
                //string UpdateLine = "Update [PrnChill] set PostName = '" + inObject.PostName + "', PostURL = '" + inObject.PostURL + "', Links = '" + inObject.Links + "', DateAdded = '" + inObject.DateAdded + "', LinkCheckDate = '" + inObject.LinkCheckDate + "', InCollection = '" + inObject.InCollection + "', ImageDir = '" + inObject.ImageDir + "' WHERE [Item] = 'Value' ";
                string UpdateLine = "Update [PrnChill] set ";


                if (inObject.PostName != null)
                {
                    UpdateLine = UpdateLine + "[PostName] = '" + inObject.PostName + "',";
                }
                if (inObject.PostURL != null)
                {
                    UpdateLine = UpdateLine + "[PostURL] = '" + inObject.PostURL + "',";
                }
                if (inObject.Links != null)
                {
                    UpdateLine = UpdateLine + "[Links] = '" + inObject.Links + "',";
                }
                if (inObject.DateAdded != null)
                {
                    UpdateLine = UpdateLine + "[DateAdded] = '" + inObject.DateAdded + "',";
                }
                if (inObject.LinkCheckDate != null)
                {
                    UpdateLine = UpdateLine + "[LinkCheckDate] = '" + inObject.LinkCheckDate + "',";
                }
                if (inObject.InCollection != null)
                {
                    UpdateLine = UpdateLine + "[InCollection] = '" + inObject.InCollection + "',";
                }
                if (inObject.ImageDir != null)
                {
                    UpdateLine = UpdateLine + "[ImageDir] = '" + inObject.ImageDir + "',";
                }

                UpdateLine = ahk.TrimLast(UpdateLine, 1);
                UpdateLine = UpdateLine + " WHERE [PostName] = ' '"; // DEFINE CONDITION HERE !!!

                bool Updated = sqlite.Execute(DbFile, UpdateLine);

                return(Updated);
            }
Esempio n. 11
0
            public bool Create_Table_PrnChill(string DbFile)
            {
                _Database.SQLite sqlite       = new _Database.SQLite();
                _AHK             ahk          = new _AHK();
                string           CreateLine   = "Create Table [PrnChill] (PostName VARCHAR, PostURL VARCHAR, Links VARCHAR, DateAdded VARCHAR, LinkCheckDate VARCHAR, InCollection VARCHAR, ImageDir VARCHAR)";
                bool             TableCreated = sqlite.Table_Exists(DbFile, "PrnChill");

                if (!TableCreated)
                {
                    TableCreated = sqlite.Table_New(DbFile, "PrnChill", "Create Table [PrnChill] (PostName VARCHAR, PostURL VARCHAR, Links VARCHAR, DateAdded VARCHAR, LinkCheckDate VARCHAR, InCollection VARCHAR, ImageDir VARCHAR", false);
                }


                if (!TableCreated)
                {
                    ahk.MsgBox("[PrnChill] Created = " + TableCreated.ToString());
                }
                return(TableCreated);
            }
Esempio n. 12
0
        /// <summary>Loads last selected tab # when starting app (from Settings.sqlite table)</summary>
        /// <param name="tc">TabControl Name</param>
        public void Load_Last_Tab(TabControl tc)
        {
            _Database.SQLite sqlite = new _Database.SQLite();
            _AHK             ahk    = new _AHK();

            string LastTabIndex = sqlite.Setting(tc.Name + "_LastTab");

            // read same setting value again, this time for the option field, convert to bool response
            bool LoadLastTab = ahk.ToBool(sqlite.Setting_Value(tc.Name + "_LastTab", ahk.AppDir() + "\\Settings.sqlite", "Settings", "", true)); // check user setting to see if this option is enabled

            if (LoadLastTab)                                                                                                                     // if option enabled, read the last index position and select that tab
            {
                int lTab = ahk.ToInt(LastTabIndex);
                try
                {
                    tc.SelectedIndex = lTab;
                }
                catch { }
            }
        }
Esempio n. 13
0
            public PrnChill Return_Object_From_PrnChill(string WhereClause = "[PostName] = ''", string DbFile = "")
            {
                _Database.SQLite sqlite = new _Database.SQLite();
                _AHK             ahk    = new _AHK();

                if (DbFile == "")
                {
                    DbFile = ahk.AppDir() + @"\Db\PrnChill.sqlite";
                }
                string    SelectLine  = "Select [PostName], [PostURL], [Links], [DateAdded], [LinkCheckDate], [InCollection], [ImageDir] From [PrnChill] ";
                DataTable ReturnTable = sqlite.GetDataTable(DbFile, SelectLine);

                if (WhereClause.ToUpper().Contains("WHERE "))
                {
                    SelectLine = SelectLine + " " + WhereClause;
                }
                if (!WhereClause.ToUpper().Contains("WHERE "))
                {
                    SelectLine = SelectLine + "WHERE " + WhereClause;
                }
                PrnChill returnObject = new PrnChill();
                int      i            = 0;
                string   Value        = "";

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        returnObject.PostName      = ret["PostName"].ToString();
                        returnObject.PostURL       = ret["PostURL"].ToString();
                        returnObject.Links         = ret["Links"].ToString();
                        returnObject.DateAdded     = ret["DateAdded"].ToString();
                        returnObject.LinkCheckDate = ret["LinkCheckDate"].ToString();
                        returnObject.InCollection  = ret["InCollection"].ToString();
                        returnObject.ImageDir      = ret["ImageDir"].ToString();
                    }
                }

                return(returnObject);
            }
Esempio n. 14
0
 public void Save_AutoCompleteList(object ListValues, string ListName = "Scintilla_AutoComplete")
 {
     _Database.SQLite sqlite = new _Database.SQLite();
     sqlite.List(ListName, ListValues);
 }
Esempio n. 15
0
        private void menuScintilla_Click(object sender, EventArgs e)
        {
            RadMenuItem clicked = (RadMenuItem)sender; string txt = clicked.Text;

            if (txt == "Clear")
            {
                selectedScintilla.Text = "";
            }
            if (txt == "Fold")
            {
                selectedScintilla.Fold();
            }
            if (txt == "UnFold")
            {
                selectedScintilla.UnFold();
            }
            if (txt == "ZoomIn")
            {
                selectedScintilla.ZoomIn();
            }
            if (txt == "ZoomOut")
            {
                selectedScintilla.ZoomOut();
            }

            if (txt == "Load Keyword List")
            {
                _Database.SQLite sqlite = new _Database.SQLite();

                List <string> words = sqlite.List("Scintilla_Keywords");

                if (words.Count == 0)
                {
                    string AHKKeywords  = "a_ahkpath a_ahkversion a_appdatacommon a_appdata a_autotrim a_batchlines a_carety a_caretx a_computername a_controldelay a_dd a_cursor a_ddd a_dddd a_desktop a_defaultmousespeed a_desktopcommon a_detecthiddentext a_endchar a_detecthiddenwindows a_eventinfo a_exitreason a_formatfloat a_formatinteger a_guievent a_gui a_guicontrol a_guicontrolevent a_guiheight a_guiwidth a_guix a_hour a_guiy a_iconfile a_iconhidden a_icontip a_iconnumber a_index a_ipaddress1 a_ipaddress2 a_ipaddress3 a_isadmin a_ipaddress4 a_iscompiled a_issuspended a_language a_keydelay a_iscritical a_isunicode errorlevel a_ptrsize a_lasterror a_linefile a_loopfield a_linenumber a_loopfileattrib a_loopfiledir  a_loopfileext a_loopfileshortname a_loopfileshortpath a_loopregsubkey a_loopfiletimecreated a_loopfileshortpath a_loopfilefullpath a_loopfilename a_loopfilelongpath a_loopfilesize a_loopfilesizekb a_loopfiletimeaccessed a_loopfilesizemb a_loopfiletimemodified a_loopreadline a_loopregname a_loopregkey a_loopregtimemodified a_loopregtype a_min a_mday a_mm a_mmm a_mon a_mmmm a_mousedelay a_msec a_mydocuments a_now a_numbatchlines a_nowutc a_ostype a_osversion a_programfiles a_priorhotkey a_programs  a_programscommon a_screenwidth a_screenheight a_scriptdir a_scriptfullpath a_scriptname a_sec a_space a_startmenucommon a_startmenu a_startup a_startupcommon a_tab a_stringcasesense a_thishotkey a_thismenu a_thismenuitempos a_thismenuitem a_tickcount a_timeidle  a_timeidlephysical a_timesincepriorhotkey a_timesincethishotkey a_titlematchmodespeed a_titlematchmode a_wday a_windelay a_workingdir a_windir a_yday a_year a_yyyy a_yweek clipboard clipboardall  comspec a_ispaused a_thisfunc a_thislabel programfiles a_temp a_username FALSE TRUE";
                    string AHKKeywords2 = "Object() Array() Abs() AutoTrim Asc() ASin() ACos() ATan() BlockInput Break Catch Ceil() Chr() Click ClipWait ComObjActive() ComObjArray() ComObjConnect() ComObjCreate() ComObject() ComObjEnwrap() ComObjUnwrap() ComObjError() ComObjFlags() ComObjGet() ComObjMissing() ComObjParameter() ComObjQuery() ComObjType() ComObjValue() Continue Control ControlClick ControlFocus ControlGet ControlGetFocus ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw ControlSetText CoordMode Cos() Critical DetectHiddenText DetectHiddenWindows DllCall() Drive DriveGet DriveSpaceFree Edit Else EnvAdd EnvDiv EnvGet EnvMult EnvSet EnvSub EnvUpdate Exception() Exit ExitApp Exp() FileAppend FileCopy FileCopyDir FileCreateDir FileCreateShortcut FileDelete FileEncoding FileExist() FileInstall FileGetAttrib FileGetShortcut FileGetSize FileGetTime FileGetVersion FileMove FileMoveDir FileOpen FileRead FileReadLine FileRecycle FileRecycleEmpty FileRemoveDir FileSelectFile FileSelectFolder FileSetAttrib FileSetTime Finally Floor() Format FormatTime Func() GetKeyName() GetKeyVK() GetKeySC() GetKeyState Gosub Goto GroupActivate GroupAdd GroupClose GroupDeactivate Gui GuiControl GuiControlGet Hotkey Hotstring() if IfEqual IfNotEqual IfExist IfNotExist IfGreater IfGreaterOrEqual IfInString IfNotInString InStr() IfLess IfLessOrEqual IfMsgBox IfWinActive IfWinNotActive IfWinExist IfWinNotExist IL_Create() IL_Add() IL_Destroy() ImageSearch IniDelete IniRead IniWrite Input InputBox InStr() IsByRef() IsFunc() IsLabel() IsObject() KeyHistory KeyWait ListHotkeys ListLines ListVars LoadPicture() Log() Ln() Loop LV_Add() LV_Delete() LV_DeleteCol() LV_GetCount() LV_GetNext() LV_GetText() LV_Insert() LV_InsertCol() LV_Modify() LV_ModifyCol() LV_SetImageList() Max() Menu MenuGetHandle MenuGetName Min() Mod() MouseClick MouseClickDrag MouseGetPos MouseMove MsgBox NumGet() NumPut() ObjAddRef() ObjRelease() ObjBindMethod() ObjClone() ObjCount() ObjDelete() ObjGetAddress() ObjGetCapacity() ObjHasKey() ObjInsert() ObjInsertAt() ObjLength() ObjMaxIndex() ObjMinIndex() ObjNewEnum() ObjPop() ObjPush() ObjRemove() ObjRemoveAt() ObjSetCapacity() ObjGetBase() ObjRawGet() ObjRawSet() ObjSetBase() OnClipboardChange() OnError OnExit OnMessage() Ord() OutputDebug Pause PixelGetColor PixelSearch PostMessage Process Progress Random RegExMatch() RegExReplace() RegDelete RegRead RegWrite RegisterCallback() Reload Return Round() Run RunAs RunWait SB_SetIcon() SB_SetParts() SB_SetText() Send SendRaw SendInput SendPlay SendEvent SendLevel SendMessage SendMode SetBatchLines SetCapsLockState SetControlDelay SetDefaultMouseSpeed SetEnv SetFormat SetKeyDelay SetMouseDelay SetNumLockState SetScrollLockState SetRegView SetStoreCapsLockMode SetTimer SetTitleMatchMode SetWinDelay SetWorkingDir Shutdown Sin() Sleep Sort SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet SoundSetWaveVolume SplashImage SplashTextOn SplashTextOff SplitPath Sqrt() StatusBarGetText StatusBarWait StrPut() StrGet() StringCaseSense StringGetPos InStr() StringLeft StringLen StrLen() StringLower StringMid SubStr() StringReplace StrReplace() StringRight StringSplit StrSplit() StringTrimLeft StringTrimRight StringUpper Suspend SysGet Tan() Thread Throw ToolTip Transform TrayTip Trim() LTrim() RTrim() Try TV_Add() TV_Delete() TV_Get() TV_GetChild() TV_GetCount() TV_GetNext() TV_GetParent() TV_GetPrev() TV_GetSelection() TV_GetText() TV_Modify() TV_SetImageList() Until UrlDownloadToFile VarSetCapacity() While WinActivate WinActivateBottom WinActive() WinClose WinExist() WinGetActiveStats WinGetActiveTitle WinGetClass WinGet WinGetPos WinGetText WinGetTitle WinHide WinKill WinMaximize WinMenuSelectItem WinMinimize WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet WinSetTitle WinShow WinWait WinWaitActive WinWaitClose WinWaitNotActive #ClipboardTimeout #CommentFlag #Delimiter #DerefChar #ErrorStdOut #EscapeChar #HotkeyInterval #HotkeyModifierTimeout #Hotstring #If #IfTimeout #IfWinActive #IfWinNotActive #IfWinExist #IfWinNotExist #Include #IncludeAgain #InputLevel #InstallKeybdHook #InstallMouseHook #KeyHistory #LTrim #MaxHotkeysPerInterval #MaxMem #MaxThreads #MaxThreadsBuffer #MaxThreadsPerHotkey #MenuMaskKey #NoEnv #NoTrayIcon #Persistent #SingleInstance #UseHook #Warn #WinActivateForce";
                    scintilla1.Text = AHKKeywords + " " + AHKKeywords2;
                }
                else
                {
                    _Lists lst = new _Lists();
                    scintilla1.Text = lst.List_To_String(words, " ");
                }
            }
            if (txt == "Save Keyword List")
            {
                //string AHKKeywords = "a_ahkpath a_ahkversion a_appdatacommon a_appdata a_autotrim a_batchlines a_carety a_caretx a_computername a_controldelay a_dd a_cursor a_ddd a_dddd a_desktop a_defaultmousespeed a_desktopcommon a_detecthiddentext a_endchar a_detecthiddenwindows a_eventinfo a_exitreason a_formatfloat a_formatinteger a_guievent a_gui a_guicontrol a_guicontrolevent a_guiheight a_guiwidth a_guix a_hour a_guiy a_iconfile a_iconhidden a_icontip a_iconnumber a_index a_ipaddress1 a_ipaddress2 a_ipaddress3 a_isadmin a_ipaddress4 a_iscompiled a_issuspended a_language a_keydelay a_iscritical a_isunicode errorlevel a_ptrsize a_lasterror a_linefile a_loopfield a_linenumber a_loopfileattrib a_loopfiledir  a_loopfileext a_loopfileshortname a_loopfileshortpath a_loopregsubkey a_loopfiletimecreated a_loopfileshortpath a_loopfilefullpath a_loopfilename a_loopfilelongpath a_loopfilesize a_loopfilesizekb a_loopfiletimeaccessed a_loopfilesizemb a_loopfiletimemodified a_loopreadline a_loopregname a_loopregkey a_loopregtimemodified a_loopregtype a_min a_mday a_mm a_mmm a_mon a_mmmm a_mousedelay a_msec a_mydocuments a_now a_numbatchlines a_nowutc a_ostype a_osversion a_programfiles a_priorhotkey a_programs  a_programscommon a_screenwidth a_screenheight a_scriptdir a_scriptfullpath a_scriptname a_sec a_space a_startmenucommon a_startmenu a_startup a_startupcommon a_tab a_stringcasesense a_thishotkey a_thismenu a_thismenuitempos a_thismenuitem a_tickcount a_timeidle  a_timeidlephysical a_timesincepriorhotkey a_timesincethishotkey a_titlematchmodespeed a_titlematchmode a_wday a_windelay a_workingdir a_windir a_yday a_year a_yyyy a_yweek clipboard clipboardall  comspec a_ispaused a_thisfunc a_thislabel programfiles a_temp a_username FALSE TRUE";
                //string AHKKeywords2 = "Object() Array() Abs() AutoTrim Asc() ASin() ACos() ATan() BlockInput Break Catch Ceil() Chr() Click ClipWait ComObjActive() ComObjArray() ComObjConnect() ComObjCreate() ComObject() ComObjEnwrap() ComObjUnwrap() ComObjError() ComObjFlags() ComObjGet() ComObjMissing() ComObjParameter() ComObjQuery() ComObjType() ComObjValue() Continue Control ControlClick ControlFocus ControlGet ControlGetFocus ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw ControlSetText CoordMode Cos() Critical DetectHiddenText DetectHiddenWindows DllCall() Drive DriveGet DriveSpaceFree Edit Else EnvAdd EnvDiv EnvGet EnvMult EnvSet EnvSub EnvUpdate Exception() Exit ExitApp Exp() FileAppend FileCopy FileCopyDir FileCreateDir FileCreateShortcut FileDelete FileEncoding FileExist() FileInstall FileGetAttrib FileGetShortcut FileGetSize FileGetTime FileGetVersion FileMove FileMoveDir FileOpen FileRead FileReadLine FileRecycle FileRecycleEmpty FileRemoveDir FileSelectFile FileSelectFolder FileSetAttrib FileSetTime Finally Floor() Format FormatTime Func() GetKeyName() GetKeyVK() GetKeySC() GetKeyState Gosub Goto GroupActivate GroupAdd GroupClose GroupDeactivate Gui GuiControl GuiControlGet Hotkey Hotstring() if IfEqual IfNotEqual IfExist IfNotExist IfGreater IfGreaterOrEqual IfInString IfNotInString InStr() IfLess IfLessOrEqual IfMsgBox IfWinActive IfWinNotActive IfWinExist IfWinNotExist IL_Create() IL_Add() IL_Destroy() ImageSearch IniDelete IniRead IniWrite Input InputBox InStr() IsByRef() IsFunc() IsLabel() IsObject() KeyHistory KeyWait ListHotkeys ListLines ListVars LoadPicture() Log() Ln() Loop LV_Add() LV_Delete() LV_DeleteCol() LV_GetCount() LV_GetNext() LV_GetText() LV_Insert() LV_InsertCol() LV_Modify() LV_ModifyCol() LV_SetImageList() Max() Menu MenuGetHandle MenuGetName Min() Mod() MouseClick MouseClickDrag MouseGetPos MouseMove MsgBox NumGet() NumPut() ObjAddRef() ObjRelease() ObjBindMethod() ObjClone() ObjCount() ObjDelete() ObjGetAddress() ObjGetCapacity() ObjHasKey() ObjInsert() ObjInsertAt() ObjLength() ObjMaxIndex() ObjMinIndex() ObjNewEnum() ObjPop() ObjPush() ObjRemove() ObjRemoveAt() ObjSetCapacity() ObjGetBase() ObjRawGet() ObjRawSet() ObjSetBase() OnClipboardChange() OnError OnExit OnMessage() Ord() OutputDebug Pause PixelGetColor PixelSearch PostMessage Process Progress Random RegExMatch() RegExReplace() RegDelete RegRead RegWrite RegisterCallback() Reload Return Round() Run RunAs RunWait SB_SetIcon() SB_SetParts() SB_SetText() Send SendRaw SendInput SendPlay SendEvent SendLevel SendMessage SendMode SetBatchLines SetCapsLockState SetControlDelay SetDefaultMouseSpeed SetEnv SetFormat SetKeyDelay SetMouseDelay SetNumLockState SetScrollLockState SetRegView SetStoreCapsLockMode SetTimer SetTitleMatchMode SetWinDelay SetWorkingDir Shutdown Sin() Sleep Sort SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet SoundSetWaveVolume SplashImage SplashTextOn SplashTextOff SplitPath Sqrt() StatusBarGetText StatusBarWait StrPut() StrGet() StringCaseSense StringGetPos InStr() StringLeft StringLen StrLen() StringLower StringMid SubStr() StringReplace StrReplace() StringRight StringSplit StrSplit() StringTrimLeft StringTrimRight StringUpper Suspend SysGet Tan() Thread Throw ToolTip Transform TrayTip Trim() LTrim() RTrim() Try TV_Add() TV_Delete() TV_Get() TV_GetChild() TV_GetCount() TV_GetNext() TV_GetParent() TV_GetPrev() TV_GetSelection() TV_GetText() TV_Modify() TV_SetImageList() Until UrlDownloadToFile VarSetCapacity() While WinActivate WinActivateBottom WinActive() WinClose WinExist() WinGetActiveStats WinGetActiveTitle WinGetClass WinGet WinGetPos WinGetText WinGetTitle WinHide WinKill WinMaximize WinMenuSelectItem WinMinimize WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet WinSetTitle WinShow WinWait WinWaitActive WinWaitClose WinWaitNotActive #ClipboardTimeout #CommentFlag #Delimiter #DerefChar #ErrorStdOut #EscapeChar #HotkeyInterval #HotkeyModifierTimeout #Hotstring #If #IfTimeout #IfWinActive #IfWinNotActive #IfWinExist #IfWinNotExist #Include #IncludeAgain #InputLevel #InstallKeybdHook #InstallMouseHook #KeyHistory #LTrim #MaxHotkeysPerInterval #MaxMem #MaxThreads #MaxThreadsBuffer #MaxThreadsPerHotkey #MenuMaskKey #NoEnv #NoTrayIcon #Persistent #SingleInstance #UseHook #Warn #WinActivateForce";

                _Database.SQLite sqlite = new _Database.SQLite();
                sqlite.List("Scintilla_Keywords", scintilla1.Text);
            }
            if (txt == "Apply Keyword List")
            {
                selectedScintilla.SetKeywords(0, scintilla1.Text);
            }


            if (txt == "Load AutoComplete List")
            {
                _ScintillaControl sci = new _ScintillaControl();
                //_Database.SQLite sqlite = new _Database.SQLite();

                List <string> words = sci.Return_AutoCompleteList("Scintilla_AutoComplete");

                if (words.Count == 0)
                {
                    string AHKKeywords  = "a_ahkpath a_ahkversion a_appdatacommon a_appdata a_autotrim a_batchlines a_carety a_caretx a_computername a_controldelay a_dd a_cursor a_ddd a_dddd a_desktop a_defaultmousespeed a_desktopcommon a_detecthiddentext a_endchar a_detecthiddenwindows a_eventinfo a_exitreason a_formatfloat a_formatinteger a_guievent a_gui a_guicontrol a_guicontrolevent a_guiheight a_guiwidth a_guix a_hour a_guiy a_iconfile a_iconhidden a_icontip a_iconnumber a_index a_ipaddress1 a_ipaddress2 a_ipaddress3 a_isadmin a_ipaddress4 a_iscompiled a_issuspended a_language a_keydelay a_iscritical a_isunicode errorlevel a_ptrsize a_lasterror a_linefile a_loopfield a_linenumber a_loopfileattrib a_loopfiledir  a_loopfileext a_loopfileshortname a_loopfileshortpath a_loopregsubkey a_loopfiletimecreated a_loopfileshortpath a_loopfilefullpath a_loopfilename a_loopfilelongpath a_loopfilesize a_loopfilesizekb a_loopfiletimeaccessed a_loopfilesizemb a_loopfiletimemodified a_loopreadline a_loopregname a_loopregkey a_loopregtimemodified a_loopregtype a_min a_mday a_mm a_mmm a_mon a_mmmm a_mousedelay a_msec a_mydocuments a_now a_numbatchlines a_nowutc a_ostype a_osversion a_programfiles a_priorhotkey a_programs  a_programscommon a_screenwidth a_screenheight a_scriptdir a_scriptfullpath a_scriptname a_sec a_space a_startmenucommon a_startmenu a_startup a_startupcommon a_tab a_stringcasesense a_thishotkey a_thismenu a_thismenuitempos a_thismenuitem a_tickcount a_timeidle  a_timeidlephysical a_timesincepriorhotkey a_timesincethishotkey a_titlematchmodespeed a_titlematchmode a_wday a_windelay a_workingdir a_windir a_yday a_year a_yyyy a_yweek clipboard clipboardall  comspec a_ispaused a_thisfunc a_thislabel programfiles a_temp a_username FALSE TRUE";
                    string AHKKeywords2 = "Object() Array() Abs() AutoTrim Asc() ASin() ACos() ATan() BlockInput Break Catch Ceil() Chr() Click ClipWait ComObjActive() ComObjArray() ComObjConnect() ComObjCreate() ComObject() ComObjEnwrap() ComObjUnwrap() ComObjError() ComObjFlags() ComObjGet() ComObjMissing() ComObjParameter() ComObjQuery() ComObjType() ComObjValue() Continue Control ControlClick ControlFocus ControlGet ControlGetFocus ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw ControlSetText CoordMode Cos() Critical DetectHiddenText DetectHiddenWindows DllCall() Drive DriveGet DriveSpaceFree Edit Else EnvAdd EnvDiv EnvGet EnvMult EnvSet EnvSub EnvUpdate Exception() Exit ExitApp Exp() FileAppend FileCopy FileCopyDir FileCreateDir FileCreateShortcut FileDelete FileEncoding FileExist() FileInstall FileGetAttrib FileGetShortcut FileGetSize FileGetTime FileGetVersion FileMove FileMoveDir FileOpen FileRead FileReadLine FileRecycle FileRecycleEmpty FileRemoveDir FileSelectFile FileSelectFolder FileSetAttrib FileSetTime Finally Floor() Format FormatTime Func() GetKeyName() GetKeyVK() GetKeySC() GetKeyState Gosub Goto GroupActivate GroupAdd GroupClose GroupDeactivate Gui GuiControl GuiControlGet Hotkey Hotstring() if IfEqual IfNotEqual IfExist IfNotExist IfGreater IfGreaterOrEqual IfInString IfNotInString InStr() IfLess IfLessOrEqual IfMsgBox IfWinActive IfWinNotActive IfWinExist IfWinNotExist IL_Create() IL_Add() IL_Destroy() ImageSearch IniDelete IniRead IniWrite Input InputBox InStr() IsByRef() IsFunc() IsLabel() IsObject() KeyHistory KeyWait ListHotkeys ListLines ListVars LoadPicture() Log() Ln() Loop LV_Add() LV_Delete() LV_DeleteCol() LV_GetCount() LV_GetNext() LV_GetText() LV_Insert() LV_InsertCol() LV_Modify() LV_ModifyCol() LV_SetImageList() Max() Menu MenuGetHandle MenuGetName Min() Mod() MouseClick MouseClickDrag MouseGetPos MouseMove MsgBox NumGet() NumPut() ObjAddRef() ObjRelease() ObjBindMethod() ObjClone() ObjCount() ObjDelete() ObjGetAddress() ObjGetCapacity() ObjHasKey() ObjInsert() ObjInsertAt() ObjLength() ObjMaxIndex() ObjMinIndex() ObjNewEnum() ObjPop() ObjPush() ObjRemove() ObjRemoveAt() ObjSetCapacity() ObjGetBase() ObjRawGet() ObjRawSet() ObjSetBase() OnClipboardChange() OnError OnExit OnMessage() Ord() OutputDebug Pause PixelGetColor PixelSearch PostMessage Process Progress Random RegExMatch() RegExReplace() RegDelete RegRead RegWrite RegisterCallback() Reload Return Round() Run RunAs RunWait SB_SetIcon() SB_SetParts() SB_SetText() Send SendRaw SendInput SendPlay SendEvent SendLevel SendMessage SendMode SetBatchLines SetCapsLockState SetControlDelay SetDefaultMouseSpeed SetEnv SetFormat SetKeyDelay SetMouseDelay SetNumLockState SetScrollLockState SetRegView SetStoreCapsLockMode SetTimer SetTitleMatchMode SetWinDelay SetWorkingDir Shutdown Sin() Sleep Sort SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet SoundSetWaveVolume SplashImage SplashTextOn SplashTextOff SplitPath Sqrt() StatusBarGetText StatusBarWait StrPut() StrGet() StringCaseSense StringGetPos InStr() StringLeft StringLen StrLen() StringLower StringMid SubStr() StringReplace StrReplace() StringRight StringSplit StrSplit() StringTrimLeft StringTrimRight StringUpper Suspend SysGet Tan() Thread Throw ToolTip Transform TrayTip Trim() LTrim() RTrim() Try TV_Add() TV_Delete() TV_Get() TV_GetChild() TV_GetCount() TV_GetNext() TV_GetParent() TV_GetPrev() TV_GetSelection() TV_GetText() TV_Modify() TV_SetImageList() Until UrlDownloadToFile VarSetCapacity() While WinActivate WinActivateBottom WinActive() WinClose WinExist() WinGetActiveStats WinGetActiveTitle WinGetClass WinGet WinGetPos WinGetText WinGetTitle WinHide WinKill WinMaximize WinMenuSelectItem WinMinimize WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet WinSetTitle WinShow WinWait WinWaitActive WinWaitClose WinWaitNotActive #ClipboardTimeout #CommentFlag #Delimiter #DerefChar #ErrorStdOut #EscapeChar #HotkeyInterval #HotkeyModifierTimeout #Hotstring #If #IfTimeout #IfWinActive #IfWinNotActive #IfWinExist #IfWinNotExist #Include #IncludeAgain #InputLevel #InstallKeybdHook #InstallMouseHook #KeyHistory #LTrim #MaxHotkeysPerInterval #MaxMem #MaxThreads #MaxThreadsBuffer #MaxThreadsPerHotkey #MenuMaskKey #NoEnv #NoTrayIcon #Persistent #SingleInstance #UseHook #Warn #WinActivateForce";
                    scintilla1.Text = AHKKeywords + " " + AHKKeywords2;
                }
                else
                {
                    //_Lists lst = new _Lists();
                    scintilla1.Text = words.ToString();
                }
            }
            if (txt == "Save AutoComplete List")
            {
                _ScintillaControl sci = new _ScintillaControl();
                //string AHKKeywords = "a_ahkpath a_ahkversion a_appdatacommon a_appdata a_autotrim a_batchlines a_carety a_caretx a_computername a_controldelay a_dd a_cursor a_ddd a_dddd a_desktop a_defaultmousespeed a_desktopcommon a_detecthiddentext a_endchar a_detecthiddenwindows a_eventinfo a_exitreason a_formatfloat a_formatinteger a_guievent a_gui a_guicontrol a_guicontrolevent a_guiheight a_guiwidth a_guix a_hour a_guiy a_iconfile a_iconhidden a_icontip a_iconnumber a_index a_ipaddress1 a_ipaddress2 a_ipaddress3 a_isadmin a_ipaddress4 a_iscompiled a_issuspended a_language a_keydelay a_iscritical a_isunicode errorlevel a_ptrsize a_lasterror a_linefile a_loopfield a_linenumber a_loopfileattrib a_loopfiledir  a_loopfileext a_loopfileshortname a_loopfileshortpath a_loopregsubkey a_loopfiletimecreated a_loopfileshortpath a_loopfilefullpath a_loopfilename a_loopfilelongpath a_loopfilesize a_loopfilesizekb a_loopfiletimeaccessed a_loopfilesizemb a_loopfiletimemodified a_loopreadline a_loopregname a_loopregkey a_loopregtimemodified a_loopregtype a_min a_mday a_mm a_mmm a_mon a_mmmm a_mousedelay a_msec a_mydocuments a_now a_numbatchlines a_nowutc a_ostype a_osversion a_programfiles a_priorhotkey a_programs  a_programscommon a_screenwidth a_screenheight a_scriptdir a_scriptfullpath a_scriptname a_sec a_space a_startmenucommon a_startmenu a_startup a_startupcommon a_tab a_stringcasesense a_thishotkey a_thismenu a_thismenuitempos a_thismenuitem a_tickcount a_timeidle  a_timeidlephysical a_timesincepriorhotkey a_timesincethishotkey a_titlematchmodespeed a_titlematchmode a_wday a_windelay a_workingdir a_windir a_yday a_year a_yyyy a_yweek clipboard clipboardall  comspec a_ispaused a_thisfunc a_thislabel programfiles a_temp a_username FALSE TRUE";
                //string AHKKeywords2 = "Object() Array() Abs() AutoTrim Asc() ASin() ACos() ATan() BlockInput Break Catch Ceil() Chr() Click ClipWait ComObjActive() ComObjArray() ComObjConnect() ComObjCreate() ComObject() ComObjEnwrap() ComObjUnwrap() ComObjError() ComObjFlags() ComObjGet() ComObjMissing() ComObjParameter() ComObjQuery() ComObjType() ComObjValue() Continue Control ControlClick ControlFocus ControlGet ControlGetFocus ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw ControlSetText CoordMode Cos() Critical DetectHiddenText DetectHiddenWindows DllCall() Drive DriveGet DriveSpaceFree Edit Else EnvAdd EnvDiv EnvGet EnvMult EnvSet EnvSub EnvUpdate Exception() Exit ExitApp Exp() FileAppend FileCopy FileCopyDir FileCreateDir FileCreateShortcut FileDelete FileEncoding FileExist() FileInstall FileGetAttrib FileGetShortcut FileGetSize FileGetTime FileGetVersion FileMove FileMoveDir FileOpen FileRead FileReadLine FileRecycle FileRecycleEmpty FileRemoveDir FileSelectFile FileSelectFolder FileSetAttrib FileSetTime Finally Floor() Format FormatTime Func() GetKeyName() GetKeyVK() GetKeySC() GetKeyState Gosub Goto GroupActivate GroupAdd GroupClose GroupDeactivate Gui GuiControl GuiControlGet Hotkey Hotstring() if IfEqual IfNotEqual IfExist IfNotExist IfGreater IfGreaterOrEqual IfInString IfNotInString InStr() IfLess IfLessOrEqual IfMsgBox IfWinActive IfWinNotActive IfWinExist IfWinNotExist IL_Create() IL_Add() IL_Destroy() ImageSearch IniDelete IniRead IniWrite Input InputBox InStr() IsByRef() IsFunc() IsLabel() IsObject() KeyHistory KeyWait ListHotkeys ListLines ListVars LoadPicture() Log() Ln() Loop LV_Add() LV_Delete() LV_DeleteCol() LV_GetCount() LV_GetNext() LV_GetText() LV_Insert() LV_InsertCol() LV_Modify() LV_ModifyCol() LV_SetImageList() Max() Menu MenuGetHandle MenuGetName Min() Mod() MouseClick MouseClickDrag MouseGetPos MouseMove MsgBox NumGet() NumPut() ObjAddRef() ObjRelease() ObjBindMethod() ObjClone() ObjCount() ObjDelete() ObjGetAddress() ObjGetCapacity() ObjHasKey() ObjInsert() ObjInsertAt() ObjLength() ObjMaxIndex() ObjMinIndex() ObjNewEnum() ObjPop() ObjPush() ObjRemove() ObjRemoveAt() ObjSetCapacity() ObjGetBase() ObjRawGet() ObjRawSet() ObjSetBase() OnClipboardChange() OnError OnExit OnMessage() Ord() OutputDebug Pause PixelGetColor PixelSearch PostMessage Process Progress Random RegExMatch() RegExReplace() RegDelete RegRead RegWrite RegisterCallback() Reload Return Round() Run RunAs RunWait SB_SetIcon() SB_SetParts() SB_SetText() Send SendRaw SendInput SendPlay SendEvent SendLevel SendMessage SendMode SetBatchLines SetCapsLockState SetControlDelay SetDefaultMouseSpeed SetEnv SetFormat SetKeyDelay SetMouseDelay SetNumLockState SetScrollLockState SetRegView SetStoreCapsLockMode SetTimer SetTitleMatchMode SetWinDelay SetWorkingDir Shutdown Sin() Sleep Sort SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet SoundSetWaveVolume SplashImage SplashTextOn SplashTextOff SplitPath Sqrt() StatusBarGetText StatusBarWait StrPut() StrGet() StringCaseSense StringGetPos InStr() StringLeft StringLen StrLen() StringLower StringMid SubStr() StringReplace StrReplace() StringRight StringSplit StrSplit() StringTrimLeft StringTrimRight StringUpper Suspend SysGet Tan() Thread Throw ToolTip Transform TrayTip Trim() LTrim() RTrim() Try TV_Add() TV_Delete() TV_Get() TV_GetChild() TV_GetCount() TV_GetNext() TV_GetParent() TV_GetPrev() TV_GetSelection() TV_GetText() TV_Modify() TV_SetImageList() Until UrlDownloadToFile VarSetCapacity() While WinActivate WinActivateBottom WinActive() WinClose WinExist() WinGetActiveStats WinGetActiveTitle WinGetClass WinGet WinGetPos WinGetText WinGetTitle WinHide WinKill WinMaximize WinMenuSelectItem WinMinimize WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet WinSetTitle WinShow WinWait WinWaitActive WinWaitClose WinWaitNotActive #ClipboardTimeout #CommentFlag #Delimiter #DerefChar #ErrorStdOut #EscapeChar #HotkeyInterval #HotkeyModifierTimeout #Hotstring #If #IfTimeout #IfWinActive #IfWinNotActive #IfWinExist #IfWinNotExist #Include #IncludeAgain #InputLevel #InstallKeybdHook #InstallMouseHook #KeyHistory #LTrim #MaxHotkeysPerInterval #MaxMem #MaxThreads #MaxThreadsBuffer #MaxThreadsPerHotkey #MenuMaskKey #NoEnv #NoTrayIcon #Persistent #SingleInstance #UseHook #Warn #WinActivateForce";

                //_Database.SQLite sqlite = new _Database.SQLite();
                //sqlite.List("Scintilla_Keywords", scintilla1.Text);

                sci.Save_AutoCompleteList(scintilla1.Text);
            }
            if (txt == "Apply AutoComplete List")
            {
                _ScintillaControl sci = new _ScintillaControl();
                sci.Save_AutoCompleteList(scintilla1.Text);
                sci.Setup_AutoComplete(selectedScintilla);
            }
        }
Esempio n. 16
0
            //==== GMail =======

            #region === Email / Gmail ===

            // Send Gmail (From Gmail Account) - Can include list of file paths to add as attachments

            public bool Gmail_Coder(string Subject = "Namtrak Says Sup AGAIN?", string Body = "Mail with attachment? Maybe so...", List <string> Attachments = null, object To = null)
            {
                _AHK ahk = new _AHK();

                _Database.SQLite sqlite = new _Database.SQLite();
                _StatusBar       sb     = new _StatusBar();

                MailMessage mail       = new MailMessage();
                SmtpClient  SmtpServer = new SmtpClient("smtp.gmail.com");

                mail.From = new MailAddress("*****@*****.**");

                // default email address if nothing provided
                if (To == null)
                {
                    mail.To.Add("*****@*****.**");
                }
                else
                {
                    string VarType = To.GetType().ToString();  //determine what kind of variable was passed into function

                    // user assed in 1 email address as string
                    if (VarType == "System.String")
                    {
                        mail.To.Add(To.ToString());
                    }

                    // user passed in list of email addresses to send to
                    else if (VarType == "System.Collections.Generic.List`1[System.String]")
                    {
                        //ahk.MsgBox("String List");
                        List <string> ToList = (List <string>)To;
                        foreach (string add in ToList)
                        {
                            mail.To.Add(add);
                        }
                    }
                    else
                    {
                        ahk.MsgBox("Gmail Coder Function | Unable To Use VarType " + VarType);
                        return(false);
                    }
                }


                mail.Subject = Subject;
                mail.Body    = Body;

                if (Attachments != null && Attachments.Count > 0)
                {
                    System.Net.Mail.Attachment attachment;

                    foreach (string file in Attachments)
                    {
                        attachment = new System.Net.Mail.Attachment(file);
                        mail.Attachments.Add(attachment);
                    }
                }

                string gmailL = ConfigurationManager.AppSettings["GmailLogin"]; // read setting from app.config
                string gmailP = ConfigurationManager.AppSettings["GmailPass"];  // read setting from app.config


                //SmtpServer.EnableSsl = (SmtpServer.Port == 465);
                SmtpServer.Port        = 587;
                SmtpServer.Credentials = new System.Net.NetworkCredential(gmailL, gmailP);
                SmtpServer.EnableSsl   = true;

                try
                {
                    SmtpServer.Send(mail);
                    sb.StatusBar("Sent Gmail");
                    return(true);
                }
                catch (Exception ex)
                {
                    ahk.MsgBox(ex.ToString());
                    sb.StatusBar("ERROR SENDING GMAIL");
                    return(false);
                }
            }
Esempio n. 17
0
 public List <string> Return_AutoCompleteList(string ListName = "Scintilla_AutoComplete")
 {
     _Database.SQLite sqlite = new _Database.SQLite();
     return(sqlite.List(ListName));
 }