Exemplo n.º 1
0
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            DBInitDataConfig config = new DBInitDataConfig();

            config.can_save         = true;
            config.CurrentDBVersion = txtCurrentVersion.Text.Trim();
            if (txtSysConfigTable.Text.Trim() != "")
            {
                config.configuration_table_name = txtSysConfigTable.Text.Trim();
            }
            if (txtTableNameColumn.Text.Trim() != "")
            {
                config.configuration_key_column = txtTableNameColumn.Text.Trim();
            }
            if (txtTableValueColumn.Text.Trim() != "")
            {
                config.configuration_value_column = txtTableValueColumn.Text.Trim();
            }
            if (txtTableDBVersionKey.Text.Trim() != "")
            {
                config.configuration_db_version_key = txtTableDBVersionKey.Text.Trim();
            }
            string msg = config.saveTo(parent.rootFolder());

            if (msg != "")
            {
                ExMessageBox.Show(root, msg, "错误", ExMessageBoxIcon.Error);
            }
            else
            {
                parent.table_config = config;
                parent.updateDBStatus();
                this.Close();
            }
        }
        private void App_InstallStateChanged(object sender, EventArgs e)
        {
            switch (Application.Current.InstallState)
            {
            case InstallState.Installed:
                scrollViewer.Visibility = System.Windows.Visibility.Collapsed;
                txtDemo.Visibility      = System.Windows.Visibility.Collapsed;
                tbChk.Visibility        = System.Windows.Visibility.Collapsed;
                chkYes.Visibility       = System.Windows.Visibility.Collapsed;

                //ExMessageBox.Show("SalesInnovation(販売管理アプリケーション)がインストールされました。");
                tbMessage.Text        = "SalesInnovation(販売管理アプリケーション)がインストールされました。";
                tbMessage.Foreground  = new SolidColorBrush(Colors.White);
                btnInstall.Visibility = System.Windows.Visibility.Collapsed;
                tbTitle.Visibility    = System.Windows.Visibility.Collapsed;
                //HtmlPage.Window.Eval("(window.open('','_top').opener=top).close();");
                break;

            case InstallState.InstallFailed:
                tbMessage.Text       = "SalesInnovation(販売管理アプリケーション)のインストールに失敗しました。";
                tbMessage.Foreground = new SolidColorBrush(Colors.White);
                ExMessageBox.Show("SalesInnovation(販売管理アプリケーション)のインストールに失敗しました。");
                break;

            case InstallState.Installing:
            case InstallState.NotInstalled:
                break;

            default:
                break;
            }
        }
        // F3ボタン(更新) クリック
        public override void btnF3_Click(object sender, RoutedEventArgs e)
        {
            if (objMstList == null)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }
            if (objMstList.Count == 0)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }

            int intIndex = this.dg.SelectedIndex;

            if (intIndex < 0)
            {
                ExMessageBox.Show("行が選択されていません。");
                return;
            }

            Dlg_MstSearchGroup.this_id           = objMstList[intIndex].id;
            Dlg_MstSearchGroup.this_name         = objMstList[intIndex].name;
            Dlg_MstSearchGroup.this_attribute1   = objMstList[intIndex].attribute1;
            Dlg_MstSearchGroup.this_attribute2   = objMstList[intIndex].attribute2;
            Dlg_MstSearchGroup.this_attribute3   = objMstList[intIndex].attribute3;
            Dlg_MstSearchGroup.this_DialogResult = true;
        }
Exemplo n.º 4
0
        private void btnDelete_Click(object sender, System.EventArgs e)
        {
            if (table == null)
            {
                ExMessageBox.Show(this, "请选择一个数据表再进行操作!");
                return;
            }
            if (data_profile == null)
            {
                return;
            }
            if (dgvData.SelectedCells.Count == 0)
            {
                return;
            }
            int row = dgvData.SelectedCells[0].RowIndex;

            if (row < 0)
            {
                return;
            }
            if (ExMessageBox.Show(this, "删除当前所选数据项, 确认继续吗?", "删除数据项", ExMessageBoxIcon.Question, ExMessageBoxButton.YesNo) == DialogResult.No)
            {
                return;
            }
            data_profile.data_list.RemoveAt(row);
            dgvData.Rows.RemoveAt(row);
            data_profile.toXmlFile(root_path);
        }
