Exemplo n.º 1
0
        /// <summary>
        /// создать новый документ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void createNewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RawRange r = new RawRange();

            r.Name = "Новый документ";
            TabPageExt tab = mainTabControl.OpenNewTab(r);

            tab.HasNotSavedChanges = true;
        }
Exemplo n.º 2
0
        private void linkLabelOpenNasa_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FormLoadFromNASA frm = new FormLoadFromNASA(selectedMeteostation.Position);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                RawRange   res = frm.Result;
                TabPageExt tab = Program.winMain.mainTabControl.OpenNewTab(res, res.Name);
                tab.HasNotSavedChanges = true;
            }
            frm.Dispose();
        }
Exemplo n.º 3
0
        /// <summary>
        /// просмотр и редатирование свойств ряда
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void rangePropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TabPageExt          tab = mainTabControl.SelectedTab as TabPageExt;
            FormRangeProperties frm = new FormRangeProperties(tab.Range);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                tab.UpdateData(frm.Result, frm.Result.Name);
                tab.HasNotSavedChanges = true;
            }
            frm.Dispose();
        }
Exemplo n.º 4
0
        /// <summary>
        /// загрузить из БД NASA
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void downloadNASAToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormLoadFromNASA frm = new FormLoadFromNASA(PointLatLng.Empty);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                RawRange   res = frm.Result;
                TabPageExt tab = mainTabControl.OpenNewTab(res, res.Name);
                tab.HasNotSavedChanges = true;
            }
            frm.Dispose();
        }
Exemplo n.º 5
0
        /// <summary>
        /// загрузить с сайта rp5.ru
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void downloadRP5ruToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormLoadFromRP5 frm = new FormLoadFromRP5();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                RawRange   res = frm.Result;
                TabPageExt tab = mainTabControl.OpenNewTab(res, res.Name);
                tab.HasNotSavedChanges = true;
            }
            frm.Dispose();
        }
Exemplo n.º 6
0
        /// <summary>
        /// импортировать текстовый файл
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void importFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormFileImport fti = new FormFileImport();

            if (fti.ShowDialog(this) == DialogResult.OK)
            {
                RawRange   rang = fti.Result;
                TabPageExt tab  = mainTabControl.OpenNewTab(rang, rang.FileName);
                tab.HasNotSavedChanges = true;
            }
            fti.Dispose();
        }
Exemplo n.º 7
0
        /// <summary>
        /// открыть файл
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RawRange rang = this.mainHelper.OpenFile();

            if (rang == null)
            {
                return;
            }
            TabPageExt tab = this.mainTabControl.OpenNewTab(rang, rang.FileName);

            tab.HasNotSavedChanges = false;
        }