Esempio n. 1
0
        private void saveApiBtn_Click(object sender, RoutedEventArgs e)
        {
            NewApi na = new NewApi(sheetNameTxt.Text, pathTxt.Text, sheetIdTxt.Text);

            SaveToFile(na);
            MessageBox.Show("Restart DevPlanner to upload your changes");
            this.Close();
        }
Esempio n. 2
0
        //saving to txt

        bool SaveToFile(NewApi api)
        {
            using (StreamWriter sw = new StreamWriter("api.txt", true))
            {
                sw.WriteLine("{0}|{1}|{2}", api.name, api.path, api.id);
                sw.Close();
            }
            return(true);
        }
Esempio n. 3
0
        public void getApi(NewApi api)
        {
            SpreadsheetId = api.id;
            path          = api.path;

            inProgressProjectsList.Clear();
            pubProjList.Clear();
            accessSheets();
            readSheetData();
            publicList.ItemsSource = null;
            publicList.ItemsSource = pubProjList;

            inProgressList.ItemsSource = null;
            inProgressList.ItemsSource = inProgressProjectsList;

            deadlineMessage();
        }
Esempio n. 4
0
        void ReadApiData()
        {
            using (StreamReader sr = new StreamReader("api.txt"))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    string[] par = line.Split('|');

                    NewApi na = new NewApi(par[0], par[1], par[2]);
                    if (!apiList.Contains(na))
                    {
                        apiList.Add(na);
                    }
                }
            }
        }