Exemplo n.º 5
0
 private void btnDeleteProject_Click(object sender, EventArgs e)
 {
     try
     {
         string name = cbProjectName.SelectedItem.ToString();
         if (ExMessageBox.Show(root, "将要删除当前项目'" + name + "', 确认继续吗?", "删除项目", ExMessageBoxIcon.Question, ExMessageBoxButton.YesNo) == DialogResult.No)
         {
             return;
         }
         var group = root.config.MaintainGroup;
         var msg   = group.delete(name);
         if (!msg.isNull())
         {
             ExMessageBox.Show(root, Color.Tomato, msg, "删除失败", ExMessageBoxIcon.Error, ExMessageBoxButton.OK);
             return;
         }
         if (root.config.current_project == name)
         {
             if (group.projects.Count > 0)
             {
                 root.config.current_project = group.projects[0].name;
             }
             else
             {
                 root.config.current_project = "";
             }
         }
         root.config.MaintainGroup = group;
         root.config.save();
         loadProjectList();
     }
     catch { ExMessageBox.Show(root, Color.Tomato, "当前还未选择项目", "删除失败", ExMessageBoxIcon.Error, ExMessageBoxButton.OK); }
 }
        public override void CopyCheck(object entity)
        {
            if (entity != null)
            {
                EntityCopying _entity = (EntityCopying)entity;

                if (_entity._message != "" || _entity._is_lock_success == false)
                {
                    return;
                }
                else
                {
                    this.DialogResult = true;
                    this.ExistsData   = _entity._is_exists_data;
                    Dlg_Copying win = (Dlg_Copying)ExVisualTreeHelper.FindPerentChildWindow(this);
                    win.Close();
                    return;
                }
            }
            // 失敗
            else
            {
                ExMessageBox.Show("複写情報の取得で予期せぬエラーが発生しました。");
                return;
            }
        }
Exemplo n.º 7
0
        private void Current_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
        {
            if (e.UpdateAvailable)
            {
                ExMessageBox.Show("最新アプリケーションを更新しました、再起動してください。");
                Application.Current.MainWindow.Close();
            }
            else if (e.Error != null && e.Error is PlatformNotSupportedException)
            {
                ExMessageBox.Show("最新Silverligtバージョンを更新してください。");
                blnUpdate = true;
            }
            else
            {
                if (e.Error == null)
                {
                }
                else
                {
                    ExMessageBox.Show(e.Error.Message);
                }
            }

            ExBackgroundWorker.DoWork_Close(win, 2000);
            ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 2100);
        }
Exemplo n.º 8
0
 private void cbProjectName_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         var name = cbProjectName.SelectedItem.ToString();
         if (name.isNull())
         {
             current_project = new MaintainProject(); root.config.current_project = "";
         }
         else
         {
             if (show_msg_when_change_project)
             {
                 if (ExMessageBox.Show(root, "将要切换到新的项目'" + name + "', 确认继续吗?", "切换项目", ExMessageBoxIcon.Question, ExMessageBoxButton.YesNo) == DialogResult.No)
                 {
                     return;
                 }
             }
             current_project             = root.config.MaintainGroup.get(name);
             root.config.current_project = current_project.name;
         }
     }
     catch { current_project = new MaintainProject(); root.config.current_project = ""; }
     loadCurrentProject();
 }
        // F1ボタン(OK) クリック
        public override void btnF1_Click(object sender, RoutedEventArgs e)
        {
            if (lst == null)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }
            if (lst.Count == 0)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }

            int intIndex = this.dg.SelectedIndex;

            if (intIndex < 0)
            {
                ExMessageBox.Show("行が選択されていません。");
                return;
            }

            this.id           = lst[intIndex].ID;
            this.description  = lst[intIndex].DESCRIPTION;
            this.DialogResult = true;
        }
Exemplo n.º 10
0
        // F1ボタン(OK) クリック
        public override void btnF1_Click(object sender, RoutedEventArgs e)
        {
            if (objMstList == null)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }
            if (objMstList.Count == 0)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }

            int intIndex = this.dg.SelectedIndex;

            if (intIndex < 0)
            {
                ExMessageBox.Show("行が選択されていません。");
                return;
            }

            this.Id           = objMstList[intIndex].id;
            this.name         = objMstList[intIndex].name;
            this.attribute1   = objMstList[intIndex].attribute1;
            this.attribute2   = objMstList[intIndex].attribute2;
            this.attribute3   = objMstList[intIndex].attribute3;
            this.DialogResult = true;

            Dlg_MstSearch win = (Dlg_MstSearch)ExVisualTreeHelper.FindPerentChildWindow(this);

            win.Close();
        }
