コード例 #1
0
ファイル: Shell.cs プロジェクト: sujathkumar/iwms
        /// <summary>
        /// linkCreate_LinkClicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void linkCreate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (tabControlMain.SelectedTabPage == tabControlCollector)
            {
                CreateCollector frm = new CreateCollector();
                frm.ShowDialog();

                LoadCollectors();
                gridControlCollectors.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlRecycler)
            {
                CreateRecycler frm = new CreateRecycler();
                frm.ShowDialog();

                LoadRecyclers();
                gridControlRecyclers.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlSpotImages)
            {
                int[]          selectedRows = gridViewSpotImages.GetSelectedRows();
                SpotImageModel spotImage    = null;

                foreach (var row in selectedRows)
                {
                    spotImage = (SpotImageModel)gridViewSpotImages.GetRow(row);
                }

                VerifySpotImage frm = new VerifySpotImage(spotImage.ImagePath);
                frm.ShowDialog();

                LoadSpotImages();
                gridControlSpotImages.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlEvents)
            {
                int[]      selectedRows = gridViewEvents.GetSelectedRows();
                EventModel ev           = null;

                foreach (var row in selectedRows)
                {
                    ev = (EventModel)gridViewEvents.GetRow(row);
                }

                EventNotification frm = new EventNotification(ev.ImagePath);
                frm.ShowDialog();

                LoadEvents();
                gridControlEvents.Refresh();
            }
        }
コード例 #2
0
ファイル: Shell.cs プロジェクト: sujathkumar/iwms
        /// <summary>
        /// linkCreate_LinkClicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void linkCreate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (tabControlMain.SelectedTabPage == tabControlCollector)
            {
                CreateCollector frm = new CreateCollector();
                frm.ShowDialog();

                LoadCollectors();
                gridControlCollectors.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlRecycler)
            {
                CreateRecycler frm = new CreateRecycler();
                frm.ShowDialog();

                LoadRecyclers();
                gridControlRecyclers.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlSpotImages)
            {
                int[] selectedRows = gridViewSpotImages.GetSelectedRows();
                SpotImageModel spotImage = null;

                foreach (var row in selectedRows)
                {
                    spotImage = (SpotImageModel)gridViewSpotImages.GetRow(row);
                }

                VerifySpotImage frm = new VerifySpotImage(spotImage.ImagePath);
                frm.ShowDialog();

                LoadSpotImages();
                gridControlSpotImages.Refresh();
            }
            else if (tabControlMain.SelectedTabPage == tabControlEvents)
            {
                int[] selectedRows = gridViewEvents.GetSelectedRows();
                EventModel ev = null;

                foreach (var row in selectedRows)
                {
                    ev = (EventModel)gridViewEvents.GetRow(row);
                }

                EventNotification frm = new EventNotification(ev.ImagePath);
                frm.ShowDialog();

                LoadEvents();
                gridControlEvents.Refresh();
            }
        }