/*private Dictionary<string, EIBLabel> mapList = new Dictionary<string, EIBLabel>();

        internal Dictionary<string, EIBLabel> MapList
        {
            get {
                if (formPatternMapList.ContainsKey(designerForm.CurrentBaseWindow.Name))
                {
                    return formPatternMapList[designerForm.CurrentBaseWindow.Name];
                }
                else
                {
                    return null;
                }
            }
            //set { mapList = value; }
        }*/
        //internal Dictionary<string, Dictionary<string, EIBLabel>> formPatternMapList = new Dictionary<string, Dictionary<string, EIBLabel>>();
        //private Dictionary<string, EIBLabel> labelList = new Dictionary<string, EIBLabel>();
        public WebServiceExplorer(FormDesigner form)
        {
            designerForm = form;
            this.Text = "Web Service Explorer";
            this.TabText = "Web Service Explorer";
            InitializeComponent();
        }
        public FrmMasterDetailDt(FormDesigner frmDesigner)
        {
            InitializeComponent();
            this._data = frmDesigner.Data;
            InitActionCommand();
            _data.SetDetailValue += new EventHandler(_data_SetDetailValue);
            //frmDesigner.setStaticFilter();
            this._frmDesigner              = frmDesigner;
            this._bindingSource            = frmDesigner.bindingSource;
            _bindingSource.CurrentChanged += new EventHandler(_bindingSource_CurrentChanged);

            //dataNavigatorMain.DataSource = this._bindingSource;
            dxErrorProviderMain.DataSource  = this._bindingSource;
            bindingNavigator1.BindingSource = _bindingSource;
            bindingNavigator1.ItemClicked  += new ToolStripItemClickedEventHandler(bindingNavigator1_ItemClicked);
            InitializeLayout();
            this.Load += new EventHandler(FrmMasterDetailCt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            //dataNavigatorMain.PositionChanged += new EventHandler(dataNavigatorMain_PositionChanged);
            AddICDTData(_data);
            this.WindowState = FormWindowState.Maximized;
            if (_data._dtDtReport != null)
            {
                glReport.Properties.DataSource   = _data._dtDtReport;
                glReport.Properties.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(glReport_ButtonClick);
            }
        }
示例#3
0
        public FrmPQ(FormDesigner f, CDTData _data)
        {
            InitializeComponent();
            this.KeyUp += new KeyEventHandler(KeyPess);
            _Data       = _data;
            UserList    = (new SysUser()).GetUserGroupList();
            dbsUser     = new BindingSource();

            dbsDM = new BindingSource();
            dbsUser.DataSource       = UserList;
            dbsUser.PositionChanged += new EventHandler(dbsUser_PositionChanged);

            gridControl1.DataSource = UserList;


            grDM = f.GenGridControl(_data.DsStruct.Tables[0], false, DockStyle.Fill);
            gvDM = grDM.ViewCollection[0] as DevExpress.XtraGrid.Views.Grid.GridView;
            gvDM.OptionsBehavior.Editable         = true;
            gvDM.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;
            this.Controls.Add(grDM);

            grDM.BringToFront();
            grDM.DataSource = dbsDM;

            //Thêm cột nữa


            addChkCol();
            Status.Text = "";
            dbsUser_PositionChanged(dbsUser, new EventArgs());
        }
示例#4
0
        private void ShowVoucher(DataRow dr)
        {
            timer1.Enabled = false;
            BindingSource _bindingSource = new BindingSource();
            string        maCT;//= gridViewReport.GetFocusedRowCellValue("MACT").ToString();

            maCT = dr["MaCT"].ToString();
            string  cEdit = dr["CEdit"].ToString();
            CDTData data1 = GetDataForVoucher(maCT, dr["ID"].ToString(), cEdit);

            if (data1.DsData.Tables[0].Rows.Count == 0)
            {
                return;
            }
            FormDesigner _frmDesigner = new FormDesigner(data1);

            _bindingSource            = new BindingSource();
            _bindingSource.DataSource = data1.DsData;
            _bindingSource.DataMember = data1.DsData.Tables[0].TableName;
            _frmDesigner            = new FormDesigner(data1, _bindingSource);
            _frmDesigner.formAction = FormAction.Edit;
            FrmMasterDetailDt frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);

            frmMtDtCt.ShowDialog();
            timer1.Enabled = true;
        }
