コード例 #1
0
ファイル: PreviewControl.cs プロジェクト: BillyWu/Granitypark
 public static string GetReportPath(DevExpress.XtraReports.UI.XtraReport fReport, string ext)
 {
     System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
     string repName = fReport.Name;
     if(repName.Length == 0) repName = fReport.GetType().Name;
     string dirName = Path.GetDirectoryName(asm.Location);
     return Path.Combine(dirName, repName + "." + ext);
 }
コード例 #2
0
 public override object Visit(DevExpress.Data.Filtering.OperandValue operand)
 {
     if (operand.GetType().FullName == "DevExpress.Persistent.Base.CriteriaWrapperOperandParameter") //Non Public Type
     {
         return new CriteriaToStringVisitResult(ValueToString(operand.Value));
     }
     else
     {
         return base.Visit(operand);
     }
 }
コード例 #3
0
ファイル: PlugIn.cs プロジェクト: khanhdtn/my-fw-win
 public bool HookShowForm(DevExpress.XtraEditors.XtraForm frm)
 {
     //Lấy tên của các warning của form đưa vào biến names.
     string frmName = frm.GetType().Name;
     //warSystem = WarningSupport.StartWarning(frmName);
     return true;
 }
コード例 #4
0
ファイル: clsMain.cs プロジェクト: vanloc0301/hugate-parking
 private void SaveCaption(DevExpress.XtraTab.XtraTabPage ctrPage, Form pForm, string pLanguage)
 {
     InsertControl(pForm.Name, ctrPage.GetType().FullName, ctrPage.Name, ctrPage.Text, pLanguage, "");
     foreach (Control ctr in ctrPage.Controls)
     {
         if (strControlNotSave.Contains(ctr.GetType().Name))
         {
             continue;
         }
         else
         {
             CallSaveCaption(ctr.GetType().Name, ctr, pForm, pLanguage);
         }
     }
 }
コード例 #5
0
ファイル: clsMain.cs プロジェクト: vanloc0301/hugate-parking
 private void SaveCaption(DevExpress.XtraEditors.GroupControl pGroupControl, Form pForm, string pLanguage)
 {
     InsertControl(pForm.Name, pGroupControl.GetType().FullName, pGroupControl.Name, pGroupControl.Text, pLanguage, "");
     foreach (Control ctr in pGroupControl.Controls)
     {
         if (strControlNotSave.Contains(ctr.GetType().Name))
         {
             continue;
         }
         else
         {
             CallSaveCaption(ctr.GetType().Name, ctr, pForm, pLanguage);
         }
     }
 }
コード例 #6
0
ファイル: BaseParameters.cs プロジェクト: jb3622/Serrano
        public void ResetLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName)
        {
            RegUtils.DeleteSetting("GridLayout\\" + gridName);
            view.ClearColumnsFilter();
            view.ClearGrouping();
            view.ClearSorting();

            if (view.GetType() == typeof(DevExpress.XtraGrid.Views.BandedGrid.BandedGridView))
            {
                var bandedView = (DevExpress.XtraGrid.Views.BandedGrid.BandedGridView) view;
                foreach (DevExpress.XtraGrid.Views.BandedGrid.GridBand band in bandedView.Bands)
                    band.Visible=true;
            }
        }
コード例 #7
0
 static void LoadCompanyView(object sender, EventArgs e, DevExpress.XtraEditors.XtraUserControl caller)
 {
     System.Reflection.MethodInfo mi = caller.GetType().GetMethod("LoadCompanyView");
     mi.Invoke(caller, null);
 }
コード例 #8
0
ファイル: frmMenu.cs プロジェクト: xlgwr/producting
        private void showSub(DevExpress.XtraBars.BarItem ctl, out  bool IsVisible)
        {
            IsVisible = false;
            try
            {
                if (ctl.GetType().ToString() == "DevExpress.XtraBars.BarButtonItem")
                {
                    string strForm = ctl.Tag.ToString() + ".cs";
                    if (Common._dicRoleInfo.ContainsKey(strForm))
                    {
                        string str = Common._dicRoleInfo[strForm];
                        if (Common._dicRoleInfo[strForm] == "1")
                        {
                            ctl.Visibility = BarItemVisibility.Always;
                            IsVisible = true;
                        }
                        else
                        {
                            ctl.Visibility = BarItemVisibility.Never;
                        }
                    }
                    else
                    {

                        ctl.Visibility = BarItemVisibility.Never;
                    }
                }
                if (ctl.GetType().ToString() == "DevExpress.XtraBars.BarSubItem")
                {
                    DevExpress.XtraBars.BarSubItem ct = (DevExpress.XtraBars.BarSubItem)ctl;
                    foreach (DevExpress.XtraBars.LinkPersistInfo item in ct.LinksPersistInfo)
                    {
                        bool TempVisible = false;
                        showSub(item.Item, out TempVisible);
                        item.Visible = TempVisible;
                        //用或运算将值传给上成BarSubItem
                        IsVisible = IsVisible || TempVisible;
                    }
                }


            }
            catch (Exception ex)
            {

                throw ex;
            }
        }