public static FormularGridView GetInstance(LoggerSystem p_LS)
 {
     if (openForm == null)
     {
         openForm = new FormularGridView(p_LS);
         openForm.FormClosed += delegate { openForm = null; };
     }
     return openForm;
 }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoggerSystem LS = new LoggerSystem();
            LS.Start();

            Application.Run();
        }
        public FormularGridView(LoggerSystem p_LS)
        {
            InitializeComponent();
            passed_LS = p_LS;

            //v_RepetareCheckBox.Checked = true;

            dataList = passed_LS.o_SQLManager.Select();
            toDelete = new List<string>();

            noteClassBindingSource.DataSource = dataList;
        }
        public TrayManager(LoggerSystem tmp_PassedSystem)
        {
            passed_LSystem = tmp_PassedSystem;

            o_Timer = new Timer();
            o_Timer.Tick += new EventHandler(timer_Tick);

            o_ContextMenu = new ContextMenuStrip();

            setRepIntervalFromSettings(); // Citeste intervalul inainte de pornirea cronometrului
            o_Timer.Enabled = true;
            o_Timer.Start();

            var o_menu = new ToolStripMenuItem("Meniu");
            o_menu.Image = Properties.Resources.browser;
            o_menu.Click += this.OnMenuClicked;

            var o_notif = new ToolStripMenuItem("Notificari");
            o_notif.Image = Properties.Resources.eye;
            o_notif.Click += this.OnTodayNotesClicked;

            var o_options = new ToolStripMenuItem("Optiuni");
            o_options.Image = Properties.Resources.settings;
            o_options.Click += this.OnOptionsClicked;

            var o_exit = new ToolStripMenuItem("Inchide");
            o_exit.Image = Properties.Resources._in;
            o_exit.Click += OnExitClick;

            o_ContextMenu.Items.Add(o_menu);
            o_ContextMenu.Items.Add(o_notif);
            o_ContextMenu.Items.Add(o_options);
            o_ContextMenu.Items.Add(o_exit);

            o_NotifyIcon = new NotifyIcon();
            o_NotifyIcon.Icon = Properties.Resources.calendar;
            o_NotifyIcon.Visible = true;
            o_NotifyIcon.Text = "My Logger";
            o_NotifyIcon.BalloonTipClicked += (new EventHandler(this.OnTodayNotesClicked));
            o_NotifyIcon.DoubleClick += (new EventHandler(this.OnMenuClicked));
            o_NotifyIcon.ContextMenuStrip = o_ContextMenu;
        }