Exemple #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ObjEditReminders.Video = txtVideo.Text;

            SaveXML.SaveData(ObjEditReminders, "Reminders_Pg3.xml");

            MessageBox.Show("Información guardada correctamente", "Mensaje de control", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 private void ExportMI_Click(object sender, EventArgs e)
 {
     if (SaveXML.ShowDialog() == DialogResult.OK)
     {
         Effects.Path = SaveXML.FileName;
         SetEffects();
         Effects.Export();
         Journal.Append(String.Format("{0} exported parameters", Session.Login));
         Message.Info("Parameters was exported!", Text);
     }
 }
Exemple #3
0
        static void Main(string[] args)
        {
            var url = "http://auth.bungii.ccigoa:8189/api/customer/login";

            string   path = @"E:\test_data_generator\Data.xml";
            SaveData data = new SaveData();

            SaveXML.Getdata(ref data, path);

            foreach (Request request in data.RequestList)
            {
                JObject code = JObject.Parse(request.Payload);

                foreach (var jProperty in code)
                {
                    if (jProperty.Key == "PickupRequestID")
                    {
                        code["PickupRequestID"] = "xyz";
                    }
                    var key   = jProperty.Key;
                    var value = jProperty.Value;
                }
            }



            // int userCount = 1;
            method = new TestUserData(UserAPIList);
            //IEnumerable<object> User = GetUser();
            Console.WriteLine("User signing in...");

            object user = new { PhoneNo = "9999999230", Password = "******" };

            method.BeginInvoke(user, data, url, null, null);

            //foreach (var user in User)
            //{
            //    method.BeginInvoke(user,data,url,null, null);

            //    if (userCount == 5)
            //    {
            //        Thread.Sleep(10000);
            //        userCount = 0;
            //    }

            //    userCount += 1;
            //}

            Console.ReadKey();
        }
Exemple #4
0
    static void Main(string[] args)
    {
        User n = new User();

        n.Fname   = "fname";
        n.Lname   = "lname";
        n.Address = "address";
        n.City    = "city";
        n.State   = "state";
        n.Zip     = 1;
        n.Phone   = "phone";
        n.Email   = "email";
        SaveXML.SaveData(n, "xml.xml");
    }
        private void btnSave_Click(object sender, EventArgs e)
        {
            ObjEditReminders.Family1 = txtFamily1.Text;
            ObjEditReminders.Family2 = txtFamily2.Text;
            ObjEditReminders.Family3 = txtFamily3.Text;
            ObjEditReminders.Family4 = txtFamily4.Text;
            ObjEditReminders.Family5 = txtFamily5.Text;
            ObjEditReminders.Family6 = txtFamily6.Text;
            ObjEditReminders.Family7 = txtFamily7.Text;
            ObjEditReminders.Family8 = txtFamily8.Text;

            SaveXML.SaveData(ObjEditReminders, "Reminders_Pg2.xml");

            MessageBox.Show("Información guardada correctamente", "Mensaje de control", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #6
0
        //--------------
        // Save to XML
        //--------------
        private void saveXMLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Information info = new Information();
                ///info.Data1 = cCalcTB.Text;
                // -->

                SaveXML.SaveData(info, "data.xml");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #7
0
        private void buttonSave_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog sv = new SaveFileDialog();

            sv.InitialDirectory = @"C:\Temp\";
            sv.FileName         = "Document";
            sv.Filter           = "XML Files (*.xml)|*.xml";
            sv.Title            = "Save Xml file";

            if (sv.ShowDialog() == true)
            {
                string fileName = sv.FileName;
                SaveXML.SaveXml(sv.FileName, fileName);
                LoadDirectories();
            }
        }
Exemple #8
0
        private void saveProgram_Click(object sender, RoutedEventArgs e)
        {
            IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication();

            if (iso.FileExists("save.xml"))
            {
                string           message = "Saving code will overwright previous save data\n\nWould you like to save?"; //message (code) displayed
                string           caption = "Save Code?";                                                                //header
                MessageBoxButton buttons = MessageBoxButton.OKCancel;                                                   //only allow OK and X buttons
                MessageBoxResult result  = MessageBox.Show(message, caption, buttons);                                  //display message window
                if (result == MessageBoxResult.Cancel)
                {
                    return;
                }
                iso.DeleteFile("save.xml");
            }
            SaveXML.SaveToXML();
        }
Exemple #9
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                ObjEditReminders.Names     = txtNames.Text;
                ObjEditReminders.LastNames = txtLastNames.Text;
                ObjEditReminders.Age       = int.Parse(txtAge.Text);
                ObjEditReminders.Birthday  = dtpBirthday.Value;
                ObjEditReminders.WhereBorn = txtWhereBorn.Text;
                ObjEditReminders.City      = txtCity.Text;
                ObjEditReminders.Address   = txtAddress.Text;

                SaveXML.SaveData(ObjEditReminders, "Reminders_Pg1.xml");
            }
            catch
            {
                MessageBox.Show("Por favor llene todos los campos...", "Mensaje De Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            MessageBox.Show("Información guardada correctamente", "Mensaje de control", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #10
0
        private void btnChangePassword_Click(object sender, EventArgs e)
        {
            TempPass  = txtPassword.Text;
            TempPassR = txtPasswordR.Text;

            if (TempPass == TempPassR)
            {
                MessageBox.Show("Contraseña cambiada con éxito", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);

                ObjAdmin.Password = TempPass;
                SaveXML.SaveData(ObjAdmin, "AdminInfo.xml");

                txtPassword.Text  = "";
                txtPasswordR.Text = "";
            }
            else
            {
                MessageBox.Show("Las contraseñas no coinciden, intente de nuevo", "Contraseña incorrecta", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtPassword.Text  = "";
                txtPasswordR.Text = "";
                txtPassword.Focus();
            }

            //bool confirm;
            //confirm = ObjAdmin.ReadDataToChange(txtPassword, txtPasswordR);
            //if (confirm == true)
            //{
            //    MessageBox.Show("Contraseña cambiada con éxito", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    txtPassword.Text = "";
            //    ObjAdmin = new Admin(txtPassword.Text);
            //    txtPasswordR.Text = "";
            //}
            //else
            //{
            //    MessageBox.Show("Las contraseñas no coinciden, intente de nuevo", "Contraseña incorrecta", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    txtPassword.Text = "";
            //    txtPasswordR.Text = "";
            //    txtPassword.Focus();
            //}
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            frmAdminSesion ObjAdminSesion = new frmAdminSesion();

            TempPass = txtPassword.Text;
            if (TempPass == ObjAdmin.Password)
            {
                MessageBox.Show("Acceso concedido", "Acceso exitoso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ObjAdmin.Password = TempPass;

                SaveXML.SaveData(ObjAdmin, "AdminInfo.xml");

                ObjAdminSesion.Show();
                Close();
            }
            else
            {
                MessageBox.Show("La contraseña es incorrecta, intente de nuevo", "Contraseña incorrecta", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtPassword.Text = "";
                txtPassword.Focus();
            }


            //bool confirm;
            //confirm = ObjAdmin.ReadData(txtPassword);
            //if (confirm == true)
            //{
            //    MessageBox.Show("Acceso concedido", "Acceso exitoso", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    ObjAdminSesion.Show();
            //    Close();
            //}
            //else
            //{
            //    MessageBox.Show("La contraseña es incorrecta, intente de nuevo", "Contraseña incorrecta", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    txtPassword.Text = "";
            //    txtPassword.Focus();
            //}
        }
Exemple #12
0
        //--------------
        // Save to XML
        //--------------
        public void saveXMLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (modules.ShipData.lppSave != "")
            {
                try
                {
                    Information info = new Information();

                    info.lppData  = modules.ShipData.lppSave;
                    info.lData    = modules.ShipData.lSave;
                    info.bData    = modules.ShipData.bSave;
                    info.dData    = modules.ShipData.dSave;
                    info.vData    = modules.ShipData.vSave;
                    info.cbData   = modules.ShipData.cbSave;
                    info.tbalData = modules.ShipData.tbalSave;
                    info.tscData  = modules.ShipData.tscSave;
                    info.gmData   = modules.ShipData.gmSave;
                    info.krData   = modules.ShipData.krSave;
                    info.saData   = modules.ShipData.saSave;
                    info.frData   = modules.ShipData.frSave;
                    info.bkData   = modules.ShipData.bkSave;

                    // -->

                    SaveXML.SaveData(info, "data.xml");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                MessageBox.Show("Please select module first!");
            }
        }
Exemple #13
0
        private void histogramm_Click(object sender, EventArgs e)
        {
            try
            {
                if (RandForests == null)
                {
                    ListRandomForests rndForests2 =
                        SaveXML.DeserializeObjectRandomForests(Directory.GetCurrentDirectory() + @"\" + "output2.txt");
                    RandForests = rndForests2.RndForests;
                }
                _root = rndForests[0];
                Diagramm diag = new Diagramm(RandForests);
                diag.Show();
            }
            catch (FileNotFoundException)
            {
                MessageBox.Show(Localization.MyStrings.FileNotFoundMathematical);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #14
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SaveXML newXMLSave = new SaveXML();
     newXMLSave.toXMLDoc(Channels);
 }
Exemple #15
0
        private void remBtn_Click(object sender, EventArgs e)
        {
            if (channelTree.SelectedNode.Level == 0)
            {
                Channel ch;

                ch = Channels.Find(
                    delegate(Channel csh)
                    {
                        return (csh.mTitle == channelTree.SelectedNode.Text);
                    });

                if (ch != null)
                {
                    Channels.Remove(ch);
                    refreshAll();
                    SaveXML newXMLSave = new SaveXML();
                    newXMLSave.toXMLDoc(Channels);
                }

            }
        }
Exemple #16
0
 private void mainMenuToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SaveXML newXMLSave = new SaveXML();
     newXMLSave.toXMLDoc(Channels);
     this.Hide();
     menu.Show();
 }
Exemple #17
0
 private void exitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SaveXML newXMLSave = new SaveXML();
     newXMLSave.toXMLDoc(Channels);
     Application.Exit();
 }
Exemple #18
0
        private void editBtn_Click(object sender, EventArgs e)
        {
            // First remove the old one

            if (channelTree.SelectedNode.Level == 0)
            {
                Channel ch;
                Channel editCh;

                ch = Channels.Find(
                    delegate(Channel csh)
                    {
                        return (csh.mTitle == channelTree.SelectedNode.Text);
                    });
                editCh = ch;
                if (ch != null)
                {

                    Channels.Remove(ch);
                    refreshAll();
                    SaveXML newXMLSave = new SaveXML();
                    newXMLSave.toXMLDoc(Channels);
                }

                // Now create a new one
                if (editCh != null)
                {
                    addChannel edit = new addChannel(channelTree, Channels, editCh.mTitle, editCh.mDescription);
                    edit.Show();
                }
            }
        }