Init() public method

public Init ( String title, IEnumerable values ) : void
title String
values IEnumerable
return void
Beispiel #1
0
        public bool edit()
        {
            current_editing_account = this;
            GenericEditor     editor = new GenericEditor();
            List <FieldValue> vals   = new List <FieldValue>(values);
            var enabled_field        = new Field(Field.FIELD_TYPE.Bool, "Account Enabled", "enabled", "", enabled ? "true" : "false", "");
            var enabled_val          = enabled_field.GetDefaultValue();

            vals.Insert(0, enabled_val);
            editor.Init("Editing Account", vals);
            editor.ShowDialog();
            if (editor.DialogResult == true)
            {
                if (enabled_val.value == "true")
                {
                    enabled = true;
                }
                else
                {
                    enabled = false;
                }
                ReloadAccount();
            }
            else
            {
                return(false);
            }
            return(true);
        }
Beispiel #2
0
        public void edit()
        {
            if (Broker.get_instance().active_calls != 0)
            {
                MessageBoxResult mres = MessageBox.Show("Warning editing sofia settings will cause sofia to restart and will drop any active calls, do you want to continue?", "Restart Warning", MessageBoxButton.YesNo);
                if (mres != MessageBoxResult.Yes)
                {
                    return;
                }
            }
            GenericEditor editor = new GenericEditor();

            editor.Init("Editing Sofia Settings", values);
            editor.ShowDialog();
            if (editor.DialogResult == true)
            {
                if (master_profile_ok)
                {
                    reload_config(RELOAD_CONFIG_MODE.HARD);
                }
                else
                {
                    reload_config(RELOAD_CONFIG_MODE.MODULE);
                }
            }
        }
Beispiel #3
0
 public void edit()
 {
     GenericEditor editor = new GenericEditor();
     editor.Init("Editing Event Socket Settings", values);
     editor.ShowDialog();
     if (editor.DialogResult == true){
         MessageBoxResult mres = MessageBox.Show("Do you want to reload the event socket settings now, doing so will drop anyone connected to the event socket?", "Reload Module Warning", MessageBoxButton.YesNo);
         if (mres != MessageBoxResult.Yes)
             return;
         reload_config();
     }
 }
Beispiel #4
0
        public void edit()
        {
            GenericEditor editor = new GenericEditor();

            editor.Init("Editing Conference Settings", values);
            editor.ShowDialog();
            if (editor.DialogResult == true)
            {
                MessageBoxResult mres = MessageBox.Show("Do you want to reload the conference settings now, if there is an active conference this will do nothing?", "Reload Module Warning", MessageBoxButton.YesNo);
                if (mres != MessageBoxResult.Yes)
                {
                    return;
                }
                reload_config();
            }
        }
        public void edit()
        {
            GenericEditor editor = new GenericEditor();

            editor.Init("Editing Event Socket Settings", values);
            editor.ShowDialog();
            if (editor.DialogResult == true)
            {
                MessageBoxResult mres = MessageBox.Show("Do you want to reload the event socket settings now, doing so will drop anyone connected to the event socket?", "Reload Module Warning", MessageBoxButton.YesNo);
                if (mres != MessageBoxResult.Yes)
                {
                    return;
                }
                reload_config();
            }
        }
Beispiel #6
0
 public void edit()
 {
     GenericEditor editor = new GenericEditor();
     editor.Init("Editing Conference Settings", values);
     editor.ShowDialog();
     if (editor.DialogResult == true) {
         MessageBoxResult mres = MessageBox.Show("Do you want to reload the conference settings now, if there is an active conference this will do nothing?", "Reload Module Warning", MessageBoxButton.YesNo);
         if (mres != MessageBoxResult.Yes)
             return;
         reload_config();
     }
 }
Beispiel #7
0
 public bool edit()
 {
     current_editing_account = this;
     GenericEditor editor = new GenericEditor();
     List<FieldValue> vals = new List<FieldValue>(values);
     var enabled_field = new Field(Field.FIELD_TYPE.Bool, "Account Enabled","enabled","",enabled ? "true" : "false","");
     var enabled_val = enabled_field.GetDefaultValue();
     vals.Insert(0, enabled_val);
     editor.Init("Editing Account", vals);
     editor.ShowDialog();
     if (editor.DialogResult == true){
         if (enabled_val.value == "true")
             enabled = true;
         else
             enabled = false;
         ReloadAccount();
     }
     else
         return false;
     return true;
 }
Beispiel #8
0
 public void edit()
 {
     if (Broker.get_instance().active_calls != 0) {
         MessageBoxResult mres = MessageBox.Show("Warning editing sofia settings will cause sofia to restart and will drop any active calls, do you want to continue?", "Restart Warning", MessageBoxButton.YesNo);
         if (mres != MessageBoxResult.Yes)
             return;
     }
     GenericEditor editor = new GenericEditor();
     editor.Init("Editing Sofia Settings", values);
     editor.ShowDialog();
     if (editor.DialogResult == true) {
         if (master_profile_ok)
             reload_config(RELOAD_CONFIG_MODE.HARD);
         else
             reload_config(RELOAD_CONFIG_MODE.MODULE);
     }
 }