コード例 #1
0
        private void FrmMain1_Load(object sender, EventArgs e)
        {
            SysvarService ser  = new SysvarService();
            Sysvar        sysV = ser.GetByMCode("Themes");

            if (sysV != null && !string.IsNullOrEmpty(sysV.MValue))
            {
                defaultLookAndFeel_0.LookAndFeel.SkinName = sysV.MValue;

                bool find = false;
                foreach (BarSubItemLink itemLink in barSubItem1.ItemLinks)
                {
                    foreach (BarItemLink styleMenu in itemLink.Item.ItemLinks)
                    {
                        BarCheckItem checkItem = styleMenu.Item as BarCheckItem;
                        if (checkItem != null && checkItem.Caption == sysV.MValue)
                        {
                            checkItem.Checked = true;
                            find = true;
                            break;
                        }
                    }

                    if (find)
                    {
                        break;
                    }
                }
            }


            BuildMenu();
            //if (Class7.GetUserRight() < 4)
            //{
            //    this.string_0 = "update tblMenus set skip = 1 ";
            //    Class7.smethod_4(this.string_0);
            //    this.string_0 = "update tblMenus set skip = 0 where menukey IN('USERGUIDE','STATIONS')";
            //    Class7.smethod_4(this.string_0);
            //    this.BuildMenu();
            //}
            //else
            //{
            //    this.UpdateSkip();
            //    this.string_0 = "update tblMenus set skip = 0 where menukey IN('USERGUIDE','STATIONS')";
            //    Class7.smethod_4(this.string_0);
            //    this.BuildMenu();
            //}

            this.Txt_Date.Caption = string.Format("{0:dd/MM/yyy}", DateTime.Now);;

            //this.Text = string.Concat(new object[] { Class7.smethod_14("m_softname"), " (USER NAME : ", Class7.string_7, "- COMPUTER NAME :", SystemInformation.ComputerName, " ", str, ")" });
            //this.Lbl_IpAddress.Caption = Class7.smethod_52();
            //this.barStaticItem1.Caption = Class13.smethod_1(Class7.smethod_14("m_copyright").ToString(), Class13.string_0);
        }
コード例 #2
0
        private void barManager_0_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                if (e.Item.GetType() == typeof(BarCheckItem))
                {
                    BarCheckItem checkItem = e.Item as BarCheckItem;
                    if (checkItem != null && checkItem.GroupIndex == 1)
                    {
                        defaultLookAndFeel_0.LookAndFeel.SkinName = e.Item.Caption;
                        SysvarService ser  = new SysvarService();
                        Sysvar        sysV = ser.GetByMCode("Themes");
                        if (sysV == null)
                        {
                            sysV       = new Sysvar();
                            sysV.MCode = "Themes";
                            sysV.Type  = "G";
                        }

                        sysV.MValue = checkItem.Caption;
                        ser.Save(sysV);
                    }

                    return;
                }

                switch (e.Item.Tag.ToString())
                {
                case "PREPORTS":
                    Class11.string_1 = "P";
                    ToolsGui.BindToParentForm(new FrmReports(), this);
                    return;

                case "STOCKADD":
                    FrmLibraryDef frm4 = new FrmLibraryDef();
                    frm4.MdiParent = this;
                    frm4.Show();
                    return;

                case "UNITS":
                    ToolsGui.BindToParentForm(new UnitsForm(), this);
                    return;

                case "GOODSGRP":
                    ToolsGui.BindToParentForm(new BookCategoryForm(), this);
                    return;

                case "GOODS":
                    ToolsGui.BindToParentForm(new BookForm(), this);
                    return;

                case "DIAGRAM":
                    ToolsGui.BindToParentForm(new LibraryLocationForm(), this);
                    return;

                case "MERCLOCATION":
                    ToolsGui.BindToParentForm(new BooksLocationForm(), this);
                    return;

                case "LABELS":
                    ToolsGui.BindToParentForm(new CardPrintForm(), this);
                    return;

                case "CUSTOMER":
                    ReaderForm frm6 = new ReaderForm();
                    frm6.MdiParent = this;
                    frm6.Show();
                    return;

                case "ORDER":
                    ToolsGui.BindToParentForm(new FrmMercOrder(), this);
                    return;

                case "TRANSCODE":
                    Class11.string_1 = "K";
                    ToolsGui.BindToParentForm(new FrmTransCode(), this);
                    return;

                case "STKINFO":
                    ToolsGui.BindToParentForm(new FrmLibraryInfo(), this);
                    return;

                case "SUPPINFO":
                    ToolsGui.BindToParentForm(new FrmSuppInfo(), this);
                    return;

                case "MERCQR":
                    ToolsGui.BindToParentForm(new FrmBookView(), this);
                    return;

                case "KREPORTS":
                    Class11.string_1 = "K";
                    ToolsGui.BindToParentForm(new FrmReports(), this);
                    return;

                case "SUPPDEF":
                    ToolsGui.BindToParentForm(new FrmCustomer(), this);
                    return;

                case "ABOUT":
                    new AboutForm().ShowDialog();
                    return;

                case "AREPORT":
                    Class11.string_1 = "A";
                    ToolsGui.BindToParentForm(new FrmReports(), this);
                    return;

                case "LOAN":
                    ToolsGui.BindToParentForm(new LoanBookForm(), this);
                    return;

                case "RECEIVED":
                    ToolsGui.BindToParentForm(new ReturnBookForm(), this);
                    return;

                case "OVERDUELST":
                    ToolsGui.BindToParentForm(new OverDueForm(), this);
                    return;

                case "BOOKSEARCH":
                    ToolsGui.BindToParentForm(new BookListForm(), this);
                    return;

                case "LANGUAGE":
                    ToolsGui.BindToParentForm(new FrmLanguage(), this);
                    return;

                case "LOANLST":
                    new FrmGetDates().ShowDialog();
                    if (Class7.IsInputDate)
                    {
                        ToolsGui.BindToParentForm(new FrmLoanInvList(), this);
                    }
                    return;

                case "LREPORTS":
                    ToolsGui.BindToParentForm(new FrmReaderInfo(), this);
                    return;

                case "LBRCARD":
                    ToolsGui.BindToParentForm(new CardPrintForm(), this);
                    return;

                default:
                    return;
                }
            }
            catch
            {
            }
        }