Exemple #1
0
        // Экспорт некоторых событий
        private void ExportAnyEventsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ShowEvents nFr = new ShowEvents(WorkDir + "\\" + EventListFile, vers, DateTime.Today, Diapazon.All, this, ShowEventsObjective.toExport);

            nFr.ShowDialog();
            //RefreshMonth();
        }
Exemple #2
0
        // импорт
        private void toolStripMenuItem6_Click(object sender, EventArgs e)
        {
            // выбрать файл
            string         InpFile;
            OpenFileDialog OFD = new OpenFileDialog();

            OFD.Filter           = "Calendar files (*.cln)|*.cln|All files (*.*)|*.*";
            OFD.FilterIndex      = 0;
            OFD.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
            if (OFD.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            else
            {
                InpFile = OFD.FileName;
            }
            OFD.Dispose();

            // отразить список событий
            ShowEvents nFr = new ShowEvents(WorkDir + "\\" + EventListFile, InpFile, vers, this, ShowEventsObjective.toImport);

            nFr.ShowDialog();

            RefreshMonth();
            //ReloadTimer(); делается из ShowEvents формы
        }
Exemple #3
0
        // ============= просмотр событий клик
        private void toolStripMenuItem9_Click(object sender, EventArgs e)
        {
            // есть ли владелец
            if (CotextMenuControl != null)
            {
                // тип владельца
                Type tp = CotextMenuControl.GetType();
                if (tp == typeof(Label))
                {
                    Label lbl = CotextMenuControl as Label;

                    // определить чего нажали
                    int ind = FindIndexCurentLabel(lbl);
                    if (ind >= 0)
                    {
                        // открыть форму
                        ShowEvents fr = new ShowEvents(WorkDir + "\\" + EventListFile, vers, FirstDay.AddDays(ind), Diapazon.Day, this, ShowEventsObjective.toShow);
                        fr.ShowDialog();
                        RefreshMonth();
                    }
                }

                CotextMenuControl = null;
            }
        }