Example #1
0
        private void Import_Click(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog();

            openFileDialog.Filter           = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            openFileDialog.RestoreDirectory = true;
            openFileDialog.Multiselect      = false;

            if (openFileDialog.ShowDialog() != true)
            {
                return;
            }

            NumberPromptDialog dlg = new NumberPromptDialog();

            dlg.Owner = this;

            if (dlg.ShowDialog() != true)
            {
                return;
            }

            List <Locker> lockers = LockerReader.Read(openFileDialog.FileName);

            for (int i = 0; i < dlg.Value; i++)
            {
                ImportLockers(lockers);
            }
        }
Example #2
0
        private void Multiply_Click(object sender, RoutedEventArgs e)
        {
            NumberPromptDialog dlg = new NumberPromptDialog();

            dlg.Owner = this;

            if (dlg.ShowDialog() != true)
            {
                return;
            }

            List <Locker> l = Exporter.CopyLockers();

            for (int i = 1; i < dlg.Value; i++)
            {
                ImportLockers(l);
            }
        }