void buttonBarItem_Click(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
        {
            INewsPaperControl item = (INewsPaperControl)((Janus.Windows.ButtonBar.ButtonBarItem)(sender)).Tag;

            if (Directory.GetFiles(Path.Combine(Application.StartupPath, "Plugins"), "*.dll").Length > 0)
            {
                string   Filename = Path.Combine(Application.StartupPath, "Plugins") + @"\" + item.getName() + ".dll";
                Assembly Asm      = Assembly.LoadFile(Filename);
                foreach (Type AsmType in Asm.GetTypes())
                {
                    if (AsmType.GetInterface("INewsPaperControl") != null && AsmType.Name != "NewsPaperControlBase")
                    {
                        NewsPaperControlBase Plugin = (NewsPaperControlBase)Activator.CreateInstance(AsmType);
                        currentNewsPaperControl = Plugin;
                        Point p = new Point(currentNewsPaperControl.getAttList().getLocation().X *zoomDegree, currentNewsPaperControl.getAttList().getLocation().Y *zoomDegree);
                        Size  s = new System.Drawing.Size(currentNewsPaperControl.getAttList().getSize().Width *zoomDegree, currentNewsPaperControl.getAttList().getSize().Height *zoomDegree);
                        Plugin.getCtrl().Location = p;
                        Plugin.getCtrl().Size     = s;

                        iObjNumber++;
                        Plugin.getAttList().setInstanceName("Obj" + iObjNumber.ToString());

                        //Xử lý marker
                        if (Plugin.getName() == "NewsPaperMarker")
                        {
                            lstMarker.Add(Plugin);
                        }
                        MarkerList.lstMarkerList = new List <string>();
                        foreach (INewsPaperControl c in lstMarker)
                        {
                            MarkerList.lstMarkerList.Add(c.getAttList().getInstanceName());
                        }
                        break;
                    }
                }
            }

            ((Control)(currentNewsPaperControl)).MouseDown += new MouseEventHandler(MainProgram_MouseDown);
            ((Control)(currentNewsPaperControl)).MouseUp   += new MouseEventHandler(MainProgram_MouseUp);
            panelInnerScreen.Controls.Add((Control)currentNewsPaperControl);
            saveControlTraceAndSetRealLocationSize();
        }
Example #2
0
        private void btnOferta_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
        {
            int    shporta  = Convert.ToInt32(this.btnOferta.SelectedItem.Group.Text);
            int    idReceta = Convert.ToInt32(this.btnOferta.SelectedItem.TagString.Trim());
            string receta   = this.btnOferta.SelectedItem.Text.Trim();
            int    sasia    = Convert.ToInt32(this.btnOferta.SelectedItem.ToolTipText.Trim());

            int celesi = 0;

            foreach (DataRow dr in this.dsRecetat.Tables[0].Rows)
            {
                celesi = Convert.ToInt32(dr["SHPORTA"]);

                if (celesi == shporta)
                {
                    dr["ID_RECETA"] = idReceta;
                    dr["RECETA"]    = receta;
                    dr["SASIA"]     = sasia;
                }
            }

            this.dsRecetat.Tables[0].AcceptChanges();
        }
Example #3
0
        void buttonBarItem_Click(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
        {
            INewsPaperControl item = (INewsPaperControl)((Janus.Windows.ButtonBar.ButtonBarItem)(sender)).Tag;

            if (Directory.GetFiles(Path.Combine(Application.StartupPath, "Plugins"), "*.dll").Length > 0)
            {
                string   Filename = Path.Combine(Application.StartupPath, "Plugins") + @"\" + item.getName() + ".dll";
                Assembly Asm      = Assembly.LoadFile(Filename);
                foreach (Type AsmType in Asm.GetTypes())
                {
                    if (AsmType.GetInterface("INewsPaperControl") != null && AsmType.Name != "NewsPaperControlBase")
                    {
                        NewsPaperControlBase Plugin = (NewsPaperControlBase)Activator.CreateInstance(AsmType);
                        currentNewsPaperControl = Plugin;
                    }
                }
            }

            ((Control)(currentNewsPaperControl)).MouseDown += new MouseEventHandler(MainProgram_MouseDown);
            ((Control)(currentNewsPaperControl)).MouseUp   += new MouseEventHandler(MainProgram_MouseUp);
            panelInnerScreen.Controls.Add((Control)currentNewsPaperControl);
            preState.Add(currentNewsPaperControl.clone());
            currentState.Add(currentNewsPaperControl);
        }
Example #4
0
 private void buttonBar1_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
 {
     if (e.Item.Key == "itNhapGiaoHo")
     {
         frmGiaoHo frm = new frmGiaoHo();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itNhapGiaoDan")
     {
         frmGiaoDanList frm = new frmGiaoDanList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itNhapGiaDinh")
     {
         frmGiaDinhList frm = new frmGiaDinhList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itNhapGiaoXu")
     {
         frmGiaoXu frm = new frmGiaoXu();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itSoBiTich")
     {
         frmDotBiTichList frm = new frmDotBiTichList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itThongKeChung")
     {
         frmThongKeChung frm = new frmThongKeChung();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itLuuTruGiaoDan")
     {
         frmGiaoDanLuuTruList frm = new frmGiaoDanLuuTruList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itLuuTruGiaDinh")
     {
         frmGiaDinhLuuTruList frm = new frmGiaDinhLuuTruList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itTimGiaoDan")
     {
         frmTimGiaoDan.ShowDialog();
     }
     else if (e.Item.Key == "itTimGiaDinhCuaGiaoDan")
     {
         frmTimGiaDinh.ShowDialog();
     }
     else if (e.Item.Key == "itTimThayThe")
     {
         frmReplace.ShowDialog();
     }
     else if (e.Item.Key == "itKiemTraGiaoDan")
     {
         frmKiemTraGiaoDanList frm = new frmKiemTraGiaoDanList();
         ShowForm(frm);
     }
     else if (e.Item.Key == "itKiemTraGiaDinh")
     {
         frmKiemTraGiaDinhList frm = new frmKiemTraGiaDinhList();
         ShowForm(frm);
     }
 }
Example #5
0
 private void buttonBar1_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
 {
     LoadFunction(e.Item.Key);
 }
Example #6
0
 private void buttonBar1_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e)
 {
 }