ToListViewItem() public method

Creates the ListViewItem for the ListView
public ToListViewItem ( ) : System.Windows.Forms.ListViewItem
return System.Windows.Forms.ListViewItem
        /// <summary>
        /// Log the new export of Matlab data
        /// Steps: 1) Check for the Server_database key
        ///        2) Add variable name to server list and logs.
        ///        3) Add to the ListView - doesn't add to ListView when editting.
        /// </summary>
        /// <param name="keySrv_Db"> The string representing the server and database</param>
        /// <param name="logInput"> The LogInput entry.</param>
        /// <param name="addToListView"> true: adds a ListViewItem to the ListView (generally true, false when editting)</param>
        public static void addLogInput(string keySrv_Db, LogInput logInput, bool addToListView)
        {
            if (!isServer_DatabasesInLogSystem(keySrv_Db))
            {
                servers_databases.Add(keySrv_Db, new List <string>()
                {
                    logInput.getKeyVariableName()
                });
            }
            else
            {
                servers_databases[keySrv_Db].Add(logInput.getKeyVariableName());
            }

            logs.Add(logInput.getKeyVariableName(), logInput);

            if (addToListView)
            {
                Log.Items.Add(logInput.ToListViewItem());
            }
        }
        static Dictionary<string, List<string>> servers_databases = new Dictionary<string,List<string>>(); //"server_database" Key

        #endregion Fields

        #region Methods

        /// <summary>
        /// Log the new export of Matlab data
        /// Steps: 1) Check for the Server_database key
        ///        2) Add variable name to server list and logs.
        ///        3) Add to the ListView - doesn't add to ListView when editting.
        /// </summary>
        /// <param name="keySrv_Db"> The string representing the server and database</param>
        /// <param name="logInput"> The LogInput entry.</param>
        /// <param name="addToListView"> true: adds a ListViewItem to the ListView (generally true, false when editting)</param>
        public static void addLogInput(string keySrv_Db, LogInput logInput, bool addToListView)
        {
            if (!isServer_DatabasesInLogSystem(keySrv_Db))
               servers_databases.Add(keySrv_Db, new List<string>() { logInput.getKeyVariableName() });
               else
               servers_databases[keySrv_Db].Add(logInput.getKeyVariableName());

               logs.Add(logInput.getKeyVariableName(), logInput);

               if(addToListView)
                Log.Items.Add(logInput.ToListViewItem());
        }