Exemple #1
0
        /// <summary>
        /// Delete the Web Interface from the user's remote folder
        /// </summary>
        /// <param name="updating"><c>true</c> when updating, <c>false</c> when removing</param>
        private void Delete(bool updating)
        {
            Notifications.Show(updating ? WebUiAction.updating : WebUiAction.removing);

            _controller.Client.RemoveFolder("webint", false);

            if (!updating)
            {
                Notifications.Show(WebUiAction.removed);
                InterfaceRemoved.SafeInvoke(null, EventArgs.Empty);
            }
        }
Exemple #2
0
 /// <summary>
 /// Handler for the Closing event of a ConfigControl.
 /// </summary>
 /// <param name="Control">The closing control</param>
 private void ConfigControl_Closing(ConfigControlBase Control)
 {
     if (Control is InterfaceConfigControl)
     {
         var control = Control as InterfaceConfigControl;
         control.InterfaceChanged -= InterfaceConfigControl_InterfaceChanged;
         InterfaceRemoved?.Invoke(control.InterfaceName);
     }
     else if (Control is RouteConfigControl)
     {
         var rcc = Control as RouteConfigControl;
         ((RouteConfigControl)Control).RouteChanged -= RouteConfigControl_RouteChanged;
         RemoveRoute?.Invoke(rcc.RouteName);
     }
     Control.Closing -= ConfigControl_Closing;
     flpContents.Controls.Remove(Control);
 }