public void OpenProject()
        {
            string file;

            if (DialogUnity.OpenFile(Constant.OPEN_PROJECT_FILTER, out file))
            {
                OpenProject(file);
            }
        }
Exemple #2
0
        private void btnBrowseEnum_Click(object sender, EventArgs e)
        {
            bool result = DialogUnity.EnumChoose(out _selectedEntity);

            if (result == false)
            {
                return;
            }
            txtEnumName.Text = _selectedEntity.Name;
        }
Exemple #3
0
        public void ImportImageResource()
        {
            string file;

            if (DialogUnity.OpenFile(Constant.RESOURCE_IMAGE_DIALOG_FILTER, out file) == false)
            {
                return;
            }
            string fileName = Path.GetFileName(file);

            if (_resourceArchive.Container(fileName))
            {
                if (MessageBox.Show(Language.Current.ResourceComponentService_OverrideConfirm,
                                    CommonLanguage.Current.MessageCaption_Notice,
                                    MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
                {
                    return;
                }
            }
            _resourceArchive.Add(file);
        }
Exemple #4
0
        private void btnBrowseDataEntity_Click(object sender, EventArgs e)
        {
            DataEntityTreeChooseArgs dialogArgs = new DataEntityTreeChooseArgs()
            {
                ShowDataItem = false,
                SelectedId   = _selectedId,
                SelectedName = _selectedName
            };
            DataEntityTreeChooseResult result = DialogUnity.DataEntityChoose(dialogArgs);

            if (result.DialogResult == false)
            {
                return;
            }
            _selectedId            = result.SelectedId;
            _selectedName          = result.SelectedName;
            txtDataEntityName.Text = _selectedName;
            DataEntity dataEntity = result.SelectedDataEntity;

            ddlTextDataItem.DataSource  = dataEntity.Items.ToList();
            ddlValueDataItem.DataSource = dataEntity.Items.ToList();
        }