Example #1
0
        //NotificationIcon notificationIcon;


        #region Initialize icon and menu
        public NotificationIcon()
        {
            readConfiguration = new ReaderConfiguration();
            //ACR122 acr122 = new ACR122();
            //KeeleCard keeleCard = new KeeleCard(acr122);

            serialConfigItem = new MenuItem("Configure Reader", menuSerialConfigClick);
            crlfConfig       = new MenuItem("Send CR/LF", menuCRLFClick);
            connectItem      = new MenuItem("Connect to Reader", menuConnectClick);
            disconnectItem   = new MenuItem("Disconnect from Reader", menuDisconnectClick);
            notifyIcon       = new NotifyIcon();
            notificationMenu = new ContextMenu(InitializeMenu());

            notifyIcon.DoubleClick += IconDoubleClick;
            notifyIcon.Click       += new EventHandler(IconSingleClick);

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon));
            notifyIcon.Icon        = (Icon)resources.GetObject("$this.Icon");
            notifyIcon.ContextMenu = notificationMenu;
        }
		/// <summary>
		/// This method is required for Windows Forms designer support.
		/// Do not change the method contents inside the source code editor. The Forms designer might
		/// not be able to load this method if it was changed manually.
		/// </summary>
		private void InitializeComponent()
		{
			readConfig = NotificationIcon.readConfiguration;
			acr122 = new ACR122();
			acr122_sim = new ACR122_Sim();
			acr122_v2 = new ACR122_v2();
			ls8000 = new LS8000();
			keeleCard = new KeeleCard(acr122);
			ConfigDeviceLoad();
			ConfigTypeLoad();
			SchemaLoad();
			BtnOKLoad();
			BtnCancelLoad();
			
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(284, 168);
			this.Name = "frmSerial";
			this.Text = "Reader Configuration";
			this.Load += new System.EventHandler(this.FrmSerialLoad);
			
			this.SuspendLayout();
			this.ResumeLayout(false);
		}
Example #3
0
        /// <summary>
        /// This method is required for Windows Forms designer support.
        /// Do not change the method contents inside the source code editor. The Forms designer might
        /// not be able to load this method if it was changed manually.
        /// </summary>
        private void InitializeComponent()
        {
            readConfig = NotificationIcon.readConfiguration;
            acr122     = new ACR122();
            acr122_sim = new ACR122_Sim();
            acr122_v2  = new ACR122_v2();
            ls8000     = new LS8000();
            keeleCard  = new KeeleCard(acr122);
            ConfigDeviceLoad();
            ConfigTypeLoad();
            SchemaLoad();
            BtnOKLoad();
            BtnCancelLoad();

            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize          = new System.Drawing.Size(284, 168);
            this.Name  = "frmSerial";
            this.Text  = "Reader Configuration";
            this.Load += new System.EventHandler(this.FrmSerialLoad);

            this.SuspendLayout();
            this.ResumeLayout(false);
        }
        public NotificationIcon()
        {
            readConfiguration = new ReaderConfiguration();
            //ACR122 acr122 = new ACR122();
            //KeeleCard keeleCard = new KeeleCard(acr122);

            serialConfigItem = new MenuItem("Configure Reader",menuSerialConfigClick);
            crlfConfig = new MenuItem("Send CR/LF",menuCRLFClick);
            connectItem = new MenuItem("Connect to Reader",menuConnectClick);
            disconnectItem = new MenuItem("Disconnect from Reader",menuDisconnectClick);
            notifyIcon = new NotifyIcon();
            notificationMenu = new ContextMenu(InitializeMenu());

            notifyIcon.DoubleClick += IconDoubleClick;
            notifyIcon.Click += new EventHandler(IconSingleClick);

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon));
            notifyIcon.Icon = (Icon)resources.GetObject("$this.Icon");
            notifyIcon.ContextMenu = notificationMenu;
        }