Exemplo n.º 11
0
 private void OnFileDeleteCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null)
         {
             ExMessageBox.Show("出力ファイル削除処理で通信エラーが発生しました。" + Environment.NewLine + e.Error);
         }
         else
         {
             try
             {
                 string _ret = e.Result;
                 //ExMessageBox.Show(_ret);
             }
             catch (Exception ex)
             {
                 ExMessageBox.Show("出力ファイル削除処理で予期せぬエラーが発生しました。" + Environment.NewLine + ex.Message);
                 return;
             }
         }
     }
     finally
     {
     }
 }
Exemplo n.º 12
0
        // 入力チェック(削除時)
        private void InputCheckDelete()
        {
            try
            {
                if (this.utlID.txtID.Text.Trim() == "")
                {
                    ExMessageBox.Show("データが選択されていません。");
                    return;
                }

                if (this._entity == null)
                {
                    ExMessageBox.Show("データが選択されていません。");
                    return;
                }

                if (this._entity._id == 0)
                {
                    ExMessageBox.Show("データが選択されていません。");
                    return;
                }

                UpdateData(Common.geUpdateType.Delete);
            }
            finally
            {
                Common.gblnBtnProcLock          = false;
                Common.gblnBtnDesynchronizeLock = false;
            }
        }
Exemplo n.º 13
0
        public void FileUpLoad()
        {
            try
            {
                if (this.uploadFileName == "")
                {
                    return;
                }
                if (this.data == null)
                {
                    return;
                }
                if (this.win == null)
                {
                    return;
                }

                var requestUri = string.Format("{0}?random={1}&upLoadFileName={2}&upLoadFileKbn={3}", Common.gstrFileUploadUrl, Common.gstrSessionString, this.uploadFileName, this.upLoadFileKbn);

                HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(requestUri);
                webRequest.Method = "POST";
                webRequest.BeginGetRequestStream(new AsyncCallback(WriteToStreamCallback), webRequest);
            }
            catch (Exception ex)
            {
                this.win.OnFileUploadCompleted("");
                ExMessageBox.Show("ファイルアップロード処理で予期せぬエラーが発生しました。(FileUpLoad)" + Environment.NewLine + ex.Message);
            }
        }
Exemplo n.º 14
0
        private void lb_Click(object sender, EventArgs e)
        {
            if (root.connection.db_type == DBType.Unknown)
            {
                return;
            }
            string schema = "";

            if (lb.SelectedIndex >= 0)
            {
                try
                {
                    schema = typeList.get(lb.SelectedItem.ToString()).value;
                }
                catch { }
            }
            DataTable data = DBQuery.schema(root.connection.connection_string, schema, out string msg);

            if (msg != "")
            {
                ExMessageBox.Show(root, msg, "提示", ExMessageBoxIcon.Error);
                return;
            }
            dgv.DataSource = data;
        }
