示例#1
0
        public EditTitleForm(bool isNewTitle, ref DataSet.TitleRow sourceTitle, ref Credential sourceCredential)
        {
            this.sourceTitle = sourceTitle;
            this.sourceCredential = sourceCredential;
            this.isNewTitle = isNewTitle;

            InitializeComponent();

            if (isNewTitle)
            {
                this.Text = "�V�����z�M�^�C�g��";
            }
            else
            {
                this.Text = "�z�M�^�C�g����ҏW";
                lvlPublikKeyTextBox.Text = LvlKeyNotModified;
            }
            titleNameTextBox.DataBindings.Add("Text", sourceTitle, "Name");
            apnsFilePathTextBox.DataBindings.Add("Text", sourceCredential, "ApnsPkcs12FilePath");
            apnsFilePasswordTextBox.DataBindings.Add("Text", sourceCredential, "ApnsPkcs12FilePassword");
            apnsIsSandboxCheckBox.DataBindings.Add("Checked", sourceCredential, "ApnsIsSandbox");
            lvlPackageNameTextBox.DataBindings.Add("Text", sourceCredential, "LvlPackageName");
            sitePathTextBox.DataBindings.Add("Text", sourceTitle, "SiteRootPath");
            standByPathTextBox.DataBindings.Add("Text", sourceTitle, "StandByPath");
            defaultPushMessageTextBox.DataBindings.Add("Text", sourceTitle, "PushMessage");
        }
示例#2
0
        static SiteConstant()
        {
            string title = ConfigurationManager.AppSettings["TitleName"];
            if (title == null)
            {
                logger.Fatal("���̃T�C�g�̃^�C�g����web.config�ɐݒ肳��Ă��܂���B");
                IsConfigurationOK = false;
                return;
            }

            string lr = ConfigurationManager.AppSettings["LvlResponseCodeShouldBe"];
            if (lr == null || !int.TryParse(lr, out LvlResponseCodeShouldBe))
            {
                logger.Fatal("LvlResponseCodeShouldBe��web.config�ɐݒ肳��Ă��Ȃ����A�l�������ł͂���܂���B");
                IsConfigurationOK = false;
                return;
            }

            DataSet.TitleDataTable tdt;
            try
            {
                TitleTableAdapter ta = new TitleTableAdapter();
                tdt = ta.GetDataByName(title);
            }
            catch (Exception e)
            {
                logger.Fatal("�f�[�^�x�[�X�ɃA�N�Z�X�ł��܂���B�f�[�^�x�[�X�̃A�J�E���g�Ɍ������Ȃ����A�܂��͐ڑ������񂪊Ԉ���Ă��܂�", e);
                IsConfigurationOK = false;
                return;
            }
            if (tdt.Count == 0)
            {
                logger.Fatal("web.config�ɐݒ肳��Ă��邱�̃T�C�g�̃^�C�g�����f�[�^�x�[�X��ɂ͑��݂��܂���B");
                IsConfigurationOK = false;
                return;
            }

            SiteConstant.title = tdt[0];

            credential = new Credential(Title);

            IsConfigurationOK = true;
        }
示例#3
0
 public static void TestSettings(DataSet.TitleRow title)
 {
     SiteConstant.title = title;
     SiteConstant.credential = new Credential(Title);
 }