Exemplo n.º 1
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            SaveFileDialog d = new SaveFileDialog();

            if (d.ShowDialog() == DialogResult.OK)
            {
                OffsetManager.SaveAsEncryptedXML(d.FileName, txtEncryptionKey.Text);
            }
        }
Exemplo n.º 2
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            OpenFileDialog d = new OpenFileDialog();

            if (d.ShowDialog() == DialogResult.OK)
            {
                OffsetManager.OpenEncryptedXML(d.FileName, txtEncryptionKey.Text);
                DisplayList();
                ClearDetails();
            }
        }
Exemplo n.º 3
0
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog d = new SaveFileDialog();

            d.DefaultExt = "xml";
            d.Filter     = "XML Files|*.xml";

            if (d.ShowDialog() == DialogResult.OK)
            {
                OffsetManager.SaveOffsetsXML(d.FileName);
            }
        }
Exemplo n.º 4
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog d = new OpenFileDialog();

            d.DefaultExt = "xml";
            d.Filter     = "XML Files|*.xml";

            if (d.ShowDialog() == DialogResult.OK)
            {
                OffsetManager.LoadOffsetsXML(d.FileName);
                DisplayList();
                ClearDetails();
            }
        }
Exemplo n.º 5
0
        // btnNewOffset
        private void btnNewOffset_Click(object sender, EventArgs e)
        {
            Offset o = new Offset();

            try
            {
                OffsetManager.Add(o);
                DisplayList();
                SelectOffsetIndex(listOffsets.Items.Count - 1);
                txtOffsetName.SelectAll();
                txtOffsetName.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemplo n.º 6
0
        // btnDeleteOffset
        private void btnDeleteOffset_Click(object sender, EventArgs e)
        {
            int i = listOffsets.SelectedIndex;

            if (i > -1)
            {
                OffsetManager.Remove(((Offset)(listOffsets.SelectedItem)));
                DisplayList();

                int i2 = i - 1;
                if (i2 < 0)
                {
                    i2 = 0;
                }

                // select previous offset
                if (listOffsets.Items.Count > 0)
                {
                    SelectOffsetIndex(i2);
                }
            }
        }
Exemplo n.º 7
0
 // sort list
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     OffsetManager.Sort();
     DisplayList();
 }