Exemplo n.º 15
0
        public override void DataSelect(int intKbn, object objList)
        {
            if (this.proc_kbn == 1)
            {
                if (objList != null)
                {
                    ObservableCollection <EntityInquiry> _entityList = (ObservableCollection <EntityInquiry>)objList;
                    if (_entityList.Count == 0)
                    {
                        return;
                    }
                    if (_entityList[0]._lock_flg == 1)
                    {
                        ExMessageBox.Show("他ユーザーにて排他処理中です。");
                        return;
                    }

                    Dlg_SupportReturn returnDlg = new Dlg_SupportReturn();
                    returnDlg._entityList = _entityList;
                    returnDlg.Closed     += returnDlg_Closed;
                    returnDlg.Show();
                }
                return;
            }

            if (objList != null)
            {
                _entity = (ObservableCollection <EntityInquiry>)objList;
            }
            else
            {
                _entity = null;
            }
        }
        // F1ボタン(出力) クリック
        public override void btnF1_Click(object sender, RoutedEventArgs e)
        {
            // OK
            if (Common.gWinGroupType == Common.geWinGroupType.InpList)
            {
                if (entityList == null)
                {
                    ExMessageBox.Show("データが検索されていません。");
                    return;
                }
                if (entityList.Count == 0)
                {
                    ExMessageBox.Show("データが検索されていません。");
                    return;
                }

                int intIndex = this.dgPrint.SelectedIndex;
                if (intIndex < 0)
                {
                    ExMessageBox.Show("行が選択されていません。");
                    return;
                }

                this.no           = ExCast.zCLng(this.lst[this.dgPrint.SelectedIndex].no);
                this.DialogResult = true;

                Dlg_InpSearch win = (Dlg_InpSearch)ExVisualTreeHelper.FindPerentChildWindow(this);
                win.Close();

                // 直接設定すると何故か画面がフリーズする為、コメントアウト
                //win.no = this.lst[this.dg.SelectedIndex].no;
                //win.DialogResult = true;
            }
            // 出力
            else
            {
                if (Common.gWinGroupType == Common.geWinGroupType.InpListReport)
                {
                    this.ProcKbn = eProcKbn.Report;
                }
                else
                {
                    this.ProcKbn = eProcKbn.ReportDetail;
                }

                this.utlReport.rptKbn = DataReport.geReportKbn.OutPut;
                this.ProcKbn          = eProcKbn.Report;

                // ボタン押下時非同期入力チェックON
                Common.gblnBtnDesynchronizeLock = true;

                ExBackgroundInputCheckWk bk = new ExBackgroundInputCheckWk();
                bk.utl                  = this;
                bk.waitTime             = 500;
                this.txtDummy.IsTabStop = true;
                bk.focusCtl             = this.txtDummy;
                bk.bw.RunWorkerAsync();
            }
        }
Exemplo n.º 17
0
        // F4ボタン(行削除) クリック
        public override void btnF4_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // 選択有りか、データ有りか確認
                if (this.dg.SelectedIndex < 0)
                {
                    return;
                }
                if (this.dg.ItemsSource == null)
                {
                    return;
                }
                if (_entity == null)
                {
                    return;
                }
                if (_entity.Count == 0)
                {
                    return;
                }
                if (_entity.Count == 1 && this.dg.SelectedIndex == _entity.Count - 1)
                {
                    return;
                }

                int            _selectedIndex = dg.SelectedIndex;
                DataGridColumn dgCol          = this.dg.CurrentColumn;

                // 行削除
                _entity.RemoveAt(this.dg.SelectedIndex);
                SetDetailRecNo();

                // 行削除後の選択
                if (this.dg.SelectedIndex != 0)
                {
                    if (_selectedIndex <= _entity.Count - 1)
                    {
                        this.dg.SelectedIndex = this.dg.SelectedIndex;
                        this.dg.CurrentColumn = dgCol;
                    }
                    else
                    {
                        this.dg.SelectedIndex = this.dg.SelectedIndex - 1;
                        this.dg.CurrentColumn = dgCol;
                    }
                }

                // データ1件もない場合、デフォルト行の追加
                if (_entity.Count == 0)
                {
                    btnF3_Click(null, null);
                }
            }
            catch (Exception ex)
            {
                ExMessageBox.Show(CLASS_NM + ".btnF4_Click : 予期せぬエラーが発生しました。" + Environment.NewLine + ex.Message);
            }
        }
