Пример #1
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var d = new SaveFileDialog();

            d.AddExtension     = true;
            d.DefaultExt       = "xml";
            d.Filter           = "XML File (*.xml)|*.xml";
            d.OverwritePrompt  = true;
            d.RestoreDirectory = true;
            var result = d.ShowDialog();

            if (result == DialogResult.OK)
            {
                SaveLoadFile.SaveQueue(d.FileName, queueItems);
            }
        }
Пример #2
0
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (running)
            {
                return;
            }

            var d = new OpenFileDialog();

            d.AddExtension     = true;
            d.CheckFileExists  = true;
            d.CheckPathExists  = true;
            d.DefaultExt       = "xml";
            d.Filter           = "XML File (*.xml)|*.xml";
            d.RestoreDirectory = true;
            var result = d.ShowDialog();

            if (result == DialogResult.OK)
            {
                queueItems = SaveLoadFile.LoadQueue(d.FileName);
            }

            UpdateItemBox();
        }