示例#5
0
        /*private Dictionary<string, EIBLabel> mapList = new Dictionary<string, EIBLabel>();
         *
         * internal Dictionary<string, EIBLabel> MapList
         * {
         *  get {
         *      if (formPatternMapList.ContainsKey(designerForm.CurrentBaseWindow.Name))
         *      {
         *          return formPatternMapList[designerForm.CurrentBaseWindow.Name];
         *      }
         *      else
         *      {
         *          return null;
         *      }
         *  }
         *  //set { mapList = value; }
         * }*/
        //internal Dictionary<string, Dictionary<string, EIBLabel>> formPatternMapList = new Dictionary<string, Dictionary<string, EIBLabel>>();
        //private Dictionary<string, EIBLabel> labelList = new Dictionary<string, EIBLabel>();


        public WebServiceExplorer(FormDesigner form)
        {
            designerForm = form;
            this.Text    = "Web Service Explorer";
            this.TabText = "Web Service Explorer";
            InitializeComponent();
        }
示例#6
0
        public FrmSgMergeCode(CDTData data, FormDesigner fDesigner)
        {
            InitializeComponent();
            this._data = data;
            //SetRight();
            this._frmDesigner = fDesigner;
            gridLookUpEdit1View.BeginInit();

            gridColumn1.FieldName = _data.DsData.Tables[0].Columns[0].ColumnName;
            DataRow[] lf = _data.DsStruct.Tables[0].Select("FieldName ='" + gridColumn1.FieldName + "'");
            if (lf.Length > 0)
            {
                gridColumn1.Caption = lf[0]["LabelName"].ToString();
            }
            gridLookUpEdit1View.Columns.Add(gridColumn1);

            gridColumn2.FieldName = _data.DsData.Tables[0].Columns[1].ColumnName;
            lf = _data.DsStruct.Tables[0].Select("FieldName ='" + gridColumn2.FieldName + "'");
            if (lf.Length > 0)
            {
                gridColumn2.Caption = lf[0]["LabelName"].ToString();
            }
            gridLookUpEdit1View.Columns.Add(gridColumn2);
            gridLookUpEdit1View.EndInit();

            bs.DataSource = _data.DsData.Tables[0];
            gridLookUpEdit1.Properties.DataSource    = bs;
            gridLookUpEdit1.Properties.ValueMember   = _data.DsData.Tables[0].Columns[0].ColumnName;
            gridLookUpEdit1.Properties.DisplayMember = _data.DsData.Tables[0].Columns[1].ColumnName;
        }
示例#7
0
        /// <summary>
        /// Mở bảng trong listbox theo Type mặc định
        /// </summary>
        private void lbcTenForm_DoubleClick(object sender, EventArgs e)
        {
            gcMain = new GridControl();
            gvMain = new DevExpress.XtraGrid.Views.Grid.GridView();
            tlMain = new TreeList();
            gvMain.OptionsBehavior.Editable = _isUpdate;
            tlMain.OptionsBehavior.Editable = _isUpdate;
            _data = DataFactory.DataFactory.Create(DataType.Single, _sysTable.DtTable.Rows[lbcTable.SelectedIndex]);

            if (_data.DsData == null)
            {
                _data.GetData();
            }
            _bindingSource = new BindingSource();
            _frmDesigner   = new FormDesigner(_data, _bindingSource);

            gcMain = _frmDesigner.GenGridControl(_data.DsStruct.Tables[0], true, DockStyle.Fill);
            gvMain = gcMain.ViewCollection[0] as DevExpress.XtraGrid.Views.Grid.GridView;
            this.Controls.Add(gcMain);

            if (_data.DrTable["ParentPk"].ToString() == string.Empty)
            {
                layoutControlItemTreeList.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            }
            layoutControl1.Visible = true;
            gcMain.BringToFront();
            layoutControl1.SendToBack();
            if (_isUpdate)
            {
                GetRelativeFunction();
            }

            DisplayData();
        }
示例#8
0
        public fDanhSoCT(DataMasterDetail data, FormDesigner designer)
        {
            InitializeComponent();

            _data     = data;
            _designer = designer;
        }