Exemplo n.º 18
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     if (ExMessageBox.Show(root, "清空当前sql语句内容吗?", "清空Sql", ExMessageBoxIcon.Question, ExMessageBoxButton.YesNo) == DialogResult.No)
     {
         return;
     }
     txtQuery.Text = "";
 }
        private void InitDataSet()
        {
            try
            {
                if (this.ProcKbn == eProcKbn.Update)
                {
                    if (this.IsGetCompanyGroupList == true && this.IsGetPersonList == true)
                    {
                        this.txtTitle.Text = this._entity._title;

                        if (this._entity._gropu_id == 0)
                        {
                            cmbGroup.SelectedIndex = 0;
                        }
                        else
                        {
                            for (int i = 0; i <= cmbGroup.Items.Count - 1; i++)
                            {
                                if (ExCast.zCStr(this.cmbGroup.Items[i].ToString()) == this._entity._gropu_nm)
                                {
                                    cmbGroup.SelectedIndex = i;
                                }
                            }
                        }
                        for (int i = 0; i <= cmbPerson.Items.Count - 1; i++)
                        {
                            if (ExCast.zCStr(this.cmbPerson.Items[i].ToString()) == this._entity._person_nm)
                            {
                                cmbPerson.SelectedIndex = i;
                            }
                        }
                        for (int i = 0; i <= cmbLevel.Items.Count - 1; i++)
                        {
                            if (ExCast.zCStr(this.cmbLevel.Items[i].ToString()) == this._entity._duties_level_nm)
                            {
                                cmbLevel.SelectedIndex = i;
                            }
                        }
                        for (int i = 0; i <= cmbState.Items.Count - 1; i++)
                        {
                            if (ExCast.zCStr(this.cmbState.Items[i].ToString()) == this._entity._duties_state_nm)
                            {
                                cmbState.SelectedIndex = i;
                            }
                        }
                        this.txtPath.Text    = this._entity._upload_file_name1;
                        this.txtContent.Text = this._entity._content;

                        ExBackgroundWorker.DoWork_Focus(this.txtTitle, 100);
                    }
                }
            }
            catch (Exception ex)
            {
                ExMessageBox.Show(CLASS_NM + ".InitDataSet 初期データの設定に失敗しました。" + Environment.NewLine + ex.ToString(), "エラー確認");
                this.DialogResult = false;
            }
        }
Exemplo n.º 20
0
        public async void DeleteAllConfig(object param)
        {
            var result = await ExMessageBox.ShowConfirm("警告", "此操作一旦执行,不可撤销,是否继续?", "执行", "取消");

            if (result)
            {
                ConfigsList.Clear();
            }
        }
Exemplo n.º 21
0
        // F3ボタン(行挿入) クリック
        public override void btnF3_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // 明細初期設定
                EntityClass entity = new EntityClass();
                InitDetail(ref entity);

                int _selectedIndex = 0;
                int _displayIndex  = 0;

                if (_entity == null)
                {
                    _entity = new ObservableCollection <EntityClass>();
                    _entity.Add(entity);
                    SetDetailRecNo();
                }
                else
                {
                    if (this.dg.ConfirmEditEnd() == false)
                    {
                        return;
                    }

                    _selectedIndex = dg.SelectedIndex;
                    _displayIndex  = this.dg.CurrentColumn.DisplayIndex;

                    _entity.Insert(_selectedIndex + 1, entity);
                    SetDetailRecNo();

                    dg.SelectedIndex      = _selectedIndex;
                    this.dg.CurrentColumn = this.dg.Columns[_displayIndex];

                    //// 一旦行挿入を入れてコピー
                    //ObservableCollection<EntityClass> _copy_entity = new ObservableCollection<EntityClass>();
                    //for (int i = 0; i <= _entity.Count - 1; i++)
                    //{
                    //    if (dg.SelectedIndex == i)
                    //    {
                    //        _copy_entity.Add(entity);
                    //    }
                    //    _copy_entity.Add(_entity[i]);
                    //}
                    //// コピーを戻す
                    //_entity = null;
                    //_entity = _copy_entity;
                    //this.dg.ItemsSource = _entity;
                    //ExDataGridUtilty.zCommitEdit(this.dg);
                    //ExBackgroundWorker.DoWork_SelectDgCell(this.dg, _selectedIndex, _displayIndex);
                }
            }
            catch (Exception ex)
            {
                ExMessageBox.Show(CLASS_NM + ".btnF3_Click : 予期せぬエラーが発生しました。" + Environment.NewLine + ex.Message);
            }
        }
Exemplo n.º 22
0
        private void btnInstall_Click(object sender, RoutedEventArgs e)
        {
            if (chkYes.IsChecked == false)
            {
                ExMessageBox.Show("ソフトウェア使用許諾に同意頂けていない場合、デモアプリケーションのインストールを行う事はできません。");
                return;
            }

            Application.Current.Install();
        }
Exemplo n.º 23
0
        private void btnExcute_Click(object sender, EventArgs e)
        {
            DataTable data = DBQuery.query(txtQuery.Text, root.connection, null, out string msg);

            dgvResult.DataSource = data;
            if (msg != "")
            {
                ExMessageBox.Show(root, msg, "错误信息", ExMessageBoxIcon.Error);
            }
        }
 private void DataForm_DeletingItem(object sender, CancelEventArgs e)
 {
     if (_entityListD[DataForm.CurrentIndex]._order_id != 0)
     {
         ExMessageBox.Show("受注データからの転記分の為、削除できません。" + Environment.NewLine + "対象行データを取消する場合、納品区分を取消に変更して下さい。");
         e.Cancel = true;
         return;
     }
     GetUserControlFKey().gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd;
 }
