示例#1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            this.saveForm();

            Task.Factory.StartNew(() =>
              {

              Synchronizer s = new Synchronizer();
              s.SyncData();
              });

            this.Close();
        }
示例#2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Task.Factory.StartNew(() =>
            {

                DataStore.loadFiles();
                this.Invoke((MethodInvoker)(() => listBox1.DataSource = DataStore.Labels));
                this.Invoke((MethodInvoker)(() =>  listBox1.DisplayMember = "displayVal"));

            });

            Task.Factory.StartNew(() =>
            {

                Synchronizer s = new Synchronizer();
                s.SyncLoop();

            });

            if (String.IsNullOrEmpty(SecureLocalStore.getItem("SellerId")))
            {
                Form configForm = new ConfigurationForm();

                configForm.ShowDialog();

            }

            string val = SecureLocalStore.getItem("NumCopies");
            if(!string.IsNullOrEmpty(val))
            {
                this.Copies.Text = val;
            }

            val = SecureLocalStore.getItem("Condition");
            if (!string.IsNullOrEmpty(val))
            {
                this.Condition.Text = val;
            }

            val = SecureLocalStore.getItem("sizeChosen");
            if (!string.IsNullOrEmpty(val))
            {
                this.sizeChosen.Text = val;
            }
        }