示例#9
0
        private void lbWanning_Click(object sender, EventArgs e)
        {
            LabelControl l  = sender as LabelControl;
            DataRow      dr = l.Tag as DataRow;

            BindingSource _bindingSource = new BindingSource();
            string        maCT;//= gridViewReport.GetFocusedRowCellValue("MACT").ToString();

            maCT = dr["MaCT"].ToString();
            CDTData      data1        = GetDataForVoucher(maCT, dr["PkID"].ToString());
            FormDesigner _frmDesigner = new FormDesigner(data1);

            _bindingSource            = new BindingSource();
            _bindingSource.DataSource = data1.DsData;
            _bindingSource.DataMember = data1.DsData.Tables[0].TableName;
            _frmDesigner            = new FormDesigner(data1, _bindingSource);
            _frmDesigner.formAction = FormAction.Edit;
            FrmMasterDetailDt frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);

            frmMtDtCt.ShowDialog();
            string sql = "update sysNotify set sStatus=0 where stt=" + dr["Stt"].ToString();

            _structdb.UpdateByNonQuery(sql);
            this.Visible = false;
            timer1_Tick(timer1, new EventArgs());
            //}
        }
示例#10
0
        public FrmSingleDt(FormDesigner frmDesigner)
        {
            InitializeComponent();

            this._data = frmDesigner.Data;

            this._frmDesigner = frmDesigner;
            AddICDTData(_data);
            this._bindingSource                        = frmDesigner.bindingSource;
            dataNavigatorMain.DataSource               = this._bindingSource;
            dxErrorProviderMain.DataSource             = this._bindingSource;
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            InitializeLayout();
            this.Load += new EventHandler(FrmSingleDt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            dataNavigatorMain.PositionChanged         += new EventHandler(dataNavigatorMain_PositionChanged);
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            foreach (ICDTData pl in _lstICDTData)
            {
                pl.AddEvent();
            }
        }
示例#11
0
        private void grLoaiCT_EditValueChanged(object sender, EventArgs e)
        {
            string systableID = grLoaiCT.EditValue.ToString();

            //int packageID = int.Parse(Config.GetValue("sysPackageID").ToString());
            _data = new DataMasterDetail(systableID);
            _data.GetData();
            _designer = new FormDesigner(_data);
            //_data.GetInfor()
            gMain            = _designer.GenGridControl(_data.DsStruct.Tables[0], false, DockStyle.Fill);
            gMain.DataSource = _data.DsData.Tables[0];
            panelControl3.Controls.Clear();
            panelControl3.Controls.Add(gMain);
        }
示例#12
0
        public BuildWindow(FormDesigner form)
        {
            designerForm = form;
            //
            // Required for Windows Form Designer support
            //

            InitializeComponent();
            this.Text = "Build Window";
            this.TabText = "Build Window";

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
示例#13
0
        public BuildWindow(FormDesigner form)
        {
            designerForm = form;
            //
            // Required for Windows Form Designer support
            //

            InitializeComponent();
            this.Text    = "Build Window";
            this.TabText = "Build Window";

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
示例#14
0
 public DataPatternExlorer(FormDesigner form)
 {
     designerForm = form;
     //
     // Required for Windows Form Designer support
     //
     this.Text    = "Data Pattern Explorer";
     this.TabText = "Data Pattern Explorer";
     InitializeComponent();
     //initFormContextMenu();
     //initDataContextMenu();
     //initWorkflowContextMenu();
     //
     // TODO: Add any constructor code after InitializeComponent call
     //
 }
示例#15
0
 public DataPatternExlorer(FormDesigner form)
 {
     designerForm = form;
     //
     // Required for Windows Form Designer support
     //
     this.Text = "Data Pattern Explorer";
     this.TabText = "Data Pattern Explorer";
     InitializeComponent();
     //initFormContextMenu();
     //initDataContextMenu();
     //initWorkflowContextMenu();
     //
     // TODO: Add any constructor code after InitializeComponent call
     //
 }
示例#16
0
        private void fKHManage_Load(object sender, EventArgs e)
        {
            vDateEdit2.EditValue = DateTime.Parse(DateTime.Now.ToShortDateString());
            vDateEdit1.EditValue = DateTime.Parse(DateTime.Now.ToShortDateString()).AddYears(-1);
            ckCAuto.Checked      = false;
            dmKH = new DataSingle("dmKH", "7");
            dmKH.GetData();
            bsDMKH.DataSource          = dmKH.DsData.Tables[0];
            bsDMKH.CurrentItemChanged += BsDMKH_CurrentItemChanged;
            FormDesigner designer = new FormDesigner(dmKH);
            GridControl  gc       = designer.GenGridControl(dmKH.DsStruct.Tables[0], false, DockStyle.Fill);

            panelControl9.Controls.Add(gc);
            gc.DataSource = bsDMKH;

            TabControl.SelectedPageChanged += TabControl_SelectedPageChanged;
        }
示例#17
0
 private void Init_History()
 {
     dtGDHistory           = new DataSingle("dtGDHistory", "7");
     dtGDHistory.Condition = "1=0";
     dtGDHistory.GetData();
     designer_history = new FormDesigner(dtGDHistory);
     gcHistory        = designer_history.GenGridControl(dtGDHistory.DsStruct.Tables[0], false, DockStyle.Fill);
     designer_history.bindingSource = bsGDHistory;
     foreach (CDTRepGridLookup glc in designer_history.rlist)
     {
         if (glc.Data != null)
         {
             glc.Data.GetData();
         }
     }
     tbHistory.Controls.Add(gcHistory);
     setRight_History();
 }
示例#18
0
 protected override void WndProc(ref Message message)
 {
     if (message.Msg == NativeMethods.WM_LBUTTONDOWN)
     {
         int param = (int)message.LParam;
         if ((_paletteItem != null) && (this.GetNodeAt(param & 0xFFFF, param >> 16) != null))
         {
             if (_dropFilter.DropHighlightNode != null)
             {
                 ((DesignerNode)_dropFilter.DropHighlightNode).AddNew(_paletteItem, _dropFilter.DropLinePosition);
             }
             FormDesigner.PaletteItemDropped();
             message.Result = IntPtr.Zero;
             return;
         }
     }
     base.WndProc(ref message);
 }
示例#19
0
        public FrmSingleDt(FormDesigner frmDesigner)
        {
            InitializeComponent();

            this._data                     = frmDesigner.Data;
            this._frmDesigner              = frmDesigner;
            this._bindingSource            = frmDesigner.bindingSource;
            dataNavigatorMain.DataSource   = this._bindingSource;
            dxErrorProviderMain.DataSource = this._bindingSource;

            InitializeLayout();
            this.Load += new EventHandler(FrmSingleDt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            dataNavigatorMain.PositionChanged += new EventHandler(dataNavigatorMain_PositionChanged);
        }
示例#20
0
        public FrmMasterDetailDt(FormDesigner frmDesigner)
        {
            InitializeComponent();
            this._data                     = frmDesigner.Data;
            _data.SetDetailValue          += new EventHandler(_data_SetDetailValue);
            this._frmDesigner              = frmDesigner;
            this._bindingSource            = frmDesigner.bindingSource;
            dataNavigatorMain.DataSource   = this._bindingSource;
            dxErrorProviderMain.DataSource = this._bindingSource;

            InitializeLayout();
            this.Load += new EventHandler(FrmMasterDetailCt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            dataNavigatorMain.PositionChanged += new EventHandler(dataNavigatorMain_PositionChanged);
            AddICDTData(_data);
            this.WindowState = FormWindowState.Maximized;
        }
示例#21
0
        public fBanhang()
        {
            InitializeComponent();
            _data = new DataMasterDetail("DT3B", "7");

            _frmDesign = new FormDesigner(_data, bs);
            _data.GetData();
            dt = Getstruct();
            getdata();
            bs.DataSource      = _data.DsData;
            this.bs.DataMember = _data.DsData.Tables[0].TableName;
            _data.DsData.Tables[0].ColumnChanged += FBanhang_ColumnChanged;
            gridControl1.DataSource = bs;
            bs.CurrentChanged      += Bs_CurrentChanged;
            gridControl1.DataMember = this._data.DrTable["TableName"].ToString();

            gridLookUpEdit1.Properties.ImmediatePopup = true;
            gridView1.KeyUp += new KeyEventHandler(gridView1_KeyUp);
            this.KeyUp      += new KeyEventHandler(fBanhang_KeyUp);

            MaCN    = Config.GetValue("MaCN").ToString();
            sysDBID = Config.GetValue("sysDBID").ToString();
            NewCT();
        }
示例#22
0
 private void fCheckin_Load(object sender, EventArgs e)
 {
     FormDesigner f = new FormDesigner(new DataSingle("MT71", "7"));
 }
示例#23
0
        private void Init_MT35()
        {
            MT35          = new DataMasterDetail("DT35", "7");
            designer_MT35 = new FormDesigner(MT35);
            if (Tungay == null || Denngay == null)
            {
                return;
            }
            if (MT35.DsData == null)
            {
                GetData_MT35();
            }
            gc_MT35 = designer_MT35.GenGridControl(MT35.DsStruct.Tables[0], false, DockStyle.Fill);
            gv_MT35 = gc_MT35.ViewCollection[0] as DevExpress.XtraGrid.Views.Grid.GridView;
            gv_MT35.OptionsView.ShowDetailButtons = false;
            gv_MT35.OptionsBehavior.Editable      = true;
            gv_MT35.OptionsBehavior.ReadOnly      = true;
            //foreach (GridColumn gc in gv_MT35.Columns)
            //{
            //    if (gc.ColumnEdit != null && (gc.ColumnEdit as CDTRepGridLookup) != null)
            //    {
            //        foreach (EditorButton b in (gc.ColumnEdit as CDTRepGridLookup).Buttons)
            //            if (b.Kind == ButtonPredefines.Plus) b.Visible = false;
            //    }
            //}
            pOrder.Controls.Add(gc_MT35);
            SplitterControl spc = new SplitterControl();

            spc.Dock = DockStyle.Bottom;
            pOrder.Controls.Add(spc);
            gc_DT35 = designer_MT35.GenGridControl(MT35.DsStruct.Tables[1], false, DockStyle.Bottom);
            gv_DT35 = gc_DT35.ViewCollection[0] as DevExpress.XtraGrid.Views.Grid.GridView;
            gv_DT35.OptionsBehavior.Editable      = true;
            gv_DT35.OptionsBehavior.ReadOnly      = true;
            gv_DT35.OptionsView.ShowFooter        = false;
            gv_DT35.OptionsView.ShowGroupPanel    = false;
            gv_DT35.OptionsView.ShowDetailButtons = false;
            //foreach (GridColumn gc in gvDegv_DT35tail.Columns)
            //{
            //    if (gc.ColumnEdit != null && (gc.ColumnEdit as CDTRepGridLookup) != null)
            //    {
            //        foreach (EditorButton b in (gc.ColumnEdit as CDTRepGridLookup).Buttons)
            //            if (b.Kind == ButtonPredefines.Plus) b.Visible = false;
            //    }
            //}
            pOrder.Controls.Add(gc_DT35);
            try
            {
                int i = MT35.DsData.Tables[0].Rows.IndexOf(MT35.DrCurrentMaster);
                i = gv_MT35.GetRowHandle(i);
                if (!gv_MT35.IsGroupRow(i))
                {
                    RowGroup_MT35 = gv_MT35.GetParentRowHandle(i);
                }
            }
            catch { }
            foreach (DevExpress.XtraGrid.Columns.GridColumn col in gv_MT35.Columns)
            {
                if (col.FieldName.ToUpper() == "TASKID")
                {
                    DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repTask = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox();
                    this.gc_MT35.RepositoryItems.Add(repTask);

                    repTask.AutoHeight     = false;
                    repTask.GlyphAlignment = DevExpress.Utils.HorzAlignment.Center;
                    if (MT35.tbTask != null)
                    {
                        for (int i = 0; i < MT35.tbTask.Rows.Count; i++)
                        {
                            DataRow drTask = MT35.tbTask.Rows[i];
                            if (drTask["Icon"] != DBNull.Value)
                            {
                                if (imageList_Order == null)
                                {
                                    imageList_Order = new ImageList();
                                }
                                this.imageList_Order.Images.Add(GetImage(drTask["Icon"] as byte[]));
                                repTask.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] {
                                    new DevExpress.XtraEditors.Controls.ImageComboBoxItem(drTask["TaskLabel"].ToString(), drTask["ID"], repTask.Items.Count)
                                });
                            }
                        }
                    }
                    repTask.SmallImages = this.imageList_Order;

                    col.ColumnEdit = repTask;
                    col.Caption    = "";
                }
            }
        }
示例#24
0
        private void simpleButtonDetail_Click(object sender, EventArgs e)
        {
            string linkField = _data.DrTable["LinkField"].ToString().ToUpper();

            if (linkField == string.Empty)
            {
                return;
            }
            if (gridViewReport.SelectedRowsCount == 0)
            {
                return;
            }
            string  linkItem = gridViewReport.GetFocusedRowCellValue(linkField).ToString().Trim();
            DataRow dr       = gridViewReport.GetDataRow(gridViewReport.FocusedRowHandle);

            foreach (DataColumn col in dr.Table.Columns)
            {
                Config.NewKeyValue("@" + col.ColumnName, dr[col]);
            }
            if (linkItem == string.Empty)
            {
                return;
            }

            string linkString = linkField + " = '" + linkItem + "'";

            DataReport data = (_data as DataReport).GetDataForDetailReport(linkField, linkItem) as DataReport;

            if (data != null)
            {
                data.PsString = (_data as DataReport).PsString;
                ReportPreview rptPre = new ReportPreview(data);
                data.SaveVariables();
                // rptPre.MdiParent = this.MdiParent;
                rptPre.Show();
                rptPre.Disposed += new EventHandler(rptPre_Disposed);
                //load lại dữ liệu trong trường hợp sửa lại voucher
                //if (rptPre.DataChanged)
                //{
                //    (_data as DataReport).GetDataForReport();
                //    gridControlReport.DataSource = (_data as DataReport).DtReportData;
                //    this.DataChanged = true;
                //}
            }
            else
            {
                string maCT;//= gridViewReport.GetFocusedRowCellValue("MACT").ToString();
                maCT = dr["MaCT"].ToString();
                CDTData data1 = (_data as DataReport).GetDataForVoucher(maCT, linkItem);
                _bindingSource                 = new BindingSource();
                _bindingSource.DataSource      = data1.DsData;
                this._bindingSource.DataMember = data1.DsData.Tables[0].TableName;
                this._frmDesigner              = new FormDesigner(data1, _bindingSource);
                _frmDesigner.formAction        = FormAction.Edit;
                FrmMasterDetailDt frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);
                if (frmMtDtCt.ShowDialog() == DialogResult.OK)
                {
                    (_data as DataReport).GetDataForReport();
                    gridControlReport.DataSource = (_data as DataReport).DtReportData;
                    DataChanged = true;
                }
            }
        }
示例#25
0
 public BuildTool(FormDesigner form)
 {
     BuildTool.form = form;
     form.MakePublish(false);
 }
示例#26
0
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("en-US", false);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US", false);
            Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //MessageBox.Show(Application.StartupPath);
            string omlfFileDir = Application.StartupPath;
            //string omlfFilePath = Application.StartupPath + @"\NolisFormDesigner.omlf";
            string ContentsOfFile     = null;
            string dirConfig          = null;
            bool   isValidLicenseFile = false;

            //try
            //{
            //    //dirConfig = @"./"+"a";
            //    //FileInfo fi = new FileInfo(dirConfig);
            //    string [] omlfFiles = Directory.GetFiles(omlfFileDir, "*.omlf", SearchOption.TopDirectoryOnly);
            //    foreach (string omlfFilePath in omlfFiles)
            //    {
            //        try
            //        {
            //            ContentsOfFile = File.ReadAllText(omlfFilePath);
            //            isValidLicenseFile = ValidateLicenseFile(omlfFileDir, ContentsOfFile);
            //            if (isValidLicenseFile)
            //                break;
            //        }
            //        catch (Exception excep)
            //        {

            //        }
            //    }
            //    if (!isValidLicenseFile)
            //    {
            //        OpenFileDialog openFileDialog = new OpenFileDialog();
            //        openFileDialog.InitialDirectory = omlfFileDir;
            //        openFileDialog.DefaultExt = "*.omlf";
            //        openFileDialog.Filter = "(omlf Files)|*.omlf";
            //        DialogResult openDialogResult = openFileDialog.ShowDialog();
            //        if (openDialogResult == DialogResult.Cancel)
            //        {
            //            MessageBox.Show("Sorry. Please select the omlf(oxyent Medical Licence File) file.", "Form Designer", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //            return;
            //        }
            //        else
            //        {
            //            ContentsOfFile = File.ReadAllText(openFileDialog.FileName);
            //        }
            //        isValidLicenseFile = ValidateLicenseFile(omlfFileDir, ContentsOfFile);
            //    }
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
            isValidLicenseFile = true;
            if (isValidLicenseFile)
            {
                currentForm = new EIBFormDesigner.Designer.FormDesigner();
                //Uncomment if you want designer to cover the whole desktop Screen
                //ef.FormBorderStyle = FormBorderStyle.None;
                currentForm.WindowState = FormWindowState.Maximized;
                //SceanrioBuilder sc = new SceanrioBuilder();
                Application.Run(currentForm);
            }
        }
        public async Task OnWidthChangedAsync(ChangeEventArgs e)
        {
            ComponentData.Width = Convert.ToInt32(e.Value);

            await FormDesigner.StateHasChangedAsync();
        }
        public async Task OnLabelChangedAsync(ChangeEventArgs e)
        {
            ComponentData.Label = e.Value.ToString();

            await FormDesigner.StateHasChangedAsync();
        }