Exemplo n.º 25
0
 public override void DataUpdate(int intKbn, string errMessage)
 {
     if ((ExWebService.geWebServiceCallKbn)intKbn == ExWebService.geWebServiceCallKbn.UpdateSalesCreditBalance)
     {
         if (string.IsNullOrEmpty(errMessage))
         {
             ExMessageBox.Show("登録しました。");
             //btnF2_Click(null, null);
         }
     }
 }
Exemplo n.º 26
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            var msg = parent.setNewProject(txtProjectName.Text.Trim());

            if (!msg.isNull())
            {
                ExMessageBox.Show(root, msg);
                return;
            }
            this.Close();
        }
 public override void DataUpdate(int intKbn, string errMessage)
 {
     if ((ExWebService.geWebServiceCallKbn)intKbn == ExWebService.geWebServiceCallKbn.UpdateStockInventory)
     {
         if (string.IsNullOrEmpty(errMessage))
         {
             ExMessageBox.Show("登録しました。");
             GetListData();
             //btnF2_Click(null, null);
         }
     }
 }
Exemplo n.º 28
0
        private void ConfirmGridView_OnOk(object sender, RoutedEventArgs e)
        {
            if (Encrypt(txtpassword.Password) != StartUp.SysObj.UserInfo.Rows[0]["password"].ToString())
            {
                ExMessageBox.Show(385, StartUp.SysObj, "Mật khẩu không chính xác, vui lòng nhập lại mật khẩu!", "", MessageBoxButton.OK, MessageBoxImage.Information);
                txtpassword.SelectAll();
                txtpassword.Focus();
                return;
            }

            IsLogined = true;
            this.Close();
        }
Exemplo n.º 29
0
        static void Main()
        {
            CreateRes();

            //读入主题包
            byte[] theme = File.ReadAllBytes(".\\Default.ext");

            theApp = new ExApp(theme);
            skin   = new ExSkin(null, null, "你好世界", 0, 0, 600, 400,
                                EWS_BUTTON_CLOSE | EWS_BUTTON_MIN | EWS_CENTERWINDOW | EWS_HASICON |
                                EWS_TITLE | EWS_MOVEABLE | EWS_MAINWINDOW, 0, 0, 0, WndProc
                                );

            if (skin.Validate)
            {
                TestCustomCtrl.RegisterControl();
                //设置背景色
                skin.SetLong(EWL_CRBKG, Color.Blue.ToArgb());

                //ExBaseCtrl ctrl1 = new ExBaseCtrl(skin, "Button", "你好", 50, 50, 200, 35);
                ExButton btn1 = new ExButton(skin, "你好", 50, 50, 150, 40);

                byte[]   img  = File.ReadAllBytes(".\\Res\\bkg.png");
                ExStatic img1 = new ExStatic(skin, img, 50, 110, 300, 200);
                img1.SetBackgroundPlayState(true, false, false);

                ExEdit edit1 = new ExEdit(img1, "测试", 25, 25, 100, 30);

                TestCustomCtrl custom = new TestCustomCtrl(skin, "abc", 360, 110, 50, 50);


                //挂接事件
                btn1.HandleEvent(NM_CLICK,
                                 //lambda delegate
                                 (IntPtr hObj, int nID, int nCode, int wParam, int lParam) =>
                {
                    ExMessageBox.Show(new ExControl(hObj), "单击按钮" + skin.Text, btn1.ClassName, MB_ICONINFORMATION, 0);

                    btn1.Text = "测试";

                    return(false);
                }
                                 );

                //显示
                skin.Visible = true;

                //运行程序
                theApp.Run();
            }
        }
Exemplo n.º 30
0
        private void btnExportSpec_Click(object sender, EventArgs e)
        {
            string path = rootFolder() + "\\db_spec.pdf";
            string msg  = DBSpecUtil.exportPDF(path, txtRootFolder.Text);

            if (msg == "")
            {
                ExMessageBox.Show(root, "导出成功!");
            }
            else
            {
                ExMessageBox.Show(root, "导出文档时出现错误, 错误信息:" + msg);
            }
        }