示例#1
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            g.Read();
            try
            {
                string s = g.GetValue("size").Trim();
                if (s != "")
                {
                    s_size = VSLib.ConvertStringToInt(s);
                }

                s = g.GetValue("ext").Trim();
                if (s != "")
                {
                    s_ext = VSLib.ConvertStringToInt(s);
                }

                s = g.GetValue("contsize").Trim();
                if (s != "")
                {
                    s_contsize = VSLib.ConvertStringToInt(s);
                }

                s = g.GetValue("context").Trim();
                if (s != "")
                {
                    s_contsize = VSLib.ConvertStringToInt(s);
                }
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.Message, "Create VXML space - invalid parameter(s)", MessageBoxButtons.OK);
                return;
            }

            if (s_size <= 0)
            {
                MessageBox.Show("Size is not specified", "Create VXML space", MessageBoxButtons.OK);
                return;
            }

            VXmlCatalog c = new VXmlCatalog();

            c.Set(ROOT, "", s_size, s_ext, s_contsize, s_context);

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
示例#2
0
        /// <summary>
        /// Extend space
        /// </summary>
        private void Extend()
        {
            string ext = VSUILib.VSUICommonFunctions.InputBox("Extend Space", "Extension size (Mb)", numeric: true);

            if ((ext == "") | (ext == VSUILib.VSUICommonFunctions.CANCELLED))
            {
                return;
            }

            try
            {
                mgr.Extend((string)listSpace.SelectedItem, VSLib.ConvertStringToInt(ext));
                AddInfo("Space has been successfully extended");
                DisplaySpaceList();
            }
            catch (VSException er)
            {
                AddInfo(er.Message);
            }
        }
示例#3
0
        /// <summary>
        /// Add partition
        /// </summary>
        private void Add()
        {
            string nm = (string)listSpace.SelectedItem;

            string ext = VSUILib.VSUICommonFunctions.InputBox("Add partition to space '" + nm + "'", "Size (Mb)", numeric: true);

            if ((ext == "") | (ext == VSUILib.VSUICommonFunctions.CANCELLED))
            {
                return;
            }

            try
            {
                mgr.AddPartition((string)listSpace.SelectedItem, VSLib.ConvertStringToInt(ext));
                AddInfo("Partition has been successfully added for space '" + nm + "'");
                DisplaySpaceList();
            }
            catch (VSException er)
            {
                AddInfo(er.Message);
            }
        }