예제 #1
0
        private void delUsr_Click(object sender, EventArgs e)
        {
            userView.Items.Remove(userView.CheckedItems[0]);

            List <ListViewItem> dongs = new List <ListViewItem>();

            foreach (ListViewItem item in userView.Items)
            {
                dongs.Add(item);
            }

            SettingsSerializer.saveUsers(dongs);
        }
예제 #2
0
        private void edBt_Click(object sender, EventArgs e)
        {
            userView.CheckedItems[0].Text             = nameBx.Text;
            userView.CheckedItems[0].SubItems[1].Text = tokeBx.Text;

            List <ListViewItem> dongs = new List <ListViewItem>();

            foreach (ListViewItem item in userView.Items)
            {
                dongs.Add(item);
            }

            SettingsSerializer.saveUsers(dongs);
        }
예제 #3
0
        private void saveUsr_Click(object sender, EventArgs e)
        {
            ListViewItem newUsr = new ListViewItem();

            ListViewItem.ListViewSubItem newTk = new ListViewItem.ListViewSubItem();
            newUsr.Text = nameBx.Text;
            newTk.Text  = tokeBx.Text;
            newUsr.SubItems.Add(newTk);

            userView.Items.Add(newUsr);

            List <ListViewItem> dongs = new List <ListViewItem>();

            foreach (ListViewItem item in userView.Items)
            {
                dongs.Add(item);
            }

            SettingsSerializer.saveUsers(dongs);
        }
예제 #4
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            foreach (ListViewItem lvi in SettingsSerializer.loadUsers())
            {
                userView.Items.Add(lvi);
            }

            latBox.Text  = Properties.Settings.Default.latitude;
            longBox.Text = Properties.Settings.Default.longitude;

            tickSnooze.Text = Properties.Settings.Default.sleep_time.ToString();
            tzId.Text       = Properties.Settings.Default.timezone_id;
            uaBox.Text      = Properties.Settings.Default.user_agent;
            gmBox.Text      = Properties.Settings.Default.gmt_offset;
            pAPIbox.Text    = Properties.Settings.Default.phewtick_server;
            locTail.Text    = Properties.Settings.Default.location_tail;
            scanTail.Text   = Properties.Settings.Default.scan_tail;
            refTail.Text    = Properties.Settings.Default.refresh_tail;
            verLB.Text      = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }