コード例 #1
0
        public FormCAPDE()
        {
            InitializeComponent();

            Task ts = Task.Factory.StartNew(() =>
            {
                FormUpdate fUpdate = new FormUpdate();
                if (fUpdate.hasUpdate && fUpdate.ShowDialog() == DialogResult.OK)
                {
                    hasUpdate = fUpdate.hasUpdate;
                }
            });

            ts.Wait();

            Task t = Task.Factory.StartNew(() =>
            {
                if (!hasUpdate)
                {
                    ProcessInitial();
                }
                formLoading.DialogResult = DialogResult.Abort;
            });

            if (formLoading.ShowDialog() == DialogResult.Abort)
            {
                formLoading.Close();
            }
            t.Wait();
        }
コード例 #2
0
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormUpdate fu = new FormUpdate();

            fu.Connstr = _server.ConnStr.Split(',').First();
            fu.Key     = TBKey.Text.Trim();
            fu.Bucket  = CBBucket.Text;
            fu.Val     = KeyVal;
            fu.ShowDialog();
        }