Пример #1
0
 /// <summary>
 /// 表格是否允许点击列头进行排序
 /// </summary>
 /// <param name="istrue"></param>
 public void SetAllowSort(DevExpress.Utils.DefaultBoolean istrue)
 {
     for (int i = 0; i < _gridView.Columns.Count; i++)
     {
         _gridView.Columns[i].OptionsColumn.AllowSort = istrue;
     }
 }
Пример #2
0
        private void InitThread()
        {
            try
            {
                m_continues = DevExpress.Utils.DefaultBoolean.True;
                while (true)
                {
                    if (m_continues != DevExpress.Utils.DefaultBoolean.True)
                    {
                        break;
                    }
                    if (m_IsDownload == true)
                    {
                        m_IsDownload = false;
                        DownloadFile(m_url, m_fnm);
                    }
                    Thread.Sleep(Constants.DOWNLOAD_TIME_SLEEP);
                }

                m_continues = DevExpress.Utils.DefaultBoolean.Default;
            }
            catch (Exception ex)
            {
                LogFile.Write("FTPDownload.InitThread, ex: " + ex.ToString());
                m_continues = DevExpress.Utils.DefaultBoolean.Default;
            }
        }
        public void Initialize()
        {
            using (StringReader stringReader = new StringReader(_Input))
                using (XmlTextReader reader = new XmlTextReader(stringReader)) {
                    reader.DtdProcessing = DtdProcessing.Ignore;
                    while (reader.Read())
                    {
                        if (reader.IsStartElement())
                        {
                            switch (reader.Name)
                            {
                            case "type":
                                GetChartType(reader.ReadString());
                                break;

                            case "height":
                                _Height = new int?(int.Parse(reader.ReadString()));
                                break;

                            case "width":
                                _Width = new int?(int.Parse(reader.ReadString()));
                                break;

                            case "legend":
                                _ShowLegend = (reader.ReadString().ToLower() == "true") ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
                                break;

                            case "data":
                                GetData(reader.ReadString());
                                break;
                            }
                        }
                    }
                }
        }
Пример #4
0
 private void clickColumnSort(XtraMenu menu)
 {
     menu.Checked = !menu.Checked;
     DevExpress.XtraGrid.Views.Grid.GridView gridView = _XtraGrid.DefaultView as DevExpress.XtraGrid.Views.Grid.GridView;
     foreach (DevExpress.XtraGrid.Columns.GridColumn col in gridView.Columns)
     {
         DevExpress.Utils.DefaultBoolean sort = menu.Checked?DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
         col.OptionsColumn.AllowSort = sort;
     }
 }
Пример #5
0
 public void Stop()
 {
     try
     {
         m_continues  = DevExpress.Utils.DefaultBoolean.False;
         m_IsDownload = false;
     }
     catch (Exception ex)
     {
         LogFile.Write("FTPDownload.Stop, ex: " + ex.ToString());
     }
 }
Пример #6
0
 public void Start()
 {
     try
     {
         m_continues = DevExpress.Utils.DefaultBoolean.True;
         m_thread    = new Thread(InitThread);
         m_thread.Start();
     }
     catch (Exception ex)
     {
         LogFile.Write("FTPDownload.Start, ex: " + ex.ToString());
     }
 }
Пример #7
0
        public DialogResult ShowConfirm(string message, string title = "Confirmation", bool allowHtmlText = false)
        {
            DialogResult result;

            DevExpress.Utils.DefaultBoolean isAllowed = allowHtmlText ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;

            if (XtraMessageBox.Show(message, title, MessageBoxButtons.YesNo, isAllowed) == DialogResult.Yes)
            {
                result = DialogResult.Yes;
            }
            else
            {
                result = DialogResult.No;
            }

            return(result);
        }
Пример #8
0
        public PasteViewController()
        {
            // if set to true, then you need to remove the column headers before pasting it to another row
            this.copyColumnHeaders = DevExpress.Utils.DefaultBoolean.True;
            TargetViewType         = ViewType.ListView;

            var pasteAction = new SingleChoiceAction(this, "PasteAction", PredefinedCategory.ObjectsCreation);

            pasteAction.Caption          = "Paste";
            pasteAction.ItemType         = SingleChoiceActionItemType.ItemIsOperation;
            pasteAction.ShowItemsOnClick = true;
            pasteAction.Execute         += PasteRowAction_Execute;

            var pasteRowChoice = new ChoiceActionItem();

            pasteRowChoice.Caption = pasteRowsCaption;
            pasteAction.Items.Add(pasteRowChoice);

            var pasteColumnChoice = new ChoiceActionItem();

            pasteColumnChoice.Caption = pasteColumnCaption;
            pasteAction.Items.Add(pasteColumnChoice);

            var clearColumnChoice = new ChoiceActionItem();

            clearColumnChoice.Caption = clearColumnCaption;
            pasteAction.Items.Add(clearColumnChoice);

            //var pasteDivider = new ChoiceActionItem();
            //pasteDivider.Caption = "------";
            //pasteAction.Items.Add(pasteDivider);

            var pasteRowsOfflineChoice = new ChoiceActionItem();

            pasteRowsOfflineChoice.BeginGroup = true;
            pasteRowsOfflineChoice.Caption    = pasteRowsOfflineCaption;
            pasteAction.Items.Add(pasteRowsOfflineChoice);

            var pasteRowsCommitChoice = new ChoiceActionItem();

            pasteRowsCommitChoice.Caption = pasteRowsCommitCaption;
            pasteAction.Items.Add(pasteRowsCommitChoice);
        }
Пример #9
0
    protected void gridProjects_OnCustomButtonInitialize(object sender, ASPxGridViewCustomButtonEventArgs e)
    {
        if (e.VisibleIndex == -1)
        {
            return;
        }

        ASPxGridView grid      = (ASPxGridView)sender;
        string       isDeleted = grid.GetRowValues(e.VisibleIndex, "isDeleted").ToString();


        DevExpress.Utils.DefaultBoolean showDel   = (isDeleted == "0") ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
        DevExpress.Utils.DefaultBoolean showUndel = (isDeleted == "1") ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;

        if (e.ButtonID == "btnDelete")
        {
            e.Visible = showDel;
        }
        if (e.ButtonID == "btnUndelete")
        {
            e.Visible = showUndel;
        }
    }
Пример #10
0
 public EditObjectWithDevExpressDefaultBoolean(DevExpress.Utils.DefaultBoolean fBool = DevExpress.Utils.DefaultBoolean.Default)
 {
     _fBool = fBool;
 }
Пример #11
0
        public void ShowError(string message, string title = "Error", bool allowHtmlText = false)
        {
            DevExpress.Utils.DefaultBoolean isAllowed = allowHtmlText ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;

            XtraMessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error, isAllowed);
        }
Пример #12
0
 public StubWithIdDevExpressDefaultBoolean(DevExpress.Utils.DefaultBoolean id = DevExpress.Utils.DefaultBoolean.Default, string name = "")
 {
     Id   = id;
     Name = name;
 }