Esempio n. 1
0
 /// <summary>
 /// saves new config to /etc/default/isc-dhcp-server
 /// </summary>
 public void SaveEtcDefaultConfigFile()
 {
     if (newEtcDefaultConfig != null)
     {
         string filename = Environment.CurrentDirectory.ToString() + "/gm4d-isc-dhcp-server";
         SaveSettingsToFileDelegate saveSettingsToFileDelegate = null;
         saveSettingsToFileDelegate = new SaveSettingsToFileDelegate(writeEtcDefaultConfigFile);
         IAsyncResult saveSettingsToFileResult = saveSettingsToFileDelegate.BeginInvoke(filename, writeEtcDefaultConfigFileComplete, null);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// saves the DHCP configuration to a file
        /// </summary>
        /// <param name="filename">path and filname as string</param>
        public void SaveSettingsFile(String filename)
        {
            // create a new delegate
            SaveSettingsToFileDelegate saveSettingsToFileDelegate = null;

            // assign the writeSettingsToFile function to the delegate
            saveSettingsToFileDelegate = new SaveSettingsToFileDelegate(writeSettingsToFile);
            // assign callback function and start async process
            IAsyncResult saveSettingsToFileResult = saveSettingsToFileDelegate.BeginInvoke(filename, SaveSettingsToFileComplete, null);
        }